Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jacobi.Vst.Samples.Host loading reacomp-standalone.dll results in NullReferenceException at HostCommandStub.HostCommands.GetCurrentPluginID() Line 203 #62

Open
paulpv opened this issue Aug 23, 2022 · 3 comments

Comments

@paulpv
Copy link

paulpv commented Aug 23, 2022

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

image

PluginInfo is indeed null.

Note that all of the other reaplug plugins do load. There is just something odd about the reacomp-standalone.dll
image

To Reproduce
Steps to reproduce the behavior:

  1. Install reaplugs https://www.reaper.fm/reaplugs/
  2. Launch Jacobi.Vst.Samples.Host and load C:\Program Files\VSTPlugins\ReaPlugs\reacomp-standalone.dll

Expected behavior
Plugin loads

Desktop:

  • OS: Windows 10 Pro 21H1 19043.1889

I've tried stepping through the code to see where the malfunction is, but so far have not found it...

@paulpv paulpv changed the title Jacobi.Vst.Samples.Host.dll!Jacobi.Vst.Samples.Host.HostCommandStub.HostCommands.GetCurrentPluginID() Line 203 NullReferenceException Jacobi.Vst.Samples.Host loading reacomp-standalone.dll results in NullReferenceException at HostCommandStub.HostCommands.GetCurrentPluginID() Line 203 Aug 23, 2022
@paulpv
Copy link
Author

paulpv commented Aug 23, 2022

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).

image

Incidentally, loading all of the other reaplugs never triggers that command = CurrentId (2).
They all only ever show opcode= 0xdeadbeef and index = 0xdeadf00d.

@paulpv
Copy link
Author

paulpv commented Aug 23, 2022

I changed HostCommandStub.HostCommands.GetCurrentPluginID() to the following "safer" code and now it does not crash.
image

I am not sure if -1 is an appropriate return value.

@paulpv
Copy link
Author

paulpv commented Aug 23, 2022

See NightVsKnight@2996d03.

Again, not sure what an appropriate "unknown plugin id" value is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant