vengi-voxel / vengi

free and open source voxel art tools - editor, thumbnailer and format converter
http://vengi-voxel.github.io/vengi/
Other
1.05k stars 87 forks source link

VOXEDIT: duplicate a node with reference children and delete the children afterwards triggers assert #418

Closed mgerhardy closed 3 months ago

mgerhardy commented 3 months ago
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) Stack trace (most recent call last):
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #20   Object "vengi-voxedit", at 0x104c1669f, in main + 199
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #19   Object "vengi-voxedit", at 0x1051cdec3, in app::App::startMainLoop(int, char**) + 91
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #18   Object "vengi-voxedit", at 0x1051ce737, in app::App::onFrame() + 955
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #17   Object "vengi-voxedit", at 0x104c1653b, in VoxEdit::onRunning() + 27
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #16   Object "vengi-voxedit", at 0x105086be7, in ui::IMGUIApp::onRunning() + 575
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #15   Object "vengi-voxedit", at 0x104c16513, in VoxEdit::onRenderUI() + 79
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #14   Object "vengi-voxedit", at 0x104c610a7, in voxedit::MainWindow::update() + 1287
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #13   Object "vengi-voxedit", at 0x104c5ec7f, in voxedit::MainWindow::mainWidget() + 159
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #12   Object "vengi-voxedit", at 0x104c7e093, in voxedit::Viewport::update(command::CommandExecutionListener*) + 587
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #11   Object "vengi-voxedit", at 0x104c7cdc7, in voxedit::Viewport::renderViewport() + 135
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #10   Object "vengi-voxedit", at 0x104c7d053, in voxedit::Viewport::renderToFrameBuffer() + 99
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #9    Object "vengi-voxedit", at 0x104c9f72f, in voxedit::SceneManager::render(voxelrender::RenderContext&, video::Camera const&, unsigned char) + 251
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #8    Object "vengi-voxedit", at 0x104d9096f, in voxedit::SceneRenderer::renderScene(voxelrender::RenderContext&, video::Camera const&) + 223
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #7    Object "vengi-voxedit", at 0x104d901f3, in voxedit::SceneRenderer::updateAABBMesh(bool, scenegraph::SceneGraph const&, int) + 575
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #6    Object "vengi-voxedit", at 0x104d91b87, in voxedit::toOBB(bool, voxel::Region const&, glm::vec<3, float, (glm::qualifier)0> const&, scenegraph::FrameTransform const&) + 95
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #5    Object "vengi-voxedit", at 0x10536f43f, in core_report_assert(AssertData&, char const*, int, char const*) + 47
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #4    Object "libSDL2-2.0.0.dylib", at 0x106a1b61f, in SDL_ReportAssertion_REAL + 215
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #3    Object "vengi-voxedit", at 0x10536f3b7, in coreAssertionHandler(SDL_AssertData const*, void*) + 71
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #2    Object "vengi-voxedit", at 0x10536f8c3, in core_stacktrace() + 55
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #1    Object "vengi-voxedit", at 0x10536f6f3, in backward::StackTraceImpl<backward::system_tag::darwin_tag>::load_here(unsigned long, void*, void*) + 131
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] ERROR: (0) #0    Object "vengi-voxedit", at 0x10536fda7, in unsigned long backward::details::unwind<backward::StackTraceImpl<backward::system_tag::darwin_tag>::callback>(backward::StackTraceImpl<backward::system_tag::darwin_tag>::callback, unsigned long) + 39
2024-03-18 15:56:50.482 vengi-voxedit[47678:1111281] WARN: 

Assertion failure at toOBB (/Users/gerhardym/dev/oss/vengi/src/tools/voxedit/modules/voxedit-util/SceneUtil.cpp:18), triggered 1 time:
  'region.isValid()'
mgerhardy commented 3 months ago

SceneManager::nodeDuplicate isn't handling reference nodes correct