[win] hang up during LoadLibrary in release mode only


#1

hi,

I am experiencing a weird bug theses days.
Obiously this is all my fault since the Juce Demo doesn’t exhibit this problem.

I have a Juce plugin which used to work fine on both windows and osx. But lately only the debug version seems to work on windows.

I’ve stripped it down to the point where createPluginFilter() just returns NULL and I’m not using any global variables, singletons… But it still freezes any application trying to load it.

Since I can’t really debug anything like that, I’ve used a very simplified command-line test host I wrote some time ago and discovered that the plugin was hanging during LoadLibrary().

Does anyone here have an idea of what I might have done to cause such a severe bug that wouldn’t appear on mac or in debug mode?


#2

Can’t think what that could be. What’s the library you’re trying to load?


#3

the plugin dll


#4

So it’s the host that’s calling LoadLibrary? I thought you meant the plugin was calling it. You could try sticking log messages in the code to see how far it’s getting inside the dll loading code, I guess.


#5

What are you doing in the dll’s DllMain? You shouldn’t be doing anything much.


#6

Hmm. I’ve always used DllMain to initialise/shutdown juce, though it’s never caused any problem before. Try moving those calls out of there and see if it helps. If so, I’ll figure out a better place to call them.


#7

I’ve commented the code in DllMain with no effect, I’ve also added some code to trace the call to DllMain and it doesn’t seem to be reached in Release build while the Debug build works like a charm.

weird…

I can’t think about anything I might have causing this.


#8

Maybe it’s a problem with one of the libraries that your module links to?


#9