PVST crash in my test VST

Post Reply
User avatar
UNZ
Posts: 808
Joined: Mon Nov 21, 2011 9:42 pm
Contact:

PVST crash in my test VST

Post by UNZ »

i have a very simple vst (2.4) with one parameter. it mostly works, but:

if i change the parameter value from the buzz parameter gui or from pxp, PVST crashes with a null reference exception.
changing the parameter value in pvst's built-in parameter gui works.

unfortunately i don't get a proper stack trace when it crashes so i have no idea what is null.
what could be the problem?
the plugin only relies on the C API btw, so no AudioEffect/AudioEffectX classes, but that should not matter.

attached: the test vst.

edit: tried it on another machine with b34, it worked, then updated to b40: crashes.

EDIT: looks like i found the issue: it happens when numPrograms is set to 0, is a VST supposed to always have at least 1 or is this a bug?
Attachments
VST2TESTPLUGIN.zip
(14.83 KiB) Downloaded 93 times
User avatar
UNZ
Posts: 808
Joined: Mon Nov 21, 2011 9:42 pm
Contact:

Re: PVST crash in my test VST

Post by UNZ »

so after a bit of thinking about this and testing some hosts here are my thoughts:
some hosts don't seem to care for NumPrograms = 0 and work just fine, others have issues with it.
i could not find a definitive answer in the VST standard that says anything about 0 being legal or not.

i think even if the standard says it's illegal, i think it would be prudent of PVST to guard against this.
polac
Posts: 415
Joined: Wed Nov 23, 2011 9:19 am
Contact:

Re: PVST crash in my test VST

Post by polac »

Sorry for replying so late, I take a closer look.
polac
Posts: 415
Joined: Wed Nov 23, 2011 9:19 am
Contact:

Re: PVST crash in my test VST

Post by polac »

Ok I found the bug, will upload a fix in the next days, meanwhile you can enable 'always automate' in the preferences. Thanks for the info. :mrgreen:
User avatar
UNZ
Posts: 808
Joined: Mon Nov 21, 2011 9:42 pm
Contact:

Re: PVST crash in my test VST

Post by UNZ »

polac wrote: Sat Mar 25, 2023 9:35 pm Ok I found the bug, will upload a fix in the next days, meanwhile you can enable 'always automate' in the preferences. Thanks for the info. :mrgreen:
oh, thanks a lot!
polac
Posts: 415
Joined: Wed Nov 23, 2011 9:19 am
Contact:

Re: PVST crash in my test VST

Post by polac »

Really stupid bug, i checked for effect->numPrograms but had to check for effect->numParams. :roll:
Post Reply