wjakob / instant-meshes

Interactive field-aligned mesh generator
Other
5.14k stars 591 forks source link

Crash when loading application state #31

Closed lemairecarl closed 8 years ago

lemairecarl commented 8 years ago

Steps

Using 64-bit binary found on GitHub
  1. Load this mesh;
  2. Solve orientation and position fields;
  3. Extract mesh;
  4. Save application state.
    Using build: Visual Studio 2015 / Win32 / Debug
  5. Load previously saved application state.

The reason why I'm not using my own build for saving the application state is that my build crashes when saving the application state. I get the same output as below in the console.

Result

Instant Meshes crashes; a popup says: "Abort() has been called".

This is outputted in the console:

Caught exception in event handler: bad allocation at end of load

Callstack

Instant Meshes.exe!issue_debug_notification(const wchar_t * const message) Line 125 C++
Instant Meshes.exe!__acrt_report_runtime_error(const wchar_t * message) Line 142    C++
Instant Meshes.exe!abort() Line 51  C++
Instant Meshes.exe!nanogui::Screen::mouseButtonCallbackEvent(int button, int action, int modifiers) Line 501    C++
Instant Meshes.exe!nanogui::Screen::{ctor}::__l2::<lambda>(GLFWwindow * w, int button, int action, int modifiers) Line 166  C++
Instant Meshes.exe!void <lambda>(GLFWwindow *, int, int, int)::<lambda_invoker_cdecl>(GLFWwindow * w, int button, int action, int modifiers) Line 166   C++
Instant Meshes.exe!_glfwInputMouseClick(_GLFWwindow * window, int button, int action, int mods) Line 192    C
Instant Meshes.exe!windowProc(HWND__ * hWnd, unsigned int uMsg, unsigned int wParam, long lParam) Line 434  C
[External Code] 
[Frames below may be incorrect and/or missing, no symbols loaded for user32.dll]    
Instant Meshes.exe!_glfwPlatformPollEvents() Line 1013  C
Instant Meshes.exe!_glfwPlatformWaitEvents() Line 1061  C
Instant Meshes.exe!glfwWaitEvents() Line 696    C
Instant Meshes.exe!nanogui::mainloop(int refresh) Line 102  C++
Instant Meshes.exe!main(int argc, char * * argv) Line 211   C++
[External Code] 
wjakob commented 8 years ago

Mysterious.. it looks like some kind of out of memory error, but that function (mouseButtonCallbackEvent) does not actually contain any memory allocations. Does the issue still occur when you are saving and loading the application state with the same codebase? (e.g. both with official build)