ryukau / VSTPlugins

Uhhyou Plugins VST 3 repository.
https://ryukau.github.io/VSTPlugins/
GNU General Public License v3.0
327 stars 12 forks source link

MembraneSynth crash on Linux running Renoise #24

Closed powerjungle closed 1 year ago

powerjungle commented 1 year ago
Renoise LOG> Vst3Plugs: Instantiating: /home/music-plugins/vst3/MembraneSynth.vst3...
Renoise LOG> Vst3Plugs: Failed to suggest speaker arrangement (not critical)
"/home/renoise/.config/UhhyouPlugins/style/style.json" is not regular file or doesn't exist.
Renoise LOG> Vst3Window: Creating a new main window...
Renoise LOG> Vst3Window: Setting window properties...
Renoise LOG> Vst3Window: Creating plugin parent window...
Renoise LOG> Vst3Window: Mapping the window...
Renoise LOG> Vst3Window: Attaching the plugin to the plugin parent window...
Renoise LOG> Vst3Window: Plugin requested new Windowsize 710, 480
Renoise LOG> Vst3Window: Plugin window attached via _XEMBED_INFO
Renoise LOG> Vst3Window: Closing the Editor...
Renoise LOG> Vst3Window: Editor was closed
Renoise LOG> Vst3Window: Creating a new main window...
Renoise LOG> Vst3Window: Setting window properties...
Renoise LOG> Vst3Window: Creating plugin parent window...
Renoise LOG> Vst3Window: Mapping the window...
Renoise LOG> Vst3Window: Attaching the plugin to the plugin parent window...
Renoise LOG> Vst3Window: Plugin requested new Windowsize 710, 480
Renoise LOG> Vst3Window: Plugin window attached via _XEMBED_INFO
Renoise LOG> Vst3Window: Closing the Editor...
Renoise LOG> Vst3Window: Editor was closed
Renoise LOG> Vst3Window: Creating a new main window...
Renoise LOG> Vst3Window: Setting window properties...
Renoise LOG> Vst3Window: Creating plugin parent window...
Renoise LOG> Vst3Window: Mapping the window...
Renoise LOG> Vst3Window: Attaching the plugin to the plugin parent window...
Renoise LOG> CrashLog: Caught signal: SIGSEGV (11) ...
Renoise LOG> Vst3Plugs: Plugin 'Uhhyou: MembraneSynth' crashed while calling one of its plugin view functions!
Renoise LOG> Vst3Window: FAILED to attach plugin editor (4)
Renoise LOG> Vst3Window: Closing the Editor...
Renoise LOG> Vst3Window: Editor was closed
Renoise LOG> Warning Message: Ouch. The VST3 plugin 'Uhhyou: MembraneSynth (from Uhhyou)' crashed in event, function or class: 'IPluginView', Thread: 'GUI'
Renoise LOG> Warning Message: IMPORTANT: This is a fatal error. Please save the current document under a !new! name to prevent losing important data. Renoise will silently ignore any following errors from this plug-in.
Renoise LOG> Warning Message: DO NOT IGNORE THIS ERROR; DO NOT CONTINUE USING THE PLUGIN. THIS CAN DESTROY YOUR SONG OR CAUSE OTHER RANDOM CRASHES AND PROBLEMS!
Renoise LOG> Warning Message: It's most likely that this is a bug in the VST3 plugin, so please also report this problem to the authors of this plugin in order to get the problem fixed!

I am running:

powerjungle commented 1 year ago

MaybeSnare and BasicLimiter crash as well for me. I suspect that all of them will. The weird thing is that the GUI loads properly, but after opening it 2-3 times, then the crash happens. The plugins work properly until then as well.

ryukau commented 1 year ago

Hi, @powerjungle. Thanks for the report.

If you are using VSTGUI 4.11.0 or earlier, following issue might be the cause.

If you are already on VSTGUI 4.11.1 or later, then I'd suggest to build VST 3 SDK example plugins, and see if they also crash on Renoise or not.

If the issue is specific to my plugins, I probably can't fix the bug by myself, because of the lack of X.Org knowledge and my faulty Linux environment. I need help here.

In case the crash is specific to my plugins, Following parts of code are probably related.

RunLoop is copied from VSTGUI.


For reference, this comment is mostly same as the following one.

powerjungle commented 1 year ago

Okay so I cloned: https://github.com/steinbergmedia/vst3sdk.git I checked out: HEAD detached at v3.7.7_build_19 Meaning VSTGUI should be v4.12.0, gotten from: vst3sdk/vstgui4/vstgui/lib/vstguibase.h I ran: git submodule update --init --checkout --recursive After which I created the "build" directory, cd to it and ran: cmake ../ && cmake --build . --config Release I fixed the "limits" problem from here: https://github.com/steinbergmedia/vst3sdk/issues/99 After which it built correctly, then I grabbed "hostchecker.vst3" and ran it in my DAW. It had the same problem as your plugins, meaning it's either something from my OS or from Renoise.

This is the log:

Renoise LOG> Vst3Window: Creating a new main window...
Renoise LOG> Vst3Window: Setting window properties...
Renoise LOG> Vst3Window: Creating plugin parent window...
Renoise LOG> Vst3Window: Mapping the window...
Renoise LOG> Vst3Window: Attaching the plugin to the plugin parent window...
Renoise LOG> Vst3Window: Plugin requested new Windowsize 600, 400
Renoise LOG> Vst3Window: Plugin window attached via _XEMBED_INFO
Renoise LOG> Vst3Window: Closing the Editor...
/home/programming/Development/git-repos/vst3sdk/vstgui4/vstgui/lib/platform/linux/x11timer.cpp:38: Assertion 'runLoop' failed. Timer only works of run loop was set
renoise: /home/programming/Development/git-repos/vst3sdk/vstgui4/vstgui/lib/vstguidebug.cpp:124: void VSTGUI::doAssert(const char*, const char*, const char*, const char*): Assertion `false' failed.
Renoise LOG> CrashLog: Caught signal: SIGABRT (6) ...
Renoise LOG> Vst3Plugs: Plugin 'Steinberg Media Technologies: VST3 Host Checker' crashed while calling one of its plugin view functions!
Renoise LOG> Vst3Window: Editor was closed
powerjungle commented 1 year ago

I couldn't test in Reaper, because "hostchecker.vst3" doesn't even show up there for some reason.

ryukau commented 1 year ago

For makeshift mitigation, it's possible to turn off GUI by commenting out following part of code.

The number of parameters is relatively small for MembraneSynth. So it might be usable with fallback GUI provided by host.

powerjungle commented 1 year ago

That's a good idea, but I would like to investigate the GUI problem further. If I find anything, I will add it to this issue. I will close it now, since it's not a problem from your code probably.

ryukau commented 1 year ago

To @powerjungle,

It appears that there are 2 different bugs that crash VST 3 plugins on Renoise. I found this while investigating issue #28.

One is specific to Uhhyou Plugins, and fixed at aa58b94 on develop branch. This commit might solve the issue on your environment.

Other is a bug on VSTGUI, and it's probably related to the use of bitmap. This one is causing the crash of VST 3 SDK example plugins, but it's not related to Uhhyou Plugins.

Sorry for inconvenience.