Vital CLAP plugin crashes when changing oversampling setting to unused one while processing

Problems I encountered or noticed

If I change the oversampling setting in CLAP version of Vital while the plugin is processing, the plugin will crash.

  • If the plugin is not processing (e.g. only activated), then the plugin won’t crash if the oversampling setting is changed.

  • If the oversampling setting is turned down (i.e. 2x → 1x), then the plugin won’t crash.

  • If oversampling is set to one that is the highest setting we’ve ever chosen for the first time while processing, then the plugin will crash. Otherwise it’s okay. For instance, if I:

    1. Load the plugin (the default oversampling is 2x)
    2. Stop processing (e.g. by deactivating the plugin)
    3. Change oversampling to 4x (which will not crash)
    4. Start processing (e.g. by activating the plugin)

    Then the plugin won’t crash when oversampling is set to 1x/2x/4x afterwards while processing, but if we try to set oversampling to 8x, the plugin will still crash.

    If I:

    1. Load the plugin (the default oversampling is 2x)
    2. Stop processing (e.g. by deactivating the plugin)
    3. Change oversampling to 8x (which will not crash)
    4. Start processing (e.g. by activating the plugin)

    Then the plugin won’t crash when oversampling is set to 1x/2x/4x/8x afterwards, which avoids this problem.

I’m kind of sure that the problem is not caused by the host application (or maybe all of the CLAP hosts I tried have a problem that causes the plugin to crash).

Environment

  • CLAP plugin hosts I’ve used to test: free-audio/clap-host, MultitrackStudio Lite, xris1658/musec
    • I’ve saw another post indicating that the plugin will crash on Bitwig as well.
  • Operating system: Windows 10 21H1 64-bit (10.0.19043.1889)
  • Vital version: 1.5.3