-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin Crashes REAPER on macOS #54
Comments
Sadly, I don't own a mac, so I cannot help you very much with this :( I have just updated DPF. This might help, but I'm not sure. You can pull the latest changes by running the following command:
Then, you can try compiling the plugin again. After that, if the plugin still crashes, I suppose the next step would be to build the plugin with debug symbols (pass |
Just did the pull and submodule update, then ran a |
actually it also so the same for all other plugin types on macos. For some reason unknown to me the gui isn't created on macos. I also compiled DPF exmaple projects and they ran fine. |
@hpfmn Thank you for the info!
Can you run the JACK standalone on MacOS? If so, when you run the program from the command line, does it show any errors in the console?
Just to be sure, are you loading the plugin inside REAPER? I'd be curious to know if the issue is specific to this plugin host, or if the issue can be reproduced in other hosts as well. |
I'm debuging with the jack standalon and comparing it to the cairo example from DPF because I don't really know DPF's architecure. It seems at least the draw call of the spectrogram gets issued and there is also a scrolltexture. But for some reason unclear to me the window never gets created. While stepping it also gets stuck in line 1223 of 'mac.m'
while the cairo example doesn't get stuck |
Also it seems the PUGL event loop is running because I get messages like these (when running a debug build)
|
If I comment out all that spectrogram stuff in Spectrogram.cpp the window appears:
My theory is that some events get created here and that causes to never leave the event loop or something |
Ah more concrete the |
The problem seems to be that setAbsoluteY also does a repaint. Commeting this out in
|
But now it seems to be missing the second texture. (There is always a black part between the the spectrogram) Also clicking in the window leads to a crash/freeze |
Interesting! This seems to be caused by memory errors. Perhaps the spectrogram is reading / writing memory out of bounds. Is |
Oh sorry - the missing texture was a mistake on my side. I did add some return statements to find problematic parts and forgot to remove one of them. So the rendering of the second texture was skipped. I'll try to post a PR Workaround later today |
If you click in the spectrogram also repaint() is called of part of the StatusBar setNoteText/setFrequencyText/setLeftText and it seems the freeze happens everytime repaint is called inside the onNanoDisplay of Spectrogram |
I checked it is also the same with DPF filehandling example that also uses NanoVG. |
I asked in DPF what the intended behaviour is |
Seems to be an issue at pugl. falkTX tries to work around it and will create an issue at pugl if he doesn't succeed |
Oh, I see! Thank you for the detective work :) I haven't checked, but the repaints might behave differently if we switch to the 'develop' branch of DPF (we are currently on the main branch). There are a lot of new commits on this branch: https://github.com/DISTRHO/DPF/tree/develop If the issue can still be reproduced on the develop branch, then yes, I think we'll simply have to wait for a fix. (With that said, I suppose it would be good idea to refactor the spectrogram's code so that the scrolling logic occurs outside of One option could be to extract the contents of |
I've refactored the code a little bit. The UI should not call |
Yes this fixes the issues for me :) |
I compiled the plugin with:
MACOS=true BUILD_VST2=true BUILD_LV2=true BUILD_JACK=false make
I then copied the bin/wolf-spectrum.lv2 to /Library/Audio/Plug-Ins/LV2/ and the bin/wolf-spectrum.vst to /Library/Audio/Plug-Ins/VST/
When I launch REAPER and add the plugin on a track, it crashes (with both the LV2 and the VST).
I am running REAPER v6.47 and macOS 12.2.1. My other LV2 and VST plugins work fine.
The text was updated successfully, but these errors were encountered: