So yesterday my computer decided it was time to move on to windows 11 and broke something while doing it. Tested multiple projects that I know to be working and have previously built without issues (both my own projects and example ones). Now every debugging attempt and build throws an error that I have no clue how to fix. So any help would be appreciated.
Debug error: “Exception thrown at 0x00007FFD95E72C90 (msvcp140d.dll) in MyPlugin.exe: 0xC0000005: Access violation reading location 0x0000000000000000.”
Build error: "MSB3073:
The command "copy /Y “…\juce-7.0.5-windows\Projects\MyPlugin\Builds\VisualStudio2022\x64\Debug\VST3\MyPlugin.dll”
“…\juce-7.0.5-windows\Projects\MyPlugin\Builds\VisualStudio2022\x64\Debug\VST3\MyPlugin.vst3\Contents\x86_64-win\MyPlugin.vst3”
I’ve verified that those files still exist in those locations.
That’s a null-pointer dereference. Something in your project is trying to read from the memory address 0, which is not allowed.
The debugger should show which variable is 0 at the point of the crash, and you should be able to work back from there to fix the problem, e.g. by adding in a nullptr check before attempting to dereference the variable.
I don’t quite understand your copy command, are you sure the correct version is in the VST folder? Why is there a build error?
You may be testing an older, broken copy of your plug-in. Updating an OS sometimes means folders become protected.
I get the same errors even on a new juce project without anything added and on every example project that comes with juce. I think my best bet is to re-install everything juce releated and see if that helps.
Despite it complaining about a copy command I wonder if the thing failing in the script is actually the generation of the VST3 manifest file? This can happen if there is a bug in the plugin such that it is crashing on load (which the null-pointer dereference suggests). You should be able to copy your plugin manually into the right location, launch a DAW, attach to it, then try scanning/loading the plugin to see if the debugger can give you a hint.