I’m trying to access InterprocessConnectionServer, running on a separate juce GUI application from my VST plugin running on a DAW (Reaper) using InterprocessConnection on Windows.
However, connectToSocket called on the plugin/client side always returns false.
It works properly when I run the same program on Mac or when I try to connect the server from a console application using InterprocessConnection on Windows.
What I found using the debugger is
returns false when I try to access from a plugin but returns true when I access from a console app.
But I’m not sure why the locking is not successful on a plugin and successful on a console app.
I would appreciate any help on this topic. Thank you.
Are you absolutely sure nothing else has the critical section? For example if you change the example to take a local critical section, does it still fail?
I just copied your code and tested. my debugger stops at else clause. so yes, it still fail.
My environment is Win 11. Reaper 6.81. I’m instanceating just one plugin instance on the session.
Can you reproduce this using one of the example plugins?
I’m testing it with the modified version of the example plugin I found under JUCE/examples/CMake/AudioPlugin
Just to understand the issue more does this happen if you do the same thing in the editors constructor rather than the processor?
Yes
Have you tried this on Windows 10?
No
Have you tried any different machines?
No, unfortunetely I don’t have any other machines at home.
Have you tried a newer version of Reaper?
No
Does this only happen on Reaper?
It happens also on Nuendo 10.3
I wonder if the initialization with “=” might result in the ScopedLock on the right of the = going out of scope when you copy it into the “lock” variable (just guessing, I don’t remember exactly what the standard says in this case).
This crossed my mind too, the Curiously recurring C++ Bugs talk came to mind, but I couldn’t seem to reproduce an issue between the two styles myself. Definitely worth trying to eliminate any doubt though.
Hey, I guess I found the cause. sorry, it’s my fault.
I changed just one thing from the example plugin, and this produced the issue.
target_compile_definitions(CriticalSectionTest
PUBLIC VST3_AUTO_MANIFEST FALSE
JUCE_WEB_BROWSER=0
JUCE_USE_CURL=0
JUCE_VST3_CAN_REPLACE_VST2=0)
If I remove the line and let juce produce the moduleinfo, it worked properly.
I thought this file (moduleinfo) just lets the DAW know the property of the plugin without loading the plugin. but seemingly, it influeves how the plugin is treated by the DAW… ?