DISTRHO / DPF

DISTRHO Plugin Framework
ISC License
672 stars 97 forks source link

CLAP validator errors #412

Closed dromer closed 1 year ago

dromer commented 1 year ago

Using https://github.com/free-audio/clap-validator I get several errors on my plugin: https://github.com/Wasted-Audio/wstd-eq

   - create-id-with-trailing-garbage: Attempts to create a plugin instance using an existing plugin ID with some extra text appended to the end. This should return a
       null pointer.
     FAILED: Creating a plugin instance with a non-existent plugin ID 'audio.wasted.wstd_eqx1' should return a null pointer, but it did not.

   - param-set-wrong-namespace: Sends events to the plugin with the 'CLAP_EVENT_PARAM_VALUE' event tyep but with a mismatching namespace ID. Asserts that the plugin's
       parameter values don't change.
     FAILED: Sending events with type ID 5 (CLAP_EVENT_PARAM_VALUE) and namespace ID 0xb33f to the plugin caused its parameter values to change. This should not happen.
       The plugin may not be checking the event's namespace ID.

   - state-buffered-streams: Performs the same state and parameter reproducibility check as in 'state-reproducibility-basic', but this time the plugin is only allowed to
       read a small prime number of bytes at a time when reloading and resaving the state.
     FAILED: After reloading the state by allowing the plugin to read at most 17 bytes at a time, the plugin's parameter values do not match the old values when queried
       through 'clap_plugin_params::get()'. The mismatching values are parameter 0 ('High'), expected -3.1533496379852295, actual 0.0, parameter 1 ('Low'), expected
       -11.72365665435791, actual 0.0, parameter 2 ('Mid'), expected 14.21910572052002, actual 0.0, parameter 3 ('Mid Freq'), expected 446.7405700683594, actual 1337.0.

   - state-invalid: The plugin should return false when 'clap_plugin_state::load()' is called with an empty state.
     FAILED: The plugin returned true when 'clap_plugin_state::load()' was called when an empty state, this is likely a bug.
falkTX commented 1 year ago

I dont understand the first one, and last one seems invalid? empty states are allowed in dpf, for plugins that have no info at all (though I guess we use 1 single null byte there, perhaps just checking for that is enough...)

Best for this would be to add to the dpf makefile/cmake action during clap validation phase, so we always ensure generated plugins are valid

falkTX commented 1 year ago

Fixed in 07436d430a57e5d685e435a30b8b23a32dbeb105 Some can still fail when using parameter outputs, due to clap validator randomizer trying to mess with parameters tagged as read-only, issue reported as https://github.com/free-audio/clap-validator/issues/15