DISTRHO / Cardinal

Virtual modular synthesizer plugin
https://cardinal.kx.studio/
GNU General Public License v3.0
2.3k stars 154 forks source link

32bit vst2 : certain modules cause crashes #80

Open offthesky opened 2 years ago

offthesky commented 2 years ago

haven't tested them all yet but here are ones that consistently crash when trying to load them: audible: liquid filter, eq filter amalgamated: d'acchord befaco: even vco e series: cloud generator mind meld: none of these work vortico: vco, wt vco, lfo, wt lfo, vcf, sometimes adsr (or, it will let you load adsr and then the project will crash upon reopen. which is the case for several others) Valley, all their oscillators and feline

seems polyphony is a common denominator.

of course no issues in win x64 (am testing this out in 32bit since i teach classes for kids in a place that still has 32bit pcs)

falkTX commented 2 years ago

that is unusual, need to clarify some points:

offthesky commented 2 years ago

do these 32bit PCs have a CPU capable of SSE2 instructions

from wikichip.org :: Atom x5-Z8350 Supported x86 Extensions & Processor Features

MMX MMX Extension SSE Streaming SIMD Extensions SSE2 Streaming SIMD Extensions 2 SSE3 Streaming SIMD Extensions 3 SSSE3 Supplemental SSE3 SSE4.1 Streaming SIMD Extensions 4.1 SSE4.2 Streaming SIMD Extensions 4.2 AES AES Encryption Instructions

x86-64 64-bit x86 NX No-eXecute BPT Burst Performance Technology EIST Enhanced SpeedStep Technology VT-x VT-x (Virtualization)

do you also get crashes if running the 32bit plugin on a 64bit PC? (preferably the same where you test the 64bit plugin)

yes, the same modules mentioned above seem to crash the 32bit plugin when loaded up in reaper on my x64 win10 laptop.

what Windows version are the 32bit PCs running?

Windows 10 Home 32bit. my x64 laptop is running win 10 pro

falkTX commented 2 years ago

ok so it is a problem with the builds, not with the PCs.

The 32bit build uses an old compiler, which could be a reason for such crashes. Sadly the Ubuntu 20.04 repos seem broken at the moment for it.

Updating the compiler should fix the issue, I will see what can be done.

offthesky commented 2 years ago

thank you much, you rock!

falkTX commented 2 years ago

Please try one of the latest builds and let me know if they work now

offthesky commented 2 years ago

just tried with 47350ab and unfortunately still getting the same crashes.

side note: when unpacking the latest build in windows, getting duplicate filenames with the new extratone modules (ty for adding those btw, the students will love these since all they want to do is make beats): extratone 2 knobs same file name 3

dromer commented 2 years ago

These are not duplicate filenames, but it seems windows case-insensitivity is being a PITA? Is there an actual issue you are seeing with these?

falkTX commented 2 years ago

This breaks also macOS too since it uses case-sensitive filenames by default. It makes extracting resources showing question about replacing files, and what files end up actually on the filesystem is undefined. Reported the issue upstream https://github.com/EaterOfSheep/Extratone/issues/5

offthesky commented 2 years ago

just got a chance to try 32bit f998ee2e and am, unfortunately, still getting the crashes with a lot of modules

falkTX commented 2 years ago

I can confirm the crash. The Befaco VCO one triggers

Unhandled page fault on read access to FFFFFFFF at address 0143CC4B

Likely a null pointer de-reference.

offthesky commented 2 years ago

not sure if it would be useful but i have a fairly exhaustive "to avoid" list going now of most all the crashing modules. if for any reason that might be helpful here, let me know.

dromer commented 2 years ago

Which host are you using? How is the LV2 version for you?

falkTX commented 2 years ago

host doesnt really matter. I can trigger the issues with a compiled standalone.

falkTX commented 2 years ago

This seems to have improved considerably. I was able to load audible, mindmeld and valleyaudio stuff on a win32 build. But some still cause the host to trigger an exception/crash warning dialog. FLStudio was still able to continue with the audio and Cardinal running if we ignore just close the dialog, so not all bad..

Also noticed the knobs do not move, an issue we had previously due to NaNs being converted to 0.

So the first Cardinal release will be out without this fixed, but at least there is some ideas on things to investigate.

offthesky commented 2 years ago

i'm still using an older 32bit (pre vortico/as modules removal), and tbh most of the modules still work great. am super grateful to have vcv pro 2 in any capacity running via 32bit! not sure if it's useful, i made a list of the following that cause crashes (sadly, a lot of the good vcos/vcfs are in this list) - however all other modules outside this list afaik work great. will try out cardinal again when it's fully released and update this list::

crashes when clicking on the module in the browser you can load up and play with, but the daw will crash when reloading project w these modules you can load up and play with but will crash if you send a more extreme signal (i.e. white noise) into the modulation cv ports and turn up their modulation knobs (also will most likely crash on reloading the daw project)

amalgamated: d'achord*

autinn **

audible: eq filter dual dynamic gate**

befaco: even vco spring reverb sampling modular* rampage slew limiter

bidoo: tiare limonade acne zinc

bog: vcf lvcf

chowdsp: chow fdn* chow chorus weiner filter**

e-series cloud generator*

hetrick: (all the polyphonic ones) bitshift contrast delta compander exponent flip pan mid/side min/max* shaper* 2 to 4 xy-polar*

mindmeld mixmaster mixmasterjr eqmaster* bassmaster bassmasterjr meld

shapemaster works for the most part but crashes when using the crossover/lp/hp filters

valley dexter terraform

zzc: fn-3**

offthesky commented 2 years ago

p.s. all the knobs seem to work fine for me afaik... again, am running an older build so not sure about the latest builds.

falkTX commented 2 years ago

It is already tagged and released. I am just doing the pushing to kxstudio repositories and writing the usual announcements.

Such list for the old builds is not that useful, since many core things have changed. We need to retest.

offthesky commented 2 years ago

gotcha that makes total sense will certainly re test when i can

offthesky commented 2 years ago

had a chance to check out the ones on my list in reaper with the win32-22.02 build and everything on that list is still valid/causing crashes. removed the befaco/vortico ones. added autinn as they are causing crashes on project reload sometimes.

falkTX commented 2 years ago

ah damn, I was hoping things would be better now :( will revisit this a bit later

falkTX commented 2 years ago

Good news, I was able to fix most of these issues. Seems the crashes were related to memory alignment, where 64bit OSes do it automatically as needed, but for 32bit ones we need to force it. Assuming the latest build succeeds, please try it when you have the chance.

From the ones on your list that cause crashes on load I only now have ValleyAudio stuff still crashing, the other ones load and seem to work fine.

offthesky commented 2 years ago

awesome! tyty will check this latest build out today when i can :)

offthesky commented 2 years ago

had a chance to go through the list (as well as the new additions since that list was created)... everything seems to work now except two chow dsp ones on the list: chorus - still crashes on load, and the weiner filter still crashes when you reload a project with it in there. really loving having access to all these new filters/oscillators now, so ty for those fixes!!!

falkTX commented 2 years ago

FYI Fundamental wavetable modules (WTVCO and WTLFO) were crashing on win32, fixed on latest builds, will be part of 22.06

and btw, Fundamental has 2 new modules, should we try a reskin for those?

offthesky commented 2 years ago

FYI Fundamental wavetable modules (WTVCO and WTLFO) were crashing on win32, fixed on latest builds, will be part of 22.06

and btw, Fundamental has 2 new modules, should we try a reskin for those?

awesome for the fix and yes, will whip up some svgs for those very soon

offthesky commented 2 years ago

super stoked about these new mindmeld and stoermelder modules! bravo!! noticing however that the latest 32bit vst2 (build #1309) is crashing right when i try to load it in both reaper and or ableton 32bit

falkTX commented 2 years ago

I have a suspicion of what is going on. only vst2 crashes, right? both vst3 and clap work under reaper, right? if you can confirm this, then I will know what it is.

offthesky commented 2 years ago

i can load the vst3, lv2 (reaper only).. but was still getting some crashes when connecting the bog llfo > bog vcf to the audio out.

with the clap plugin, i get this when trying to load (i didn't run the installer, guessing that's the problem there) clap

offthesky commented 2 years ago

also, just rebooted and very first thing loaded reaper then the vst3 and received a crash (although didn't crash when i loaded the vst3 after opening reaper a 2nd time)

offthesky commented 1 year ago

i'm also noticing that the 32bit vst2 cardinal midi host module -midi out- isn't working in 22.10 or 22.11 (and one of the latest stoermelder builds) but seems to work okay in 22.09. not sure if it's related to any of the vst2 issues above. if not i can make a new ticket if you think that best.

dromer commented 1 year ago

@offthesky do you mind retrying some of your breaking patches on the latest release?

offthesky commented 1 year ago

@offthesky do you mind retrying some of your breaking patches on the latest release?

i dont see any mention in the changelist for 32b fixes w the 23.09 rls. once falktx mentions in this thread he's tried to fix something, i'll gladly retest all the diff plugin types when i have time. but until then, holding off.

if you want to try 23.09 in reaper 32b, please do- whenever i've tested in the past i just try using the built in demo patches. they either crash on load or when reloading the saved project. often the default start patch (host midi>vcv vco>vcv adsr>vcv vca>host audio) crashes right when loading the plugin. many of the stock vcv ones crash on load.

thankfully for now, the (mostly) stable 22.09 32b still work very well

dromer commented 1 year ago

It's more that it has been quite a long time since you tested and I think the builds have been adjusted in the mean time (no more LTO on release builds, for instance). Still worth to confirm that things are broken for you.

I do not have any 32bit windows systems that I could test this on.