Repository navigation
Bug located in load state on linux聽#122
Description
馃悶 Description of the bug
When loading a state from an empty scene in a Linux environment, the visualizer gets into a broken state, not fixable by a refresh or a new API call.
The viewer does not display the new dataset in the canvas, though the UI elements are responsive and seem to contain the correct info (e.g. the tree view hierarchy and the part properties panel). A refresh does not restore the dataset in the canvas.
The uncaught exception message reads Exception {message: Array(2), stack: 'Error: std::bad_alloc,std::bad_alloc\n at ___thr鈥kWebAssembly.wasm:wasm-function[37703]:0x1c82765'}
Oher times we see the geometry partially rendered, or rendered wrong:
Notes:
- This behaviour works as expected on Windows. It shows the error behaviour on a Linux system, and on a Docker container on a Windows system.
- Was exposed when a regression test started failing, but upon further investigation that test seems to have been passing despite the canvas being empty on linux.
- The described behaviour on linux has been reproduced on linux tracing back to Mar 2026 (or further) in the old internal repo: e.g. on c34ebb92dbca1cb876612686194be22a92d848b2.
- The bug was found when running
load_stateinto an empty scene, which also loads a dataset. To make sure this doesn't also affectadd_dataset, tested runningadd_datasetfrom an empty scene on the VISOR main branch, in the python3.11 dev docker container. It succeeded. The bug is isolated toload_state.
馃摑 Steps to reproduce
Two options: Linux environment, or use the dev docker container (on any environment, e.g. Windows). The reproduction for both is the same, except that the way the service is run is different. The two options for running the service are outlined here; the reproduction is in the next section and is the same for both.
1. Running the VISOR service
a. Linux environment
> visor-cli server start
b. VISOR dev docker container
docker compose -f deploy/docker/dev/docker-compose.yml up --build
This will run the VISOR service on the same default port as the CLI command above.
2. Reproduction
a. Prerequisite: save a state from a VISOR scene.
> visor-cli instance start examples/assets/vtk_scene_sphere_l2_b3_r32_v3_c1_z0.vtm
# adjust camera/part properties etc>
> visor-cli instance save saved1
# directory saved1 contains the `visor.json` file and the cached dataset
b. Start a VISOR visualizer with an empty scene, and load the saved state
* visor-cli instance start
* visor-cli instance load saved1
馃摝 Installed packages and configuration
Tested on the following configurations:
- Windows with docker container
- Linux
馃殾 Defines the severity of the bug. In the case of class-3, specific information must be added.
Class 1 - Crash/Major data loss
馃摝 Support ticket ID
No response
馃悶 Found in
No response
馃┕ Fixed in
No response
Root cause
No response
Third Party
- This bug is introduced by a third party
Released Bug
- This bug is in a released product
Activity
LKasianAnsys commentedon Oct 14, 2026
Handling this bug in the scope of #24, which validates the end to end save/load state workflow.
The root cause here is an issue in reading VTKHDF files on linux/mac platforms. Most of the datasets we use are VTM, VTP, or VTU, so we don't hit the VTKHDF read path on most of our tests. The
load_stateAPI call into an empty scene triggers that path, becausesave_statecaches the dataset in VTKHDF format regardless of input type, andload_statereads it on an empty scene.Will add a fix on our application side for now, and will file an issue with kitware if needed.
LKasianAnsys commentedon Oct 14, 2026
Filed an issue on the Kitware board, for the upstream issue reading the VTKHDF data: https://github.com/ansys-services/kitware-ansys/issues/139
Also opened a PR in VISOR for a workaround in the meantime: #169