surge-synthesizer / surge-rack

Take Surge and factor it into modules for VCV Rack
GNU General Public License v3.0
168 stars 13 forks source link

adding WaveShaper crashes Rack 2.4.1 mac arm64 #987

Closed fractalgee closed 9 months ago

fractalgee commented 9 months ago

MacOS 14.2.1, Rack 2.4.1 Pro arm64, SurgeXT version XT 2.2.beta.0-nightly-66e31c2

trying to add a WaveShaper to the patch from module browser crashes Rack with

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   plugin.dylib                           0x122a6d340 sst::surgext_rack::waveshaper::ui::WaveshaperPlotWidget::recalcPath() + 220
1   plugin.dylib                           0x122a6d30c sst::surgext_rack::waveshaper::ui::WaveshaperPlotWidget::recalcPath() + 168
2   plugin.dylib                           0x122a6d21c non-virtual thunk to sst::surgext_rack::waveshaper::ui::WaveshaperPlotWidget::onStyleChanged() + 36
3   plugin.dylib                           0x122a806e4 sst::surgext_rack::style::XTStyle::notifyStyleListeners() + 40
4   plugin.dylib                           0x122a7c824 sst::surgext_rack::widgets::XTModuleWidget::resetStyleCouplingToModule() + 260
5   plugin.dylib                           0x122a6954c sst::surgext_rack::waveshaper::ui::WaveshaperWidget::WaveshaperWidget(sst::surgext_rack::waveshaper::Waveshaper*) + 2424
6   plugin.dylib                           0x122a74c6c rack::plugin::Model* rack::createModel<sst::surgext_rack::waveshaper::Waveshaper, sst::surgext_rack::waveshaper::ui::WaveshaperWidget>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>)::TModel::createModuleWidget(rack::engine::Module*) + 88
7   libRack.dylib                          0x10566fa44 rack::app::browser::chooseModel(rack::plugin::Model*) + 408
8   libRack.dylib                          0x105678b7c rack::app::browser::ModelBox::onButton(rack::widget::Widget::ButtonEvent const&) + 204
9   libRack.dylib                          0x10566f518 rack::widget::Widget::onButton(rack::widget::Widget::ButtonEvent const&) + 212
10  libRack.dylib                          0x10566f518 rack::widget::Widget::onButton(rack::widget::Widget::ButtonEvent const&) + 212
11  libRack.dylib                          0x10566f518 rack::widget::Widget::onButton(rack::widget::Widget::ButtonEvent const&) + 212
12  libRack.dylib                          0x1056e2888 rack::ui::ScrollWidget::onButton(rack::widget::Widget::ButtonEvent const&) + 308
13  libRack.dylib                          0x10566f260 rack::app::browser::Browser::onButton(rack::widget::Widget::ButtonEvent const&) + 212
14  libRack.dylib                          0x1056e1474 rack::ui::MenuOverlay::onButton(rack::widget::Widget::ButtonEvent const&) + 212
15  libRack.dylib                          0x1056696b0 rack::widget::OpaqueWidget::onButton(rack::widget::Widget::ButtonEvent const&) + 212
16  libRack.dylib                          0x1056eaffc rack::widget::EventState::handleButton(rack::math::Vec, int, int, int) + 344
17  libRack.dylib                          0x1056ed8e4 rack::window::mouseButtonCallback(GLFWwindow*, int, int, int) + 188
18  AppKit                                 0x18a7a32d0 -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 3472
19  AppKit                                 0x18a72e79c -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 364
20  AppKit                                 0x18a72e45c -[NSWindow(NSEventRouting) sendEvent:] + 284
21  AppKit                                 0x18addb9f4 -[NSApplication(NSEventRouting) sendEvent:] + 1604
22  libRack.dylib                          0x1057b3e60 _glfwPollEventsCocoa + 140
23  libRack.dylib                          0x1056ee0b0 rack::window::Window::step() + 144
24  libRack.dylib                          0x1056ee008 rack::window::Window::run() + 40
25  Rack                                   0x1048067e0 main + 3428
26  dyld                                   0x1869c90e0 start + 2360
baconpaul commented 9 months ago

OK no crash here so wonder what it is. I built that hash locally. Let me try and download the nightly and see, but can't get to it today.

Do you get the same problem if you go back to 2.2.2 from library? There's almost no difference between that and the nightly.

Thanks as always for the report!

fractalgee commented 9 months ago

it's always crashing if I try to add the waveshaper from the nightly (added the Sine VCO first). The rest is my battle-tested template patch, never an issue with that one. I will try to downgrade and let you know if still a crash.

On Mon, 29 Jan 2024 at 14:45, Paul @.***> wrote:

OK no crash here so wonder what it is. I built that hash locally. Let me try and download the nightly and see, but can't get to it today.

Do you get the same problem if you go back to 2.2.2 from library? There's almost no difference between that and the nightly.

Thanks as always for the report!

— Reply to this email directly, view it on GitHub https://github.com/surge-synthesizer/surge-rack/issues/987#issuecomment-1914726185, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7FMABC534D4SUAITWVTT3YQ6RYBAVCNFSM6AAAAABCPDDNNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJUG4ZDMMJYGU . You are receiving this because you authored the thread.Message ID: @.***>

fractalgee commented 9 months ago

Just tried the 2.2.2 from library and that one adds fine. So something amiss with the one from the latest nightly

baconpaul commented 9 months ago

Hmmm I just grabbed the latest nightly and can add a wave shaper no problem. and 222 -> nightly doesn't have a wave shaper code change I see. Although let me peek at that diff

fractalgee commented 9 months ago

could it be some lower-level change that triggers the crash in the Waveshaper, rather than code change in the module itself?

On Mon, 29 Jan 2024 at 14:51, Paul @.***> wrote:

Hmmm I just grabbed the latest nightly and can add a wave shaper no problem. and 222 -> nightly doesn't have a wave shaper code change I see. Although let me peek at that diff

— Reply to this email directly, view it on GitHub https://github.com/surge-synthesizer/surge-rack/issues/987#issuecomment-1914737316, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7FMAB6Y2N2HVHM2OZP2XTYQ6SN3AVCNFSM6AAAAABCPDDNNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJUG4ZTOMZRGY . You are receiving this because you authored the thread.Message ID: @.***>

baconpaul commented 9 months ago

Yeah so almost nothing has changed in the waveshaper. And it works fine here.

Let me touch the readme to kick another build and see if that helps?

fractalgee commented 9 months ago

sure, I can test easy enough to see if it still blows up. Note that the only other thing that was currently crashing was a couple of the Harmonic Anomalies modules, which are being investigated. Everything else appears rock solid so I doubt things mess on my end, but alas, one never does know for sure....

On Mon, 29 Jan 2024 at 14:53, Paul @.***> wrote:

Yeah so almost nothing has changed in the waveshaper. And it works fine here.

Let me touch the readme to kick another build and see if that helps?

— Reply to this email directly, view it on GitHub https://github.com/surge-synthesizer/surge-rack/issues/987#issuecomment-1914741804, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7FMAAEOGJFNL5PURNLYWDYQ6SXPAVCNFSM6AAAAABCPDDNNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJUG42DCOBQGQ . You are receiving this because you authored the thread.Message ID: @.***>

baconpaul commented 9 months ago

OK well I committed a change to the README which should make a new nightly

If that one also crashes in your environment then i will do some pondering! but since the library version works you can at least work around for now.

Thanks!

fractalgee commented 9 months ago

I;ll check in an hour and test, will let you know if still issues... Living on the bleeding edge is my usual modus operandi though ;)

On Mon, 29 Jan 2024 at 15:01, Paul @.***> wrote:

OK well I committed a change to the README which should make a new nightly

If that one also crashes in your environment then i will do some pondering! but since the library version works you can at least work around for now.

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/surge-synthesizer/surge-rack/issues/987#issuecomment-1914754723, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7FMAAASTIUVBF45SP3X6TYQ6TSPAVCNFSM6AAAAABCPDDNNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJUG42TINZSGM . You are receiving this because you authored the thread.Message ID: @.***>

fractalgee commented 9 months ago

Ok, the latest nightly now works fine. Must have been some gremlins .....

baconpaul commented 9 months ago

cool. Thanks as always!