for much improved robustness, I am scanning for installed plugins in a separate process rather than in the host itself. This nicely discards all the loaded plugins and leaves the host in a clean state.
The scanner has no main window or menu bar and only shows a single AlertWindow to indicate progress. Therefore I created a “Non-GUI” project with Introjucer and manually did a initialiseJuce_GUI(); and shutdownJuce_GUI(); around the actual scanning code. This worked fine until updated to the latest tip (v1.54.21), but now it is broken (Mac):
2011-07-10 18:32:07.089 Scanner[23180:10b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1002) creating CGSWindow'
2011-07-10 18:32:07.090 Scanner[23180:10b] Stack: (
The crash happens when alertWindow.enterModalState() gets around to toFront();, namely when sending the message [window makeKeyAndOrderFront: nil];
The NSWindow seems to be ok, so I wonder what’s wrong with my code? Did I miss something important concerning the GUI/Non-GUI notion? What does CGSWindow mean?
Any hint is appreciated!