Closed SteveRussell33 closed 4 years ago
Similar problem: I'm on Manjaro Stable, loading the Euclidean module totally freezes Rack - and it renders thusly:
Same problem here W7
just in case - I confirm this problem for W7
Thanks for reporting this! Unfortunately, I'm on OSX and can't reproduce it! Does anybody have any ideas what might be causing this? W32 patches welcome..
Same result here on Windows 7: Consistent crash when I try to delete it. Perhaps whoever did the Windows build can help track down the problem?
I can't see anything obviously wrong with the lights, which is where the stackdump shows the problem.
It may well be a problem elsewhere which is overwriting memory and that then shows up on deallocation.
I would say that it doesn't look safe to me to be manipulating std::string objects in the engine thread (Euclidean::process) and reading them in the ui thread (EuclidianSmallStringDisplayWidget::draw). std::string is not threadsafe unless you ensure that only one thread is trying to access it at any one time.
Same on Win 8. It's impossible to delete it, and now a rather big patch is fucked.
Same on Win 8. It's impossible to delete it, and now a rather big patch is fucked.
I think you can get rid of it by opening the .vcv patch file in a text editor. Patches are stored as plain text. Find the module in the text and delete it. There may be more to the process than that -- I'm not an expert, so you'll need to investigate further before trying it. But I know the text file can be edited.
Still crashing as of https://github.com/Miserlou/RJModules/commit/641d95d7b5080d96d922c88967206311c8e997f3
Thread 1 received signal SIGTRAP, Trace/breakpoint trap. 0x00007ff85c498907 in ntdll!RtlpNtMakeTemporaryKey () from /c/WINDOWS/SYSTEM32/ntdll.dll (gdb) bt
at C:/msys64/mingw64/include/c++/9.2.0/ext/new_allocator.h:119
at C:/msys64/mingw64/include/c++/9.2.0/bits/alloc_traits.h:470
at C:/msys64/mingw64/include/c++/9.2.0/bits/stl_vector.h:351
at C:/msys64/mingw64/include/c++/9.2.0/bits/stl_vector.h:332
at C:/msys64/mingw64/include/c++/9.2.0/bits/stl_vector.h:680
I can confirm that deleting Euclidian crashes on my Ubuntu 16.04 as well. But at least I can compile and run that to try and dig into it a bit log.txt
I've raised a pull request with a fix.
acd24941be1b7ef2d2a1dfbc7300a31d96ac4e22 is good on Win 10.
Closing.
Deleting euclidian module from existing patch or selecting new patch option with euclidian module already added to patch causes crash.
GDB Stack trace:
Thread 1 received signal SIGTRAP, Trace/breakpoint trap. 0x00007ffc5d648907 in ntdll!RtlpNtMakeTemporaryKey () from /c/WINDOWS/SYSTEM32/ntdll.dll (gdb) n Single stepping until exit from function ntdll!RtlpNtMakeTemporaryKey, which has no line number information. 0x00007ffc5d600705 in ntdll!memset () from /c/WINDOWS/SYSTEM32/ntdll.dll (gdb) bt
0 0x00007ffc5d600705 in ntdll!memset () from /c/WINDOWS/SYSTEM32/ntdll.dll
1 0x00007ffc5d647794 in ntdll!RtlpNtMakeTemporaryKey () from /c/WINDOWS/SYSTEM32/ntdll.dll
2 0x00007ffc5d5ede5e in ntdll!memset () from /c/WINDOWS/SYSTEM32/ntdll.dll
3 0x00007ffc5d55286e in ntdll!RtlFreeHeap () from /c/WINDOWS/SYSTEM32/ntdll.dll
4 0x00007ffc5d0d9d0c in msvcrt!free () from /c/WINDOWS/System32/msvcrt.dll
5 0x000000000049d15b in gnu_cxx::new_allocator::deallocate (this=0xd46fec0, p=)
6 std::allocator_traits<std::allocator >::deallocate (a=..., n=, __p=)
7 std::_Vector_base<rack::engine::Light, std::allocator >::_M_deallocate (this=0xd46fec0, n=, p=)
8 std::_Vector_base<rack::engine::Light, std::allocator >::~_Vector_base (this=0xd46fec0, __in_chrg=)
9 std::vector<rack::engine::Light, std::allocator >::~vector (this=0xd46fec0, __in_chrg=)
10 rack::engine::Module::~Module (this=0xd46fe60, __in_chrg=) at src/engine/Module.cpp:12
11 0x00000000134ad362 in plugin!_ZN9EuclidianD0Ev () from /c/Program Files/VCV/v1/plugins-v1/RJModules/plugin.dll
12 0x0000000000492e68 in rack::app::ModuleWidget::setModule (module=0x0, this=0xd32af70) at src/app/ModuleWidget.cpp:422
13 rack::app::ModuleWidget::~ModuleWidget (this=0xd32af70, __in_chrg=) at src/app/ModuleWidget.cpp:250
14 0x000000001346cb07 in plugin!_ZN15EuclidianWidgetD0Ev () from /c/Program Files/VCV/v1/plugins-v1/RJModules/plugin.dll
15 0x000000000048edb3 in rack::app::RackWidget::clear (this=0xd43d640) at src/app/RackWidget.cpp:173
16 0x0000000000487f29 in rack::PatchManager::reset (this=0xd43dc50) at src/patch.cpp:58
17 0x00000000004881c3 in rack::PatchManager::resetDialog (this=0xd43dc50) at src/patch.cpp:82
18 0x00000000004926c8 in rack::app::Scene::onHoverKey (this=0xd43dcd0, e=...) at src/app/Scene.cpp:82
19 0x00000000004590d7 in rack::event::State::handleKey (this=0xd352d90, pos=..., key=, key@entry=78, scancode=scancode@entry=49, action=action@entry=1,
20 0x0000000000459c7e in rack::keyCallback (win=, key=78, scancode=49, action=1, mods=34) at src/window.cpp:192
21 0x00000000004d9692 in windowProc (hWnd=0xf05cc, uMsg=256, wParam=78, lParam=3211265) at C:/_Projects/VCVRack/V1/Rack/dep/glfw/src/win32_window.c:765
22 0x00007ffc5a97c906 in USER32!DispatchMessageW () from /c/WINDOWS/System32/USER32.dll
23 0x00007ffc5a97c1eb in USER32!CallWindowProcW () from /c/WINDOWS/System32/USER32.dll
24 0x00007ffc3deb1639 in glPushClientAttrib () from /c/WINDOWS/SYSTEM32/OPENGL32.dll
25 0x00007ffc5a97c906 in USER32!DispatchMessageW () from /c/WINDOWS/System32/USER32.dll
26 0x00007ffc5a97c422 in USER32!DispatchMessageW () from /c/WINDOWS/System32/USER32.dll
27 0x00000000004db53e in _glfwPlatformPollEvents () at C:/_Projects/VCVRack/V1/Rack/dep/glfw/src/win32_window.c:1923
28 0x00000000004d485a in glfwPollEvents () at C:/_Projects/VCVRack/V1/Rack/dep/glfw/src/window.c:1072
29 0x0000000000459f36 in rack::Window::run (this=0xd352e80) at src/window.cpp:352
30 0x0000000000783d9d in main (argc=, argv=) at src/main.cpp:203