j4s0n-c / trowaSoft-VCV

trowaSoft Modules for VCV Rack
Other
105 stars 17 forks source link

cvOSCcv development version can crash Rack 2 #60

Closed jpnielsen closed 1 month ago

jpnielsen commented 2 years ago

I have a bug report.

Deleting the cvOSCcv module on the right, when it's "Enabled", crashes Rack2 pro standalone.

image
[20125.482 fatal adapters/standalone.cpp:49 fatalSignalHandler] Fatal signal 11. Stack trace:
30:  0x0
29:  0x0
28: _C_specific_handler 0x7ffd78c2acc0
27: _chkstk 0x7ffd7a7281d0
26: RtlRestoreContext 0x7ffd7a6b5160
25: KiUserExceptionDispatcher 0x7ffd7a7272e0
24: ZN4rack6widget6Widget11removeChildEPS1_ 0x7ffd1a7eff30
23: ZN4rack3app17ModuleLightWidgetD2Ev 0x7ffd1a7b3270
22: ZN15ColorValueLightD0Ev 0x7ffd04e99860
21: ZN4rack6widget6Widget13clearChildrenEv 0x7ffd1a7f0040
20: ZN4rack3app12ModuleWidgetD2Ev 0x7ffd1a7b4d40
19: ZN11oscCVWidgetD0Ev 0x7ffd04e94600
18: ZZN4rack14createMenuItemINS_2ui8MenuItemEEEPT_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_St8functionIFvvEEbbEN4Item8onActionERKNS_6widget6Widget11ActionEventE 0x7ffd1ac96710
17: ZN4rack2ui8MenuItem8doActionEb 0x7ffd1a7e7160
16: ZN4rack6widget10EventState12handleButtonENS_4math3VecEiii 0x7ffd1a7ec790
15: ZN4rack6window3Svg4loadERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE 0x7ffd1a7f15e0
14: glfwPlatformUnlockMutex 0x7ffd1a82eaa0
13: CallWindowProcW 0x7ffd796d1810
12: CallWindowProcW 0x7ffd796d1810
11: wglSwapBuffers 0x7ffd616a3120
10: CallWindowProcW 0x7ffd796d1810
9: DispatchMessageW 0x7ffd796d0bf0
8: glfwPlatformPollEvents 0x7ffd1a8324a0
7: ZN4rack6window6Window4stepEv 0x7ffd1a7f2970
6: ZN4rack6window6Window3runEv 0x7ffd1a7f32a0
5: ZN4rack6window6Window3runEv 0x7ffd1a7f32a0
4: ZN4rack6window6Window3runEv 0x7ffd1a7f32a0
3: ZN4rack6window6Window3runEv 0x7ffd1a7f32a0
2: ZN4rack6window6Window3runEv 0x7ffd1a7f32a0
1: BaseThreadInitThunk 0x7ffd799454d0
0: RtlUserThreadStart 0x7ffd7a684830

[20125.487 fatal adapters/standalone.cpp:49 fatalSignalHandler] Fatal signal 22. Stack trace:
47:  0x0
46: raise 0x7ffd78c2d9c0
45: abort 0x7ffd78c320b0
44: ZN9__gnu_cxx27__verbose_terminate_handlerEv 0x7ffd4cd0f4c0
43: ZN10__cxxabiv111__terminateEPFvvE 0x7ffd4cd05cd0
42: ZSt9terminatev 0x7ffd4cdf78d0
41: stbi_write_png 0x7ffd1a780600
40: gai_strerrorW 0x7ffd1ac15810
39: gai_strerrorW 0x7ffd1ac15810
38: gai_strerrorW 0x7ffd1ac15810
37: RtlActivateActivationContextUnsafeFast 0x7ffd7a6bfb10
36: LdrShutdownProcess 0x7ffd7a6d4040
35: RtlExitUserProcess 0x7ffd7a6d3f70
34: ExitProcess 0x7ffd7994c660
33: exit 0x7ffd78c3d0c0
32: initterm_e 0x7ffd78c3d570
31: raise 0x7ffd78c2d9c0
30: raise 0x7ffd78c2d9c0
29: raise 0x7ffd78c2d9c0
28: _C_specific_handler 0x7ffd78c2acc0
27: _chkstk 0x7ffd7a7281d0
26: RtlRestoreContext 0x7ffd7a6b5160
25: KiUserExceptionDispatcher 0x7ffd7a7272e0
24: ZN4rack6widget6Widget11removeChildEPS1_ 0x7ffd1a7eff30
23: ZN4rack3app17ModuleLightWidgetD2Ev 0x7ffd1a7b3270
22: ZN15ColorValueLightD0Ev 0x7ffd04e99860
21: ZN4rack6widget6Widget13clearChildrenEv 0x7ffd1a7f0040
20: ZN4rack3app12ModuleWidgetD2Ev 0x7ffd1a7b4d40
19: ZN11oscCVWidgetD0Ev 0x7ffd04e94600
18: ZZN4rack14createMenuItemINS_2ui8MenuItemEEEPT_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_St8functionIFvvEEbbEN4Item8onActionERKNS_6widget6Widget11ActionEventE 0x7ffd1ac96710
17: ZN4rack2ui8MenuItem8doActionEb 0x7ffd1a7e7160
16: ZN4rack6widget10EventState12handleButtonENS_4math3VecEiii 0x7ffd1a7ec790
15: ZN4rack6window3Svg4loadERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE 0x7ffd1a7f15e0
14: glfwPlatformUnlockMutex 0x7ffd1a82eaa0
13: CallWindowProcW 0x7ffd796d1810
12: CallWindowProcW 0x7ffd796d1810
11: wglSwapBuffers 0x7ffd616a3120
10: CallWindowProcW 0x7ffd796d1810
9: DispatchMessageW 0x7ffd796d0bf0
8: glfwPlatformPollEvents 0x7ffd1a8324a0
7: ZN4rack6window6Window4stepEv 0x7ffd1a7f2970
6: ZN4rack6window6Window3runEv 0x7ffd1a7f32a0
5: ZN4rack6window6Window3runEv 0x7ffd1a7f32a0
4: ZN4rack6window6Window3runEv 0x7ffd1a7f32a0
3: ZN4rack6window6Window3runEv 0x7ffd1a7f32a0
2: ZN4rack6window6Window3runEv 0x7ffd1a7f32a0
1: BaseThreadInitThunk 0x7ffd799454d0
0: RtlUserThreadStart 0x7ffd7a684830

Also, I changed TROWA_OSCCV_DEFAULT_SEND_HZ to 1000 Please make the default send freq a runtime configurable option.

Thank you for making these plugins available. I use them frequently, and recommend them in the community forum:

https://community.vcvrack.com/t/ui-your-opinion-and-advice-appreciated/15713/6 https://community.vcvrack.com/t/thinking-about-purchasing-the-es-9/16228/10 https://community.vcvrack.com/t/bring-in-measurements-from-a-digital-multimeter/14557

chichian commented 2 years ago

Hi. Sorry for the late reply. Thanks for the report. That is definitely not good...

We have tried to replicate this deleting both the sending (left) and the receiving (right) cvOSCcv modules and have not had it crash yet. It doesn't crash with the default send rate at 100 Hz or at 1000 Hz either.

I tried on the free version of VCV Rack (just using Fundamental modules with it). j4s0n tried on the Pro version with all the same modules in the image except for the scope you used.

What OS are you using? And do you have the save file for this patch? Are you able to consistently replicate this? Can you replicate it with just simple modules (like VCV Rack Fundamental, in case we don't have all the same modules)? If you could upload a save file where this happens for you, we can hopeful get it to crash on us too.

jpnielsen commented 2 years ago

I forgot to see your reply - sorry about that.

On windows 11 22H2 (OS Build 22621.521) - using Rack Free 2.1.2

I can reproduce it: load the attached patch.

image

enable both cvOSCcv modules (observe the waveforms on the scope) right-click the cvOSCcv module to the right + select delete = crash

No error is logged in log.txt the patch file: cvosccv-loop_WIP.zip

Thank you for adding the "Send Frequency / Hz" option.

chichian commented 2 years ago

Thanks. I will try to look at it later tonight, but I'm working on a different project now.

chichian commented 2 years ago

Hi. This has been fixed in the latest release v2.0.6 and should update in the library in the next week or so.