Open mgerhardy opened 3 days ago
This one is in undo after rotating three time around y (but with unpublished code that also modified the transforms)
INFO: (0) Load file Robo.vengi with 10 model nodes and 0 point nodes
ERROR: (0) Stack trace (most recent call last):
ERROR: (0) #31 Source "/home/mgerhardy/dev/oss/engine/src/modules/app/App.cpp:204", in startMainLoop
ERROR: (0) 201: emscripten_set_main_loop(runFrameEmscripten, 0, 1);
ERROR: (0) 202: #else
ERROR: (0) 203: while (AppState::InvalidAppState != _curState) {
ERROR: (0) > 204: onFrame();
ERROR: (0) 205: }
ERROR: (0) 206: #endif
ERROR: (0) 207: return _exitCode;
ERROR: (0) #30 Source "/home/mgerhardy/dev/oss/engine/src/modules/app/App.cpp:372", in onFrame
ERROR: (0) 369: core_trace_scoped(AppOnBeforeRunning);
ERROR: (0) 370: onBeforeRunning();
ERROR: (0) 371: }
ERROR: (0) > 372: const AppState state = onRunning();
ERROR: (0) 373: if (_nextState != AppState::Cleanup && _nextState != AppState::Destroy) {
ERROR: (0) 374: _nextState = state;
ERROR: (0) 375: }
ERROR: (0) #29 Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/VoxEdit.cpp:536", in onRunning
ERROR: (0) 533: }
ERROR: (0) 534:
ERROR: (0) 535: app::AppState VoxEdit::onRunning() {
ERROR: (0) > 536: app::AppState state = Super::onRunning();
ERROR: (0) 537: if (state != app::AppState::Running) {
ERROR: (0) 538: return state;
ERROR: (0) 539: }
ERROR: (0) #28 Source "/home/mgerhardy/dev/oss/engine/src/modules/ui/IMGUIApp.cpp:594", in onRunning
ERROR: (0) 592: app::AppState IMGUIApp::onRunning() {
ERROR: (0) 593: core_trace_scoped(IMGUIAppOnRunning);
ERROR: (0) > 594: app::AppState state = Super::onRunning();
ERROR: (0) 595:
ERROR: (0) 596: if (state != app::AppState::Running) {
ERROR: (0) 597: return state;
ERROR: (0) #27 Source "/home/mgerhardy/dev/oss/engine/src/modules/video/WindowedApp.cpp:139", in onRunning
ERROR: (0) 136: }
ERROR: (0) 137: }
ERROR: (0) 138: while (SDL_PollEvent(&event)) {
ERROR: (0) > 139: quit |= handleSDLEvent(event);
ERROR: (0) 140: }
ERROR: (0) 141:
ERROR: (0) 142: if (quit) {
ERROR: (0) #26 Source "/home/mgerhardy/dev/oss/engine/src/modules/ui/IMGUIApp.cpp:146", in handleSDLEvent
ERROR: (0) 143: }
ERROR: (0) 144:
ERROR: (0) 145: bool IMGUIApp::handleSDLEvent(SDL_Event &event) {
ERROR: (0) > 146: const bool state = Super::handleSDLEvent(event);
ERROR: (0) 147: if (event.type != SDL_MOUSEMOTION && event.type != SDL_MOUSEWHEEL && event.type != SDL_MOUSEBUTTONUP &&
ERROR: (0) 148: event.type != SDL_MOUSEBUTTONDOWN && event.type != SDL_TEXTINPUT && event.type != SDL_KEYUP &&
ERROR: (0) 149: event.type != SDL_KEYDOWN) {
ERROR: (0) #25 Source "/home/mgerhardy/dev/oss/engine/src/modules/video/WindowedApp.cpp:95", in handleSDLEvent
ERROR: (0) 92: // fallthrough
ERROR: (0) 93: default: {
ERROR: (0) 94: core_trace_scoped(WindowedAppEventHandler);
ERROR: (0) > 95: const bool running = core::Singleton<video::EventHandler>::getInstance().handleEvent(event);
ERROR: (0) 96: if (!running) {
ERROR: (0) 97: return true;
ERROR: (0) 98: }
ERROR: (0) #24 Source "/home/mgerhardy/dev/oss/engine/src/modules/video/EventHandler.cpp:60", in handleEvent
ERROR: (0) 57: keyRelease((int32_t) event.key.keysym.sym, (int16_t) event.key.keysym.mod);
ERROR: (0) 58: break;
ERROR: (0) 59: case SDL_KEYDOWN:
ERROR: (0) > 60: keyPress((int32_t) event.key.keysym.sym, (int16_t) event.key.keysym.mod);
ERROR: (0) 61: break;
ERROR: (0) 62: case SDL_MOUSEMOTION: {
ERROR: (0) 63: if (event.motion.which == SDL_TOUCH_MOUSEID) {
ERROR: (0) #23 Source "/home/mgerhardy/dev/oss/engine/src/modules/video/EventHandler.cpp:343", in keyPress
ERROR: (0) 341: void EventHandler::keyPress(int32_t key, int16_t modifier) {
ERROR: (0) 342: for (IEventObserver* observer : _observers) {
ERROR: (0) > 343: observer->onKeyPress(key, modifier);
ERROR: (0) 344: }
ERROR: (0) 345: }
ERROR: (0) #22 Source "/home/mgerhardy/dev/oss/engine/src/modules/ui/IMGUIApp.cpp:119", in onKeyPress
ERROR: (0) 116: }
ERROR: (0) 117:
ERROR: (0) 118: bool IMGUIApp::onKeyPress(int32_t key, int16_t modifier) {
ERROR: (0) > 119: if (!Super::onKeyPress(key, modifier) ||
ERROR: (0) 120: (core::bindingContext() == core::BindingContext::UI && key == SDLK_ESCAPE)) {
ERROR: (0) 121: SDL_Event ev{};
ERROR: (0) 122: ev.type = SDL_KEYDOWN;
ERROR: (0) #21 Source "/home/mgerhardy/dev/oss/engine/src/modules/video/WindowedApp.cpp:245", in onKeyPress
ERROR: (0) 242: }
ERROR: (0) 243:
ERROR: (0) 244: bool WindowedApp::onKeyPress(int32_t key, int16_t modifier) {
ERROR: (0) > 245: return handleKeyPress(key, modifier);
ERROR: (0) 246: }
ERROR: (0) 247:
ERROR: (0) 248: core::String WindowedApp::getKeyBindingsString(const char *cmd) const {
ERROR: (0) #20 Source "/home/mgerhardy/dev/oss/engine/src/modules/video/WindowedApp.cpp:214", in handleKeyPress
ERROR: (0) 211: }
ERROR: (0) 212:
ERROR: (0) 213: bool WindowedApp::handleKeyPress(int32_t key, int16_t modifier, uint16_t count) {
ERROR: (0) > 214: return _keybindingHandler.execute(key, modifier, true, nowSeconds(), count);
ERROR: (0) 215: }
ERROR: (0) 216:
ERROR: (0) 217: bool WindowedApp::onMouseWheel(float x, float y) {
ERROR: (0) #19 Source "/home/mgerhardy/dev/oss/engine/src/modules/util/KeybindingHandler.cpp:469", in execute
ERROR: (0) 466: }
ERROR: (0) 467: }
ERROR: (0) 468: }
ERROR: (0) > 469: const bool retVal = executeCommands(key, modifier, nowSeconds, count);
ERROR: (0) 470: if (retVal) {
ERROR: (0) 471: _pressedModifierMask |= (uint32_t)code;
ERROR: (0) 472: }
ERROR: (0) #18 Source "/home/mgerhardy/dev/oss/engine/src/modules/util/KeybindingHandler.cpp:111", in executeCommands
ERROR: (0) 109: bool KeyBindingHandler::executeCommands(int32_t key, int16_t modifier, double nowSeconds, uint16_t count) {
ERROR: (0) 110: // first try to find an exact match of key and current held modifiers
ERROR: (0) > 111: if (executeCommandsForBinding(_bindings, key, modifier, nowSeconds, count)) {
ERROR: (0) 112: return true;
ERROR: (0) 113: }
ERROR: (0) 114: // if no such exact match was found, try to remove those modifiers that should be ignored because they e.g. have their own bound command
ERROR: (0) #17 Source "/home/mgerhardy/dev/oss/engine/src/modules/util/KeybindingHandler.cpp:99", in executeCommandsForBinding
ERROR: (0) 96: Log::trace("Failed to execute the tracking command %s", command.c_str());
ERROR: (0) 97: continue;
ERROR: (0) 98: }
ERROR: (0) > 99: if (command::Command::execute(command)) {
ERROR: (0) 100: Log::trace("The command was executed");
ERROR: (0) 101: handled = true;
ERROR: (0) 102: } else {
ERROR: (0) #16 Source "/home/mgerhardy/dev/oss/engine/src/modules/command/Command.cpp:154", in execute
ERROR: (0) 151: args.push_back(commandTokenizer.next());
ERROR: (0) 152: Log::trace("arg: '%s'", args.back().c_str());
ERROR: (0) 153: }
ERROR: (0) > 154: if (execute(c, args)) {
ERROR: (0) 155: ++executed;
ERROR: (0) 156: }
ERROR: (0) 157: }
ERROR: (0) #15 Source "/home/mgerhardy/dev/oss/engine/src/modules/command/Command.cpp:195", in execute
ERROR: (0) 192: cmd = i->second;
ERROR: (0) 193: }
ERROR: (0) 194: Log::trace("execute %s with %i arguments", command.c_str(), (int)args.size());
ERROR: (0) > 195: cmd._func(args);
ERROR: (0) 196: return true;
ERROR: (0) 197: }
ERROR: (0) #14 Source "/usr/include/c++/13/bits/std_function.h:591", in operator()
ERROR: (0) 588: {
ERROR: (0) 589: if (_M_empty())
ERROR: (0) 590: __throw_bad_function_call();
ERROR: (0) > 591: return _M_invoker(_M_functor, std::forward<_ArgTypes>(__args)...);
ERROR: (0) 592: }
ERROR: (0) 593:
ERROR: (0) 594: #if __cpp_rtti
ERROR: (0) #13 Source "/usr/include/c++/13/bits/std_function.h:290", in _M_invoke
ERROR: (0) 287: static _Res
ERROR: (0) 288: _M_invoke(const _Any_data& __functor, _ArgTypes&&... __args)
ERROR: (0) 289: {
ERROR: (0) > 290: return std::__invoke_r<_Res>(*_Base::_M_get_pointer(__functor),
ERROR: (0) 291: std::forward<_ArgTypes>(__args)...);
ERROR: (0) 292: }
ERROR: (0) #12 Source "/usr/include/c++/13/bits/invoke.h:111", in __invoke_r<void, voxedit::SceneManager::construct()::<lambda(const command::CmdArgs&)>&, const core::DynamicArray<core::String, 32>&>
ERROR: (0) 108: using __type = typename __result::type;
ERROR: (0) 109: using __tag = typename __result::__invoke_type;
ERROR: (0) 110: if constexpr (is_void_v<_Res>)
ERROR: (0) > 111: std::__invoke_impl<__type>(__tag{}, std::forward<_Callable>(__fn),
ERROR: (0) 112: std::forward<_Args>(__args)...);
ERROR: (0) 113: else
ERROR: (0) 114: return std::__invoke_impl<__type>(__tag{},
ERROR: (0) #11 Source "/usr/include/c++/13/bits/invoke.h:61", in __invoke_impl<void, voxedit::SceneManager::construct()::<lambda(const command::CmdArgs&)>&, const core::DynamicArray<core::String, 32>&>
ERROR: (0) 58: template<typename _Res, typename _Fn, typename... _Args>
ERROR: (0) 59: constexpr _Res
ERROR: (0) 60: __invoke_impl(__invoke_other, _Fn&& __f, _Args&&... __args)
ERROR: (0) > 61: { return std::forward<_Fn>(__f)(std::forward<_Args>(__args)...); }
ERROR: (0) 62:
ERROR: (0) 63: template<typename _Res, typename _MemFun, typename _Tp, typename... _Args>
ERROR: (0) 64: constexpr _Res
ERROR: (0) #10 Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-util/SceneManager.cpp:1967", in operator()
ERROR: (0) 1964: }).setHelp(_("Cut selection"));
ERROR: (0) 1965:
ERROR: (0) 1966: command::Command::registerCommand("undo", [&] (const command::CmdArgs& args) {
ERROR: (0) >1967: undo();
ERROR: (0) 1968: }).setHelp(_("Undo your last step"));
ERROR: (0) 1969:
ERROR: (0) 1970: command::Command::registerCommand("redo", [&] (const command::CmdArgs& args) {
ERROR: (0) #9 Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-util/SceneManager.cpp:969", in undo
ERROR: (0) 966: bool SceneManager::undo(int n) {
ERROR: (0) 967: Log::debug("undo %i steps", n);
ERROR: (0) 968: for (int i = 0; i < n; ++i) {
ERROR: (0) > 969: if (!doUndo()) {
ERROR: (0) 970: return false;
ERROR: (0) 971: }
ERROR: (0) 972: }
ERROR: (0) #8 Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-util/SceneManager.cpp:992", in doUndo
ERROR: (0) 989: return false;
ERROR: (0) 990: }
ERROR: (0) 991:
ERROR: (0) > 992: const MementoState& s = _mementoHandler.undo();
ERROR: (0) 993: return mementoStateExecute(s, false);
ERROR: (0) 994: }
ERROR: (0) #7 Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-util/MementoHandler.cpp:418", in undo
ERROR: (0) 415: const MementoState& s = state();
ERROR: (0) 416: --_statePosition;
ERROR: (0) 417: if (s.type == MementoType::Modification) {
ERROR: (0) > 418: return undoModification(s);
ERROR: (0) 419: } else if (s.type == MementoType::SceneNodeTransform) {
ERROR: (0) 420: return undoTransform(s);
ERROR: (0) 421: } else if (s.type == MementoType::SceneNodePaletteChanged) {
ERROR: (0) #6 Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-util/MementoHandler.cpp:320", in undoModification
ERROR: (0) 317: }
ERROR: (0) 318: }
ERROR: (0) 319:
ERROR: (0) > 320: core_assert_msg(
ERROR: (0) 321: _states[0].type == MementoType::Modification ||
ERROR: (0) 322: (_states[0].referenceId != InvalidNodeId && _states[0].type == MementoType::SceneNodeAdded),
ERROR: (0) 323: "Expected to have a modification or scene node added with a reference state at the beginning, but got %i",
ERROR: (0) #5 Source "/home/mgerhardy/dev/oss/engine/src/modules/core/Assert.cpp:68", in core_assert_impl_message
ERROR: (0) 65: SDL_vsnprintf(buf, bufSize - 1, format, args);
ERROR: (0) 66: va_end(args);
ERROR: (0) 67: data.condition = buf; /* also let it work for following calls */
ERROR: (0) > 68: const SDL_AssertState state = SDL_ReportAssertion((SDL_AssertData *)&data, function, file, line);
ERROR: (0) 69: if (state == SDL_ASSERTION_BREAK) {
ERROR: (0) 70: SDL_TriggerBreakpoint();
ERROR: (0) 71: }
ERROR: (0) #4 Object "/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.3000.3", at 0x7f7efb185e2b, in
ERROR: (0) #3 Source "/home/mgerhardy/dev/oss/engine/src/modules/core/Assert.cpp:28", in coreAssertionHandler
ERROR: (0) 26: static SDL_assert_state coreAssertionHandler(const SDL_assert_data *data, void *userdata) {
ERROR: (0) 27: if (data->trigger_count <= 1 && data->always_ignore == 0) {
ERROR: (0) > 28: core_stacktrace();
ERROR: (0) 29: }
ERROR: (0) 30: const SDL_AssertState state = SDL_GetDefaultAssertionHandler()(data, userdata);
ERROR: (0) 31: if (state == SDL_ASSERTION_RETRY) {
ERROR: (0) #2 Source "/home/mgerhardy/dev/oss/engine/src/modules/core/Assert.cpp:113", in core_stacktrace
ERROR: (0) 110: #elif defined(HAVE_BACKWARD)
ERROR: (0) 111: std::ostringstream os;
ERROR: (0) 112: backward::StackTrace st;
ERROR: (0) > 113: st.load_here(32);
ERROR: (0) 114: backward::Printer printer;
ERROR: (0) 115: printer.print(st, os);
ERROR: (0) 116: std::string str = os.str();
ERROR: (0) #1 Source "/home/mgerhardy/dev/oss/engine/contrib/libs/backward/backward.h:879", in load_here
ERROR: (0) 876: return 0;
ERROR: (0) 877: }
ERROR: (0) 878: _stacktrace.resize(depth);
ERROR: (0) > 879: size_t trace_cnt = details::unwind(callback(*this), depth);
ERROR: (0) 880: _stacktrace.resize(trace_cnt);
ERROR: (0) 881: skip_n_firsts(0);
ERROR: (0) 882: return size();
ERROR: (0) #0 Source "/home/mgerhardy/dev/oss/engine/contrib/libs/backward/backward.h:861", in unwind<backward::StackTraceImpl<backward::system_tag::linux_tag>::callback>
ERROR: (0) 859: template <typename F> size_t unwind(F f, size_t depth) {
ERROR: (0) 860: Unwinder<F> unwinder;
ERROR: (0) > 861: return unwinder(f, depth);
ERROR: (0) 862: }
ERROR: (0) 863:
ERROR: (0) 864: } // namespace details
WARN:
Assertion failure at undoModification (/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-util/MementoHandler.cpp:320), triggered 1 time:
'Expected to have a modification or scene node added with a reference state at the beginning, but got 2'
write crash to file: /home/mgerhardy/.local/share/vengi/voxedit/crash.log
WARN:
imported chr_knight2 - undo until only one node is left in the scene, redo to trigger the assert