Plugin causes Reaper to crash on opening

Hi folks. My plugin was working fine until a recent commit – now, whenever it’s loaded in Reaper it causes the DAW to crash immediately. Has anyone seen this behaviour before?

Update: I just tried the plugin as an AU in GarageBand and it works just fine. The standalone also works fine. So this seems to be a Reaper and/or VST3 problem.

Usually I’d post relevant code, but to be honest I’m not even sure where to begin. I’ve had a look at the git history and can’t see anything that looks out of place. Things I’ve tried:

(1) Clearing/deleting existing VST from disk and rebuilding.
(2) Clearing VST’s from Reaper, rescanning.
(3) Renaming the plugin, and giving it a new version number and company name.
(4) Renaming the VST file.
(5) Trying a different DAW (GarageBand as an AU → it works!).
(6) Uninstalling/re-installing Reaper (it doesn’t work).

I’m developing on Apple Silicon. But, been running plugins fine, including this one, until some last minute change – which I can’t manage to track.

My next step will be rebuilding the plugin from scratch – introducing one piece at a time until I can reproduce this behaviour. But I’d rather not go there if I don’t have to.

Here’s the repo if anyone’s interested (README is out of date, it’s now a phase-vocoder freeze type effect, work in progress, with a custom overlap-add buffer class.)

Happy to follow up with specific code if anyone has any leads. Much obliged!!!

Usually your first step when facing a crash is attaching a debugger to the DAW, especially Reaper is super debugging-friendly. When running under the debugger it will stop at the line of code where the crash happens and you can insect the state of all your variables etc. This enables you to gain real insight about the cause of the crash instead of randomly trying things. Note that it’s not unusual that some bugs in your code only appear when loading the plugin in a certain format as all the formats tend to call the plugin code slightly different, so the problem might only occur in a certain channel configuration, if certain timings are met or functions are called from certain threads.

If you don’t know how to interpret your debugging results just post your call stacks along with the relevant code where the crash happens here and maybe the community can help you spotting the problem :slight_smile:

1 Like

Eureka! It worked.

For those novices, like me wondering how to do this:

(1) Build your plugin in debug scheme.
(2) Open Reaper.
(3) In XCode: Debug → Attach to Process. Select Reaper.
(4) Access your plugin as usual.

It will break in the XCode debugger. Marvelous.

I’ll take if from here. Thank you so much again for your help!