Miserlou / RJModules

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

Crash When Re-opening in 1.0.0+ #38

Closed Miserlou closed 5 years ago

Miserlou commented 5 years ago

This is annoying and I can't figure it out yet. Modules all work fine upon initial use, but when re-opening them, I get an immediate crash. TB:

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       EXC_I386_GPFLT

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.vcvrack.rack                0x0000000106c67ac5 rack::app::ParamWidget::step() + 21
1   com.vcvrack.rack                0x0000000106c9bf59 rack::widget::Widget::step() + 185
2   com.vcvrack.rack                0x0000000106c9bf59 rack::widget::Widget::step() + 185
3   com.vcvrack.rack                0x0000000106c9bf59 rack::widget::Widget::step() + 185
4   com.vcvrack.rack                0x0000000106c9bf59 rack::widget::Widget::step() + 185
5   com.vcvrack.rack                0x0000000106c9bf59 rack::widget::Widget::step() + 185
6   com.vcvrack.rack                0x0000000106c9bf59 rack::widget::Widget::step() + 185
7   com.vcvrack.rack                0x0000000106c97c44 rack::ui::ScrollWidget::step() + 20
8   com.vcvrack.rack                0x0000000106c6a809 rack::app::RackScrollWidget::step() + 649
9   com.vcvrack.rack                0x0000000106c9bf59 rack::widget::Widget::step() + 185
10  com.vcvrack.rack                0x0000000106c6ee3f rack::app::Scene::step() + 175
11  com.vcvrack.rack                0x0000000106c5015a rack::Window::run() + 1210
12  com.vcvrack.rack                0x0000000106c3b8e3 main + 1107
13  com.vcvrack.rack                0x0000000106bd3034 start + 52
cschol commented 5 years ago

Which module does this happen with? Not reproducible on Linux.

Miserlou commented 5 years ago

Well, that's good to hear I suppose.

To clarify, the whole program has to be reopened (either quit and re-opened or loaded from a .vcv file), not just readded to an existing session. Acid and RangeLFO seem to trigger it the most.

cschol commented 5 years ago

OK. I am seeing the issue on Windows. When restarting Rack it crashes with a Segmentation Fault. This is with the EssEff module.

cschol commented 5 years ago

I was able to extract a backtrace with the BigButton module using the signal trap in Rack:

[0.296 fatal src/main.cpp:40] Fatal signal 11. Stack trace:
22: ZN4rack10appDestroyEv 0x4561c5
21: gai_strerrorW 0x757ac0
20: _C_specific_handler 0x32f07fd0
19: _chkstk 0x332b4660
18: RtlWalkFrameChain 0x33213730
17: KiUserExceptionDispatcher 0x332b34c0
16: ZN4rack3app11ParamWidget4stepEv 0x498776
15: ZN4rack6widget6Widget4stepEv 0x4a6782
14: ZN4rack6widget6Widget4stepEv 0x4a6782
13: ZN4rack6widget6Widget4stepEv 0x4a6782
12: ZN4rack6widget6Widget4stepEv 0x4a6782
11: ZN4rack6widget6Widget4stepEv 0x4a6782
10: ZN4rack6widget6Widget4stepEv 0x4a6782
9: ZN4rack2ui12ScrollWidget4stepEv 0x4a265e
8: ZN4rack3app16RackScrollWidget4stepEv 0x48a890
7: ZN4rack6widget6Widget4stepEv 0x4a6782
6: ZN4rack3app5Scene4stepEv 0x4914a4
5: ZN4rack6Window3runEv 0x4587ca
4: main 0x7a01e0
3: main 0x7a01e0
2: main 0x7a01e0
1: BaseThreadInitThunk 0x328b7960
0: RtlUserThreadStart 0x3327a250

It looks like it has to do with the ParamWidget for the button and crashes in the step() function. This does not always happen and looks like to be timing related.

Miserlou commented 5 years ago

Thanks for looking into this. Do you think this should be reported in Rack itself, or is there just some line that I'm missing? I'm still using the migration headers, FWIW.

cschol commented 5 years ago

Not sure, to be honest. Maybe report it to Rack itself with the backtrace above and have Andrew see if there is anything obvious.

cschol commented 5 years ago

FYI, others are seeing similar issues: https://community.vcvrack.com/t/after-upgrade-to-v1-issues-with-paramquantity-and-paramwidget/3457/31

Miserlou commented 5 years ago

Related upstream issue: https://github.com/VCVRack/Rack/issues/1428

Miserlou commented 5 years ago

These should all be fixed now!