Hi. Using CoreMidi4J in a Java Jigsaw / JSR 376 / Modules application I have run into inconsistent hanging issues. My application would hang on the call to CoreMidiDeviceProvider.getMidiDeviceInfo() most of the times but not always. When running under the NetBeans debugger the call would always return normally.
For now I am instantiating a CoreMidiDeviceProvider instance before calling getMidiDeviceInfo(). That somehow seems to 'fix' things: I have yet to see my app hanging after explicitly constructing a CoreMidiDeviceProvider instance.
Strangely enough, even with this 'fix' in place CoreMidiDeviceProvider.getLibraryVersion() always returns and CoreMidiDeviceProvider.isLibraryLoaded() always returns yes. Before the 'fix' I would also see for the version without instantiating a provider instance.
I am inclined to think that this all has something to do with Java Modules, because in unit tests (running 'outside' of the module system) I never see getMidiDeviceInfo() hanging. And getLibraryVersion() returns "1.6" inside unit tests.
Currently running under Temurin 21.0.4. 21.0.3 gave the same results. Any idea on what causes this unexpected behaviour?