Cabbage Logo
Back to Cabbage Site

Windows install: What if the user installs on the D:// drive?

Hi,

My plugin installer is built this way:

  • VST is installed in the default VST folder on Windows
  • Assets + csd are installed in C://Program Data/…
  • Presets are installed in C://Users/Username/Music (I use the reserved channel for that)

A friend wanted to try the VST but moved the VST file in his D:// drive. How can I make sure Cabbage will find the assets/csd files/presets when users move the VST file? The VST crashes on his computer and I’m sure it’s because of that.

Thanks!

Julien

Where the VST is installed should not be an issue. Does the user in question have a C:/Program Data folder? FWIW, I don’t use any hard coded paths to C:/Program Data/.., I’m just using what Windows says is the common application data folder. But if it’s not there, then yes, there will be an issue. If Windows is installed on a D: drive, then Cabbage will look in D:/Program Data/..

Ok thanks for the answer. I was afraid Cabbage would look for the files in the D:/ drive instead.

Actually there was a C:/Program Data folder! I have to investigate because it works on my computer but not his.

In fact @rorywalsh I think my problem might not come from the paths: a friend tested the plugin on Windows 10 and it works well.

Maybe I’m building on an older version of windows? And on Win11 it is not compatible?

I haven’t heard of any issues with Windows 11. You’re on Windows 10 right? It’s hardly an arm version of Windows? Perhaps it’s something to do with C++ redistributables? Can you ask the user to install the latest?

Ok thanks Rory, I can try that.

I thought it might be:

  • csd files not found (even though they are in the standard folder, and it works on 3 windows computer I also tried)
  • csound not compatible?
  • more globally, the vst not compatible?

I am on Win10, and asked a friend (Win11) to try it as well and it works on his computer…
But I the initial issues comes from the use of the VST3 (he didnt use the VST because it didnt show up in the vst explorer), and my other beta tester tried the VST3 as well.

I will ask him to try with the latest c++ redistributables (if he’s available, i know he’s pretty busy these days)

Thank you Rory!

I called him and ran a few more tests:

  • He tried the VST3 in Audacity -> it’s working
  • He tried the VST3 in Ableton (the same version as me, the same Windows version as me) -> it’s not working
  • The VST does not show up in his plugin explorer, it shows up in my VST explorer

The crash might be caused by the sample rate or buffer size settings, so I tried to change the Ableton audio settings in his Live Session to reset to default, it didnt change anything.

I am getting crazy, this is so hard to debug…

He sent me his logs, I can only see “info: VST3: Going to create: Nymano AudioShaper” and then Ableton crashes without printing more logs.

I don’t think I completely understood the issue here, but I have some tips after I encountered some crashes with my plugins.

  1. Don’t set any sr (sample-rate) manually at the start of <CsInstruments>. Csound/Cabbage should take care of setting the sample rate automatically when the plugin is loaded in a host.
  2. If you use the reserved channel "HOST_BPM", and you use it in any division calculations, wrap it inside a divz to give it a fallback. When loading a Logic Pro project using a Cabbage plugin, there seemed to be a split-second where "HOST_BPM" was zero, and it crashed the whole DAW.

Thanks for the tips!

I don’t understand the issue as well :smiley: I can’t reproduce the bug and it works for other friends as well…

I don’t set sr, here is what I set:

<CsInstruments>
ksmps  =  64
nchnls =  2
0dbfs  =  1

I don’t use HOST_BPM, but when I divide numbers I use divz as well so it should be ok

If we can’t reproduce the crash it makes it very hard to know what’s happening. Can you cause a crash by changing the sample rate while the plugin is loaded in Live?

I agree withou you Rory, I tried the whole day and I still can’t reproduce it…

To sum up my tests:

  • vst3 works in Audacity
  • vst3 makes Ableton crashes instantly (I cant change the sr while loaded). Even with the default sr it crashes.
  • vst is not recognized

Audio config is pretty standard:

On other devices, everything works with the same OS and Live version.

I’m running out of ideas

Maybe I messed up the CsOptions tag?

<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d --displays
</CsOptions>

So it’s just windows 11 that is causing the problem? It works everywhere else? I’ll ask at work, mybe they have a WIndows 11 machine I can test with. I keep getting annoying notificaionts about upgrading, but I am hesitant considering Windows 10 has never caused me any issues.

The weird thing is that it works on windows 11/10 for me and for my friends. Just for a single windows 11 machine, I can’t make it work on Ableton Live, even though it works on audacity on this specific machine.

I will send him the most basic example of gain effect made with the tutorial and see if it works, to narrow the issue a bit more

Can you find out exactly what version of Windows they are using? Is it a home version by any chance? Also, can you try adding opcodeDir(".") to your form line and exporting again?

Microsoft Windows 22H2 (build 22621.1702)

But since the VST is working on his computer in Audacity but not in Ableton Live, I think we can say it’s not linked to the OS? Also, the super weird thing is that the VST dll is not even recognized by Ableton, only the VST3. I can’t reproduce it on my computer, it works well!

What will it do? I can try it and ask him to try the VST again

EDIT: Ok I got it “This will override the OPCODE6DIR64 directory”

I had a very odd issue with Live on a particular flavour of Windows in the past. The dll loading was going crazy for some reason where Csound and sometimes live, would try to load all manner of dlls on startup, thinking they were all audio plugins. Setting the opcode dir to a folder with no dlls in it seemed to do the trick, but we never got to the core of the problem.

Ok then I will try it and cross my fingers :smile:

I will keep you updated, thank you very much for your help!

The only way to track this down the last time was to remotely debug the plugin with Visual Studio code through a VM image. It was a nightmare to get it set up. I keep my fingers crossed that the opcodeDir() trick works :crossed_fingers:

1 Like

It works!!! Thank you so much, I’ve been stuck on this issue for a whole week!!

Sorry I didn’t think of this sooner. I really didn’t expect this issue to pop up again :see_no_evil:

1 Like