Closed mgerhardy closed 6 months ago
create new scene right click in scene panel - create-reference right click on new reference node and select convert-to-model
result:
ERROR: (0) Stack trace (most recent call last):
ERROR: (0) #31 Source "/home/mgerhardy/dev/oss/engine/src/modules/app/App.cpp", line 300, in onFrame
ERROR: (0) 297: core_trace_scoped(AppOnBeforeRunning);
ERROR: (0) 298: onBeforeRunning();
ERROR: (0) 299: }
ERROR: (0) > 300: const AppState state = onRunning();
ERROR: (0) 301: if (_nextState != AppState::Cleanup && _nextState != AppState::Destroy) {
ERROR: (0) 302: _nextState = state;
ERROR: (0) 303: }
ERROR: (0) #30 Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/VoxEdit.cpp", line 516, in onRunning
ERROR: (0) 513: }
ERROR: (0) 514:
ERROR: (0) 515: app::AppState VoxEdit::onRunning() {
ERROR: (0) > 516: app::AppState state = Super::onRunning();
ERROR: (0) 517: if (state != app::AppState::Running) {
ERROR: (0) 518: return state;
ERROR: (0) 519: }
ERROR: (0) #29 Source "/home/mgerhardy/dev/oss/engine/src/modules/ui/IMGUIApp.cpp", line 362, in onRunning
ERROR: (0) 360: app::AppState IMGUIApp::onRunning() {
ERROR: (0) 361: core_trace_scoped(IMGUIAppOnRunning);
ERROR: (0) > 362: app::AppState state = Super::onRunning();
ERROR: (0) 363:
ERROR: (0) 364: if (state != app::AppState::Running) {
ERROR: (0) 365: return state;
ERROR: (0) #28 Source "/home/mgerhardy/dev/oss/engine/src/modules/video/WindowedApp.cpp", line 137, in onRunning
ERROR: (0) 134: }
ERROR: (0) 135: }
ERROR: (0) 136: while (SDL_PollEvent(&event)) {
ERROR: (0) > 137: quit |= handleSDLEvent(event);
ERROR: (0) 138: }
ERROR: (0) 139:
ERROR: (0) 140: if (quit) {
ERROR: (0) #27 Source "/home/mgerhardy/dev/oss/engine/src/modules/ui/IMGUIApp.cpp", line 137, in handleSDLEvent
ERROR: (0) 134: }
ERROR: (0) 135:
ERROR: (0) 136: bool IMGUIApp::handleSDLEvent(SDL_Event &event) {
ERROR: (0) > 137: const bool state = Super::handleSDLEvent(event);
ERROR: (0) 138: if (event.type == SDL_WINDOWEVENT) {
ERROR: (0) 139: ImGui_ImplSDL2_ProcessEvent(&event);
ERROR: (0) 140: }
ERROR: (0) #26 Source "/home/mgerhardy/dev/oss/engine/src/modules/video/WindowedApp.cpp", line 93, in handleSDLEvent
ERROR: (0) 90: // fallthrough
ERROR: (0) 91: default: {
ERROR: (0) 92: core_trace_scoped(WindowedAppEventHandler);
ERROR: (0) > 93: const bool running = core::Singleton<io::EventHandler>::getInstance().handleEvent(event);
ERROR: (0) 94: if (!running) {
ERROR: (0) 95: return true;
ERROR: (0) 96: }
ERROR: (0) #25 Source "/home/mgerhardy/dev/oss/engine/src/modules/video/EventHandler.cpp", line 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) #24 Source "/home/mgerhardy/dev/oss/engine/src/modules/video/EventHandler.cpp", line 340, in keyPress
ERROR: (0) 338: void EventHandler::keyPress(int32_t key, int16_t modifier) {
ERROR: (0) 339: for (IEventObserver* observer : _observers) {
ERROR: (0) > 340: observer->onKeyPress(key, modifier);
ERROR: (0) 341: }
ERROR: (0) 342: }
ERROR: (0) #23 Source "/home/mgerhardy/dev/oss/engine/src/modules/ui/IMGUIApp.cpp", line 110, in onKeyPress
ERROR: (0) 107: }
ERROR: (0) 108:
ERROR: (0) 109: bool IMGUIApp::onKeyPress(int32_t key, int16_t modifier) {
ERROR: (0) > 110: if (!Super::onKeyPress(key, modifier) ||
ERROR: (0) 111: (core::bindingContext() == core::BindingContext::UI && key == SDLK_ESCAPE)) {
ERROR: (0) 112: SDL_Event ev{};
ERROR: (0) 113: ev.type = SDL_KEYDOWN;
ERROR: (0) #22 Source "/home/mgerhardy/dev/oss/engine/src/modules/video/WindowedApp.cpp", line 241, in onKeyPress
ERROR: (0) 238: }
ERROR: (0) 239:
ERROR: (0) 240: bool WindowedApp::onKeyPress(int32_t key, int16_t modifier) {
ERROR: (0) > 241: return handleKeyPress(key, modifier);
ERROR: (0) 242: }
ERROR: (0) 243:
ERROR: (0) 244: core::String WindowedApp::getKeyBindingsString(const char *cmd) const {
ERROR: (0) #21 Source "/home/mgerhardy/dev/oss/engine/src/modules/video/WindowedApp.cpp", line 210, in handleKeyPress
ERROR: (0) 207: }
ERROR: (0) 208:
ERROR: (0) 209: bool WindowedApp::handleKeyPress(int32_t key, int16_t modifier, uint16_t count) {
ERROR: (0) > 210: return _keybindingHandler.execute(key, modifier, true, nowSeconds(), count);
ERROR: (0) 211: }
ERROR: (0) 212:
ERROR: (0) 213: bool WindowedApp::onMouseWheel(int32_t x, int32_t y) {
ERROR: (0) #20 Source "/home/mgerhardy/dev/oss/engine/src/modules/util/KeybindingHandler.cpp", line 468, in execute
ERROR: (0) 465: }
ERROR: (0) 466: }
ERROR: (0) 467: }
ERROR: (0) > 468: const bool retVal = executeCommands(key, modifier, nowSeconds, count);
ERROR: (0) 469: if (retVal) {
ERROR: (0) 470: _pressedModifierMask |= (uint32_t)code;
ERROR: (0) 471: }
ERROR: (0) #19 Source "/home/mgerhardy/dev/oss/engine/src/modules/util/KeybindingHandler.cpp", line 110, in executeCommands
ERROR: (0) 108: bool KeyBindingHandler::executeCommands(int32_t key, int16_t modifier, double nowSeconds, uint16_t count) {
ERROR: (0) 109: // first try to find an exact match of key and current held modifiers
ERROR: (0) > 110: if (executeCommandsForBinding(_bindings, key, modifier, nowSeconds, count)) {
ERROR: (0) 111: return true;
ERROR: (0) 112: }
ERROR: (0) 113: // 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) #18 Source "/home/mgerhardy/dev/oss/engine/src/modules/util/KeybindingHandler.cpp", line 98, in executeCommandsForBinding
ERROR: (0) 95: Log::trace("Failed to execute the tracking command %s", command.c_str());
ERROR: (0) 96: continue;
ERROR: (0) 97: }
ERROR: (0) > 98: if (command::Command::execute(command)) {
ERROR: (0) 99: Log::trace("The command was executed");
ERROR: (0) 100: handled = true;
ERROR: (0) 101: } else {
ERROR: (0) #17 Source "/home/mgerhardy/dev/oss/engine/src/modules/command/Command.cpp", line 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) #16 Source "/home/mgerhardy/dev/oss/engine/src/modules/command/Command.cpp", line 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) #15 Source "/usr/include/c++/13/bits/std_function.h", line 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) #14 Source "/usr/include/c++/13/bits/std_function.h", line 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) #13 Source "/usr/include/c++/13/bits/invoke.h", line 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) #12 Source "/usr/include/c++/13/bits/invoke.h", line 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) #11 Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-util/SceneManager.cpp", line 1966, in operator()
ERROR: (0) 1963: }).setHelp("Undo your last step");
ERROR: (0) 1964:
ERROR: (0) 1965: command::Command::registerCommand("redo", [&] (const command::CmdArgs& args) {
ERROR: (0) >1966: redo();
ERROR: (0) 1967: }).setHelp("Redo your last step");
ERROR: (0) 1968:
ERROR: (0) 1969: command::Command::registerCommand("rotate", [&] (const command::CmdArgs& args) {
ERROR: (0) #10 Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-util/SceneManager.cpp", line 997, in redo
ERROR: (0) 994: bool SceneManager::redo(int n) {
ERROR: (0) 995: Log::debug("redo %i steps", n);
ERROR: (0) 996: for (int i = 0; i < n; ++i) {
ERROR: (0) > 997: if (!doRedo()) {
ERROR: (0) 998: return false;
ERROR: (0) 999: }
ERROR: (0) 1000: }
ERROR: (0) #9 Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-util/SceneManager.cpp", line 1021, in doRedo
ERROR: (0) 1018: }
ERROR: (0) 1019:
ERROR: (0) 1020: const MementoState& s = _mementoHandler.redo();
ERROR: (0) >1021: return mementoStateExecute(s, true);
ERROR: (0) 1022: }
ERROR: (0) 1023:
ERROR: (0) 1024: bool SceneManager::saveSelection(const io::FileDescription& file) {
ERROR: (0) #8 Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-util/SceneManager.cpp", line 960, in mementoStateExecute
ERROR: (0) 957: return mementoTransform(s);
ERROR: (0) 958: }
ERROR: (0) 959: if (s.type == MementoType::Modification) {
ERROR: (0) > 960: return mementoModification(s);
ERROR: (0) 961: }
ERROR: (0) 962: if (isRedo) {
ERROR: (0) 963: if (s.type == MementoType::SceneNodeRemoved) {
ERROR: (0) #7 Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-util/SceneManager.cpp", line 886, in mementoModification
ERROR: (0) 883: delete v;
ERROR: (0) 884: }
ERROR: (0) 885: }
ERROR: (0) > 886: MementoData::toVolume(node->volume(), s.data);
ERROR: (0) 887: node->setName(s.name);
ERROR: (0) 888: if (s.pivot.hasValue()) {
ERROR: (0) 889: node->setPivot(*s.pivot.value());
ERROR: (0) #6 Source "/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-util/MementoHandler.cpp", line 151, in toVolume
ERROR: (0) 148: if (mementoData._buffer == nullptr) {
ERROR: (0) 149: return false;
ERROR: (0) 150: }
ERROR: (0) > 151: core_assert_always(volume != nullptr);
ERROR: (0) 152: if (volume == nullptr) {
ERROR: (0) 153: return false;
ERROR: (0) 154: }
ERROR: (0) #5 Source "/home/mgerhardy/dev/oss/engine/src/modules/core/Assert.cpp", line 34, in core_report_assert
ERROR: (0) 31: }
ERROR: (0) 32:
ERROR: (0) 33: bool core_report_assert(AssertData &data, const char *file, int line, const char *function) {
ERROR: (0) > 34: const SDL_AssertState state = SDL_ReportAssertion((SDL_AssertData *)&data, function, file, line);
ERROR: (0) 35: if (state == SDL_ASSERTION_RETRY) {
ERROR: (0) 36: return true;
ERROR: (0) 37: }
ERROR: (0) #4 Object "/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0.2800.5", at 0x7f3494483c4b, in
ERROR: (0) #3 Source "/home/mgerhardy/dev/oss/engine/src/modules/core/Assert.cpp", line 20, in coreAssertionHandler
ERROR: (0) 18: static SDL_assert_state coreAssertionHandler(const SDL_assert_data *data, void *userdata) {
ERROR: (0) 19: if (data->trigger_count <= 1 && data->always_ignore == 0) {
ERROR: (0) > 20: core_stacktrace();
ERROR: (0) 21: }
ERROR: (0) 22: const SDL_AssertState state = SDL_GetDefaultAssertionHandler()(data, userdata);
ERROR: (0) 23: if (state == SDL_ASSERTION_RETRY) {
ERROR: (0) #2 Source "/home/mgerhardy/dev/oss/engine/src/modules/core/Assert.cpp", line 80, in core_stacktrace
ERROR: (0) 77: #else
ERROR: (0) 78: std::ostringstream os;
ERROR: (0) 79: backward::StackTrace st;
ERROR: (0) > 80: st.load_here(32);
ERROR: (0) 81: backward::Printer printer;
ERROR: (0) 82: printer.print(st, os);
ERROR: (0) 83: std::string str = os.str();
ERROR: (0) #1 Source "/home/mgerhardy/dev/oss/engine/contrib/libs/backward/backward.h", line 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", line 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 toVolume (/home/mgerhardy/dev/oss/engine/src/tools/voxedit/modules/voxedit-util/MementoHandler.cpp:151), triggered 1 time:
'volume != nullptr'
b428eb1dc935ee89041472ed1b75b89511e1cbee
the original issue for a fresh loaded model is not yet fixed as the memento states are quite different here.