Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VOXELGENERATOR: assert after running animation.lua script #511

Open
mgerhardy opened this issue Sep 5, 2024 · 0 comments
Open

VOXELGENERATOR: assert after running animation.lua script #511

mgerhardy opened this issue Sep 5, 2024 · 0 comments
Labels

Comments

@mgerhardy
Copy link
Collaborator

ERROR: LUA generate script: [string "--..."]:83: attempt to perform arithmetic on a table value
ERROR: Stack trace (most recent call last):
ERROR: #27   Object "", at 0xffffffffffffffff, in 
ERROR: #26   Object "/home/mgerhardy/dev/oss/engine/build/voxedit/vengi-voxedit", at 0x55b3fa73a150, in _start
ERROR: #25   Source "../csu/libc-start.c:360", in __libc_start_main_impl
ERROR: #24   Source "../sysdeps/nptl/libc_start_call_main.h:58", in __libc_start_call_main
ERROR: #23   Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/VoxEditMain.cpp:16", in main
ERROR:          13: 	const voxelcollection::CollectionManagerPtr &collectionMgr =
ERROR:          14: 		core::make_shared<voxelcollection::CollectionManager>(filesystem, texturePool);
ERROR:          15: 	VoxEdit app(filesystem, timeProvider, sceneMgr, collectionMgr, texturePool);
ERROR:       >  16: 	return app.startMainLoop(argc, argv);
ERROR:          17: }
ERROR: #22   Source "/home/mgerhardy/dev/oss/engine/src/modules/app/App.cpp:204", in startMainLoop
ERROR:         201: 	emscripten_set_main_loop(runFrameEmscripten, 0, 1);
ERROR:         202: #else
ERROR:         203: 	while (AppState::InvalidAppState != _curState) {
ERROR:       > 204: 		onFrame();
ERROR:         205: 	}
ERROR:         206: #endif
ERROR:         207: 	return _exitCode;
ERROR: #21   Source "/home/mgerhardy/dev/oss/engine/src/modules/app/App.cpp:372", in onFrame
ERROR:         369: 				core_trace_scoped(AppOnBeforeRunning);
ERROR:         370: 				onBeforeRunning();
ERROR:         371: 			}
ERROR:       > 372: 			const AppState state = onRunning();
ERROR:         373: 			if (_nextState != AppState::Cleanup && _nextState != AppState::Destroy) {
ERROR:         374: 				_nextState = state;
ERROR:         375: 			}
ERROR: #20   Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/VoxEdit.cpp:552", in onRunning
ERROR:         549: }
ERROR:         550: 
ERROR:         551: app::AppState VoxEdit::onRunning() {
ERROR:       > 552: 	app::AppState state = Super::onRunning();
ERROR:         553: 	if (state != app::AppState::Running) {
ERROR:         554: 		return state;
ERROR:         555: 	}
ERROR: #19   Source "/home/mgerhardy/dev/oss/engine/src/modules/ui/IMGUIApp.cpp:668", in onRunning
ERROR:         665: 	const bool renderUI = _renderUI->boolVal();
ERROR:         666: 	if (renderUI) {
ERROR:         667: 		core_trace_scoped(IMGUIAppOnRenderUI);
ERROR:       > 668: 		onRenderUI();
ERROR:         669: 		if (_showConsole) {
ERROR:         670: 			_console.render(_lastExecutedCommand);
ERROR:         671: 		}
ERROR: #18   Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/VoxEdit.cpp:548", in onRenderUI
ERROR:         545: 	if (_sceneMgr->update(_nowSeconds)) {
ERROR:         546: 		_mainWindow->onNewScene();
ERROR:         547: 	}
ERROR:       > 548: 	_mainWindow->update();
ERROR:         549: }
ERROR:         550: 
ERROR:         551: app::AppState VoxEdit::onRunning() {
ERROR: #17   Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-ui/MainWindow.cpp:1009", in update
ERROR:        1006: 	ImGui::DockSpace(dockIdMain);
ERROR:        1007: 
ERROR:        1008: 	leftWidget();
ERROR:       >1009: 	mainWidget();
ERROR:        1010: 	rightWidget();
ERROR:        1011: 
ERROR:        1012: 	registerPopups();
ERROR: #16   Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-ui/MainWindow.cpp:419", in mainWidget
ERROR:         416: 	}
ERROR:         417: 	command::CommandExecutionListener &listener = _app->commandListener();
ERROR:         418: 	for (size_t i = 0; i < _scenes.size(); ++i) {
ERROR:       > 419: 		_scenes[i]->update(&listener);
ERROR:         420: 	}
ERROR:         421: #if ENABLE_RENDER_PANEL
ERROR:         422: 	_renderPanel.update(TITLE_RENDER, _sceneMgr->sceneGraph());
ERROR: #15   Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-ui/Viewport.cpp:430", in update
ERROR:         427: 	if (ImGui::Begin(name.c_str(), nullptr, sceneWindowFlags)) {
ERROR:         428: 		_visible = true;
ERROR:         429: 		renderMenuBar(listener);
ERROR:       > 430: 		renderViewport();
ERROR:         431: 	}
ERROR:         432: 	ImGui::End();
ERROR: #14   Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-ui/Viewport.cpp:229", in renderViewport
ERROR:         226: 	if (setupFrameBuffer(contentSize)) {
ERROR:         227: 		_camera.update(_app->deltaFrameSeconds());
ERROR:         228: 
ERROR:       > 229: 		renderToFrameBuffer();
ERROR:         230: 		renderViewportImage(contentSize);
ERROR:         231: 		const bool modifiedRegion = renderGizmo(camera(), headerSize, contentSize);
ERROR: #13   Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-ui/Viewport.cpp:832", in renderToFrameBuffer
ERROR:         829: void Viewport::renderToFrameBuffer() {
ERROR:         830: 	core_trace_scoped(RenderFramebuffer);
ERROR:         831: 	video::clearColor(core::Color::Clear());
ERROR:       > 832: 	_sceneMgr->render(_renderContext, camera());
ERROR:         833: }
ERROR:         834: 
ERROR:         835: } // namespace voxedit
ERROR: #12   Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-util/SceneManager.cpp:1566", in render
ERROR:        1564: 	const bool renderScene = (renderMask & RenderScene) != 0u;
ERROR:        1565: 	if (renderScene) {
ERROR:       >1566: 		_sceneRenderer->renderScene(renderContext, camera);
ERROR:        1567: 	}
ERROR:        1568: 	const bool renderUI = (renderMask & RenderUI) != 0u;
ERROR:        1569: 	if (renderUI) {
ERROR: #11   Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-util/SceneRenderer.cpp:299", in renderScene
ERROR:         296: 	renderContext.grayInactive = _grayInactive->boolVal();
ERROR:         297: 
ERROR:         298: 	video::ScopedState depthTest(video::State::DepthTest, true);
ERROR:       > 299: 	updateAABBMesh(renderContext.sceneMode, *renderContext.sceneGraph, renderContext.frame);
ERROR:         300: 	updateBoneMesh(renderContext.sceneMode, *renderContext.sceneGraph, renderContext.frame);
ERROR:         301: 	_volumeRenderer.render(renderContext, camera, _renderShadow->boolVal(), false);
ERROR:         302: 	extractVolume(*renderContext.sceneGraph);
ERROR: #10   Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-util/SceneRenderer.cpp:198", in updateAABBMesh
ERROR:         195: 		const voxel::Region &region = sceneGraph.resolveRegion(node);
ERROR:         196: 		core_assert_msg(region.isValid(), "Region for node %s of type %i is invalid", node.name().c_str(), (int)node.type());
ERROR:         197: 		const glm::vec3 pivot = node.pivot();
ERROR:       > 198: 		const scenegraph::FrameTransform &transform = sceneGraph.transformForFrame(node, frameIdx);
ERROR:         199: 		const math::OBB<float>& obb = toOBB(true, region, pivot, transform);
ERROR:         200: 		// TODO: make this an aabb and use the transform matrix from the rawvolumerenderer
ERROR:         201: 		_shapeBuilder.obb(obb);
ERROR: #9    Source "/home/mgerhardy/dev/oss/engine/src/modules/scenegraph/SceneGraph.cpp:315", in transformForFrame
ERROR:         312: }
ERROR:         313: 
ERROR:         314: FrameTransform SceneGraph::transformForFrame(const SceneGraphNode &node, FrameIndex frameIdx) const {
ERROR:       > 315: 	return transformForFrame(node, _activeAnimation, frameIdx);
ERROR:         316: }
ERROR:         317: 
ERROR:         318: FrameTransform SceneGraph::transformForFrame(const SceneGraphNode &node, const core::String &animation,
ERROR: #8    Source "/home/mgerhardy/dev/oss/engine/src/modules/scenegraph/SceneGraph.cpp:328", in transformForFrame
ERROR:         325: 	if (node.parent() == InvalidNodeId) {
ERROR:         326: 		parentTransform.matrix = glm::mat4(1.0f);
ERROR:         327: 	} else {
ERROR:       > 328: 		parentTransform = transformForFrame(this->node(node.parent()), animation, frameIdx);
ERROR:         329: 	}
ERROR:         330: 
ERROR:         331: 	FrameTransform transform;
ERROR: #7    Source "/home/mgerhardy/dev/oss/engine/src/modules/scenegraph/SceneGraph.cpp:338", in transformForFrame
ERROR:         335: 		transform.matrix = parentTransform.matrix * kf->transform().localMatrix();
ERROR:         336: 	} else if (node.hasKeyFrameForFrame(frameIdx, &keyFrameIdx)) {
ERROR:         337: 		const SceneGraphKeyFrame *kf = node.keyFrame(keyFrameIdx);
ERROR:       > 338: 		transform.matrix = parentTransform.matrix * kf->transform().localMatrix();
ERROR:         339: 	} else {
ERROR:         340: 		const KeyFrameIndex start = node.previousKeyFrameForFrame(frameIdx);
ERROR:         341: 		const KeyFrameIndex end = node.nextKeyFrameForFrame(frameIdx);
ERROR: #6    Source "/home/mgerhardy/dev/oss/engine/src/modules/scenegraph/SceneGraphTransform.cpp:224", in localMatrix
ERROR:         221: }
ERROR:         222: 
ERROR:         223: const glm::mat4x4 &SceneGraphTransform::localMatrix() const {
ERROR:       > 224: 	core_assert_msg((_dirty & DIRTY_LOCALVALUES) == 0u, "dirty flag: %u", _dirty);
ERROR:         225: 	return _localMat;
ERROR:         226: }
ERROR: #5    Source "/home/mgerhardy/dev/oss/engine/src/modules/core/Assert.cpp:68", in core_assert_impl_message
ERROR:          65: 	SDL_vsnprintf(buf, bufSize - 1, format, args);
ERROR:          66: 	va_end(args);
ERROR:          67: 	data.condition = buf; /* also let it work for following calls */
ERROR:       >  68: 	const SDL_AssertState state = SDL_ReportAssertion((SDL_AssertData *)&data, function, file, line);
ERROR:          69: 	if (state == SDL_ASSERTION_BREAK) {
ERROR:          70: 		SDL_TriggerBreakpoint();
ERROR:          71: 	}
ERROR: #4    Object "/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.3000.4", at 0x7f5efb4e7e2b, in 
ERROR: #3    Source "/home/mgerhardy/dev/oss/engine/src/modules/core/Assert.cpp:28", in coreAssertionHandler
ERROR:          26: static SDL_assert_state coreAssertionHandler(const SDL_assert_data *data, void *userdata) {
ERROR:          27: 	if (data->trigger_count <= 1 && data->always_ignore == 0) {
ERROR:       >  28: 		core_stacktrace();
ERROR:          29: 	}
ERROR:          30: 	const SDL_AssertState state = SDL_GetDefaultAssertionHandler()(data, userdata);
ERROR:          31: 	if (state == SDL_ASSERTION_RETRY) {
ERROR: #2    Source "/home/mgerhardy/dev/oss/engine/src/modules/core/Assert.cpp:113", in core_stacktrace
ERROR:         110: #elif defined(HAVE_BACKWARD)
ERROR:         111: 	std::ostringstream os;
ERROR:         112: 	backward::StackTrace st;
ERROR:       > 113: 	st.load_here(32);
ERROR:         114: 	backward::Printer printer;
ERROR:         115: 	printer.print(st, os);
ERROR:         116: 	std::string str = os.str();
ERROR: #1    Source "/home/mgerhardy/dev/oss/engine/contrib/libs/backward/backward.h:879", in load_here
ERROR:         876:       return 0;
ERROR:         877:     }
ERROR:         878:     _stacktrace.resize(depth);
ERROR:       > 879:     size_t trace_cnt = details::unwind(callback(*this), depth);
ERROR:         880:     _stacktrace.resize(trace_cnt);
ERROR:         881:     skip_n_firsts(0);
ERROR:         882:     return size();
ERROR: #0    Source "/home/mgerhardy/dev/oss/engine/contrib/libs/backward/backward.h:861", in unwind<backward::StackTraceImpl<backward::system_tag::linux_tag>::callback>
ERROR:         859: template <typename F> size_t unwind(F f, size_t depth) {
ERROR:         860:   Unwinder<F> unwinder;
ERROR:       > 861:   return unwinder(f, depth);
ERROR:         862: }
ERROR:         863: 
ERROR:         864: } // namespace details
WARN: 

Assertion failure at localMatrix (/home/mgerhardy/dev/oss/engine/src/modules/scenegraph/SceneGraphTransform.cpp:224), triggered 1 time:
  'dirty flag: 2'


@mgerhardy mgerhardy added the bug label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant