Miserlou / RJModules

Various modules for VCV Rack
https://github.com/Miserlou/RJModules
MIT License
98 stars 18 forks source link

Widener crashes on Windows due to use of std::random_device #80

Closed SteveRussell33 closed 3 years ago

SteveRussell33 commented 3 years ago

Adding the module from the Rack browser crashes:

[31.171 fatal src/main.cpp:45] Fatal signal 22. Stack trace:
34: ZN4rack6logger3logENS0_5LevelEPKciS3_z 0x4796d1
33: raise 0xdc2babe0
32: abort 0xdc2bf1e0
31: ZN9__gnu_cxx27__verbose_terminate_handlerEv 0x6fc5f170
30: ZN10__cxxabiv111__terminateEPFvvE 0x6fc581b0
29: ZSt9terminatev 0x6fd302b0
28: _cxa_throw 0x6fd39080
27: ZSt21__throw_runtime_errorPKc 0x6fd3a640
26: ZNSt13random_device7_M_initERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE 0x6fcf10f0
25: ZN7WidenerC1Ev 0xb1d0c560
24: ZZN4rack11createModelI7Widener13WidenerWidgetEEPNS_6plugin5ModelERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEN6TModel18createModuleWidgetEv 0xb1d34350
23: ZN2Mb2v115ModelZoomSliderD0Ev 0x173d3f58
22: ZN2Mb2v18ModelBox8onButtonERKN4rack5event6ButtonE 0x173e1c30
21: ZN4rack6widget6Widget8onButtonERKNS_5event6ButtonE 0x7783e0
20: ZN4rack6widget6Widget8onButtonERKNS_5event6ButtonE 0x7783e0
19: ZN4rack6widget6Widget8onButtonERKNS_5event6ButtonE 0x7783e0
18: ZN4rack2ui12ScrollWidget8onButtonERKNS_5event6ButtonE 0x4a80b4
17: ZN4rack6widget12OpaqueWidget8onButtonERKNS_5event6ButtonE 0x173ed150
16: ZN2Mb14BrowserOverlay8onButtonERKN4rack5event6ButtonE 0x173d7d70
15: ZN4rack6widget12OpaqueWidget8onButtonERKNS_5event6ButtonE 0x7776c0
14: ZN4rack5event5State12handleButtonENS_4math3VecEiii 0x476498
13: ZN4rack7updater17isUpdateAvailableEv 0x488fae
12: glfwPlatformUnlockMutex 0x4da9ae
11: CallWindowProcW 0xdcb1e460
10: CallWindowProcW 0xdcb1e460
9: glPushClientAttrib 0xb2e09e80
8: CallWindowProcW 0xdcb1e460
7: DispatchMessageW 0xdcb1e040
6: glfwPlatformPollEvents 0x4de066
5: ZN4rack6Window3runEv 0x48a0fc
4: main 0x786370
3: main 0x786370
2: main 0x786370
1: BaseThreadInitThunk 0xdb867020
0: RtlUserThreadStart 0xdcd42630

This is due to the same issue I found here https://github.com/bogaudio/BogaudioModules/issues/132

This line https://github.com/Miserlou/RJModules/blob/7e6d4e9360c107f3d0ea411c0d99aae35839e123/src/Widener.cpp#L46 can be removed as it's unused anyway. Doing so and the module loads fine.