Open paulpv opened 2 years ago
When loading reacomp-standalone.dll
, the very first command in ::Vst2IntPtr VstHostCommandProxy::Dispatch(int32_t opcode, int32_t index, ::Vst2IntPtr value, void* ptr, float opt)
is command = CurrentId (2)
.
Incidentally, loading all of the other reaplugs never triggers that command = CurrentId (2)
.
They all only ever show opcode= 0xdeadbeef
and index = 0xdeadf00d
.
I changed HostCommandStub.HostCommands.GetCurrentPluginID()
to the following "safer" code and now it does not crash.
I am not sure if -1
is an appropriate return value.
See https://github.com/NightVsKnight/vst.net/commit/2996d03e379c11c5d5a5d5de8620acaa256eea5f.
Again, not sure what an appropriate "unknown plugin id" value is.
Describe the bug I tried loading https://www.reaper.fm/reaplugs/ reacomp-standalone.dll and got the following crash:
System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=Jacobi.Vst.Samples.Host StackTrace: at Jacobi.Vst.Samples.Host.HostCommandStub.HostCommands.GetCurrentPluginID() in C:\Dev\GitHub\NightVsKnight\vst.net\Source\Samples\Jacobi.Vst.Samples.Host\HostCommandStub.cs:line 203
PluginInfo is indeed null.
Note that all of the other reaplug plugins do load. There is just something odd about the
reacomp-standalone.dll
To Reproduce Steps to reproduce the behavior:
Expected behavior Plugin loads
Desktop:
I've tried stepping through the code to see where the malfunction is, but so far have not found it...