Skip to content
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

CLAP wrapped VST3 crashing most hosts since CLAP 1.2.0 update #229

Closed
tas-from-planet-u-he opened this issue Feb 20, 2024 · 8 comments · Fixed by #230
Closed

CLAP wrapped VST3 crashing most hosts since CLAP 1.2.0 update #229

tas-from-planet-u-he opened this issue Feb 20, 2024 · 8 comments · Fixed by #230

Comments

@tas-from-planet-u-he
Copy link

Tested mainly on M1 Sonoma. Reaper also tested on Win 10, same there.
Since the moment Alex updated our u-he plugin builds to CLAP 1.2.0, the wrapped VST3 version will instantly crash most hosts.

The actual CLAP plugin works fine.
The real VST3 works fine.
Only the wrapped VST3 crashes.

It works ok in Bitwig 5.1.2 and Live 11.3.2.

Cubase 13 and Reaper 7 crash as soon as the wrapped VST3 is being loaded.
Studio One might load it, but crashes when quitting the host.
And FL Studio doesn't successfully scan it anymore, so it cannot be loaded there.

The plugin always logs this at the moment of the crash:
[CLAP] It is wrong to query the latency before the plugin is activated, because if the plugin dosen't know the sample rate, it can't know the number of samples of latency.

Since most released u-he plugins are not using CLAP 1.2.0 yet, there is only one plugin you can currently test this with, the Zebralette 3 public beta on KVR (revision 15573), which can be downloaded here:

https://www.kvraudio.com/forum/viewtopic.php?t=607153

@baconpaul
Copy link
Collaborator

baconpaul commented Feb 20, 2024

So the reason for this is twofold

  1. The latency check was incorrect in the helpers code. That is fixed here free-audio/clap-helpers@244adf1 and I guess I should merge that into main. @Trinitou / @abique thoughts on clap-helpers next becoming main?

  2. At u-he you have compiled with clap helpers at terminate checking level rather than log. While that's useful for debugging I don't recommend it for production plugins. You probably want to rebuild with your production clap helpers usage set to log not terminate.

@abique
Copy link
Collaborator

abique commented Feb 20, 2024

Yes let's merge.

@baconpaul
Copy link
Collaborator

OK I'll move next to main right now.

@baconpaul
Copy link
Collaborator

And done

@defiantnerd
Copy link
Collaborator

So, this was actually a clap-helper issue?

@baconpaul
Copy link
Collaborator

The clap helper was wrong when querying latency at startup, yes. David @ u-he found that and I merged it above.

The u-he plugs are coded with zero-tolerance terminate-on-error settings. So this error made them crash rather than log.

I strongly suggest the u-he plugins in release mode not use the terminate-on-problem mode. But also they should pull clap-helpers to head and rebuild.

@Schroedingers-Cat
Copy link
Contributor

I strongly suggest the u-he plugins in release mode not use the terminate-on-problem mode.

The specific plugin binary discussed here is a beta build which does intentionally crash on any misbehaviors, like our internal builds. Final release builds, as you suggest, already just log the misbehavior.

So, this was actually a clap-helper issue?
...
But also they should pull clap-helpers to head and rebuild.

We already had the fix in our repo before it was merged into CLAP's official repository and still had the misbehavior crash. Turns out there's a similar problem to the helper issue within the CLAP wrapper. I created #230 to fix this.

@baconpaul
Copy link
Collaborator

Wonderful! Thank you for upstreaming these fixes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants