Replies: 2 comments
-
When you create new subgraphs and add them to the scene graph once a viewer is rendering you need to run a compile traversal over the new subgraphs being adding them to the main scene graph. The vsgdynamicload example illustrates how one uses the vsg::CompileManager to compile new subgraphs, once they have been compiled. For performance reasons the VSG doesn't have checks around low level Vulkan calls, it assumes that if an object that has Vulkan rendering associated with it then it's been precompiled before being allowed into the standard record traversal. As users can have hundreds of thousands of Vulkan related objects in their scenes even extra if statements can cause a noticeable performance overhead. This optimization is why you are getting a crash - the VSG is assuming the scene graph has been created and compiled correctly, but the compile is missing so the vulkan objects it's assuming should be be there aren't. |
Beta Was this translation helpful? Give feedback.
-
Just wanted to say thanks. Recompiling the graph, indeed solved the problem. |
Beta Was this translation helpful? Give feedback.
-
Before I create a minimum reproducible example, I thought I'd ask if I'm doing something fundamentally wrong.
What I did:
vsgQt::Viewer
..The result was a crash. Here is a stack trace from Valgrind:
I'm getting a nullptr access (
Address 0x0 is not...
). So I'm wondering whether I'm doing something wrong, or whether this is a bug in VSG? Should I create a minimum reproducible example?I'm using the latest VSG Head from the git repo, commit:7ada1685.
Beta Was this translation helpful? Give feedback.
All reactions