thomassidor / tinytricks

Tiny Tricks - Modules for VCV Rack
Other
26 stars 7 forks source link

Opening patch with SimplexOscillator in Rack 2 latest beta crashes Rack (Win10) #22

Closed fractalgee closed 4 months ago

fractalgee commented 3 years ago

Opening patch with SimplexOscillator in Rack 2 latest beta (Rack-2.git.219bbaf1) crashes Rack on Windows 10. Works fine until saved and the Rack restarted and patch reopened later. Will crash Rack hard. Only hint of what is crashing Rack is found in Event Log, log.txt never flushes when Rack crashes so is truncated and devoid of stack trace. 100% reproducible here. remove TinyTricks and all works fine again, patch opens without the SimplexOscillator fine. Interesting part from event log:

Faulting application name: Rack.exe, version: 0.0.0.0, time stamp: 0x00000000 Faulting module name: plugin.dll, version: 0.0.0.0, time stamp: 0x00000000 Exception code: 0xc0000005 Fault offset: 0x00000000000443f8 Faulting process id: 0x3b68 Faulting application start time: 0x01d7d3ea4ebce065 Faulting application path: C:\Program Files\VCV\Rack2\Rack.exe Faulting module path: E:\Documents\Rack2\plugins\TinyTricks\plugin.dll

sumpygump commented 3 years ago

Hi fractalgee, can you confirm what version of TinyTricks you are running? Did you build the plugin from source or download a release? Can you confirm the sample rate you are using? And if possible can you send the patch file? Also, I'd be curious if you could try it with a minimal patch: just save a new patch with the SimplexOscillator and nothing else and see if it produces the same result. If it works, maybe try attaching a patch cable to another module and save/reload the patch again to see under what conditions the module causes the crash.

fractalgee commented 3 years ago

I built it against SDK of same version 7 November after I saw somewhere you had ported them to v2. Didn't see any release there, so building it myself it was to test...

sumpygump commented 3 years ago

Okay, great thanks. I'm going to try to recreate on Windows. In case it makes a difference, what was the sample rate you were using in Rack?

fractalgee commented 3 years ago

48KHz in Rack and my audio interface at 512 byte buffer size

sumpygump commented 3 years ago

Thanks. I could not recreate the error. Here is the patch I made: image simplex1.zip Also attached patch file - rename the file from simplex1.zip to simplex1.vcv and try to load it and see if it crashes.

fractalgee commented 3 years ago

Will recreate patch (overwrote it sadly) and upload once I repro

On Fri, 12 Nov 2021 at 21:02, Jansen Price @.***> wrote:

Thanks. I could not recreate the error. Here is the patch I made: [image: image] https://user-images.githubusercontent.com/676007/141527453-f9b93ba1-19da-4b5e-b413-80aecadea3fc.png simplex1.zip https://github.com/thomassidor/tinytricks/files/7530109/simplex1.zip Also attached patch file - rename the file from simplex1.zip to simplex1.vcv and try to load it and see if it crashes.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thomassidor/tinytricks/issues/22#issuecomment-967447607, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7FMAHSUJ76HSLRBIVUCSTULVXF3ANCNFSM5HSBKVMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jocphx commented 2 years ago

I am experiencing exactly the same issue reported by @fractalgee Same details too: no traces in VCV's log, only in the Windows Event Viewer. I am running VCV Pro 2.0.6 and the latest release of your plugins, downloaded from VCV's library. The issue has been around for several months.

One more detail: when VCV crashes, and I relaunch it, I do not start from a clean patch, but rather attempting to reload it. Often the patch with the Simplex Osc. finally opens after 5 to 6 attempts, other times I discovered a strange behavior: if I load a version of the patch BEFORE adding Simplex Osc., then I can load the version that has the Simplex Osc.

I hope you really find what the issue is, because I love the timbre and quirks of your Simplex Osc., but so far, I had to replace it in every single patch I created with it.

A thought: it looks like there's a race condition somewhere, like say, Simplex Osc. is attempting to do something before VCV is ready for it, or the other way around.

Let me know if there's anything I can do to help you squashing this bug.

SimonAllenby commented 2 years ago

I'm seeing the same issue on Mac. For me, after much trial and error, it seems to be an issue with Simplex and the MindMeld mixer, which I use consistently, and also has something to do with the Audio driver - if one isn't selected in the patch.json, the patch loads fine, then you can select the audio interface and it all works as expected. The issue only occurs at file load, whether from a saved file or from autosave (adding it into a live patch works perfectly until you try and reload it). If the audio device/sample rate is set in the patch.json, the patch crashes on load. To be clear, there may well be other modules that cause the same behaviour in conjunction with Simplex - this is just the one I've found. I have a standard template with the mixer, FX on the sends etc. and working through it deleting things this is the combination that seems to cause it for me. As I always use the mixer, adding Simplex into any patch causes the issue for me - it's happened half a dozen times before I've bottomed out what's causing it today, and Simplex is the common factor. As @sumpygump noted, a simple patch doesn't exhibit the same behaviour.

OSX 11.6 Rack / VCV Core 2.0.6 Tiny Tricks 2.5.0 Mindmeld 2.0.9 Tested at 44.1 and 48 KHz

Example patch, which for me crashes every time it's loaded unless I manually deselect the Audio device in the patch.json:

image

Log with stack trace from that patch:

[5.444 info src/patch.cpp:321 loadAutosave] Loading autosave /Users/username/Documents/Rack2/autosave/patch.json
[5.448 info src/engine/Engine.cpp:1233 fromJson] Creating module MindMeld MixMasterJr
[5.449 info src/engine/Engine.cpp:1233 fromJson] Creating module Tiny Tricks Simplex Oscillator
[5.451 info src/engine/Engine.cpp:1233 fromJson] Creating module VCV Audio 2
[5.461 info src/rtaudio.cpp:51 RtAudioDevice] Creating RtAudio CoreAudio context
[5.463 info src/rtaudio.cpp:123 openStream] Opening RtAudio CoreAudio device 1: Built-in Output (0 in, 2 out, 48000 sample rate, 256 block size)
[5.466 info src/rtaudio.cpp:135 openStream] Starting RtAudio CoreAudio device 1
[5.567 info src/rtaudio.cpp:145 openStream] Opened RtAudio CoreAudio device 1
[5.569 info src/app/RackWidget.cpp:366 fromJson] Creating module widget MindMeld MixMasterJr
[5.582 info src/window/Svg.cpp:28 loadFile] Loaded SVG /Users/username/Documents/Rack2/plugins/MindMeldModular/res/dark/mixmaster-jr.svg
[5.583 info src/window/Svg.cpp:28 loadFile] Loaded SVG /Users/username/Documents/Rack2/plugins/MindMeldModular/res/comp/jack-poly.svg
[5.584 info src/window/Svg.cpp:28 loadFile] Loaded SVG /Applications/VCV Rack 2 Free.app/Contents/Resources/res/ComponentLibrary/TinyLight.svg
[5.585 info src/window/Svg.cpp:28 loadFile] Loaded SVG /Users/username/Documents/Rack2/plugins/MindMeldModular/res/comp/jack.svg
[5.586 info src/window/Svg.cpp:28 loadFile] Loaded SVG /Users/username/Documents/Rack2/plugins/MindMeldModular/res/comp/knob-grey-7.5.svg
[5.586 info src/window/Svg.cpp:28 loadFile] Loaded SVG /Users/username/Documents/Rack2/plugins/MindMeldModular/res/comp/knob-bg-7.5.svg
[5.587 info src/window/Svg.cpp:28 loadFile] Loaded SVG /Users/username/Documents/Rack2/plugins/MindMeldModular/res/comp/mixer/fader-channel-bg.svg
[5.588 info src/window/Svg.cpp:28 loadFile] Loaded SVG /Users/username/Documents/Rack2/plugins/MindMeldModular/res/comp/mixer/fader-channel.svg
[5.588 info src/window/Svg.cpp:28 loadFile] Loaded SVG /Users/username/Documents/Rack2/plugins/MindMeldModular/res/comp/mixer/mute-off.svg
[5.589 info src/window/Svg.cpp:28 loadFile] Loaded SVG /Users/username/Documents/Rack2/plugins/MindMeldModular/res/comp/mixer/mute-on.svg
[5.590 info src/window/Svg.cpp:28 loadFile] Loaded SVG /Users/username/Documents/Rack2/plugins/MindMeldModular/res/comp/mixer/solo-off.svg
[5.591 info src/window/Svg.cpp:28 loadFile] Loaded SVG /Users/username/Documents/Rack2/plugins/MindMeldModular/res/comp/mixer/solo-on.svg
[5.591 info src/window/Svg.cpp:28 loadFile] Loaded SVG /Users/username/Documents/Rack2/plugins/MindMeldModular/res/comp/mixer/group-minus.svg
[5.591 info src/window/Svg.cpp:28 loadFile] Loaded SVG /Users/username/Documents/Rack2/plugins/MindMeldModular/res/comp/mixer/group-minus-active.svg
[5.592 info src/window/Svg.cpp:28 loadFile] Loaded SVG /Users/username/Documents/Rack2/plugins/MindMeldModular/res/comp/mixer/group-plus.svg
[5.592 info src/window/Svg.cpp:28 loadFile] Loaded SVG /Users/username/Documents/Rack2/plugins/MindMeldModular/res/comp/mixer/group-plus-active.svg
[5.594 fatal adapters/standalone.cpp:49 fatalSignalHandler] Fatal signal 11. Stack trace:
7: Rack(fatalSignalHandler(int)+27)
6: libsystem_platform.dylib(_sigtramp+29)
5: ???(0x0+123145392352736)
4: libRack.dylib(rack::engine::Module::doProcess(rack::engine::Module::ProcessArgs const&)+143)
3: libRack.dylib(rack::engine::EngineWorker::run()+273)
2: libRack.dylib(void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, rack::engine::EngineWorker::start()::'lambda'()> >(void*)+45)
1: libsystem_pthread.dylib(_pthread_start+224)
0: libsystem_pthread.dylib(thread_start+15)
pgatt commented 2 years ago

Hi Thomas,

Is there any update on this one?

andyinabox commented 1 year ago

I'm having the same issue on a MacBook Pro (M1 processor). Too bad because I love this module!

baconpaul commented 4 months ago

This is fixed in d95b6cece8e57fbf2aa0eadb33ab5c7f32a31868 and we are working on getting it to the library.