Details
-
Bug
-
Resolution: Won't Do
-
P2: Important
-
None
-
4.6.3, 4.7.0
-
None
-
Mac OS X 10.5 and Carbon
Description
When using a plugin in a VST host application on Mac then it will crash either when loading the plugin or when trying to interact with it. For example using the attached example with Reaper will cause it to crash on startup. It is also crashing with Cubase and Ableton Live too. In Cubase it will crash if you mouse over a menu.
The reason this seems to be happening is related to two things, the Reaper crash seems to be related to:
CGDisplayRegisterReconfigurationCallback(qt_mac_display_change_callbk, 0);
CFNotificationCenterRef center = CFNotificationCenterGetDistributedCenter();
CFNotificationCenterAddObserver(center, qApp, qt_color_profile_changed,
kCMDeviceUnregisteredNotification, 0,
CFNotificationSuspensionBehaviorDeliverImmediately);
CFNotificationCenterAddObserver(center, qApp, qt_color_profile_changed,
kCMDefaultDeviceNotification, 0,
CFNotificationSuspensionBehaviorDeliverImmediately);
CFNotificationCenterAddObserver(center, qApp, qt_color_profile_changed,
kCMDeviceProfilesNotification, 0,
CFNotificationSuspensionBehaviorDeliverImmediately);
CFNotificationCenterAddObserver(center, qApp, qt_color_profile_changed,
kCMDefaultDeviceProfileNotification, 0,
CFNotificationSuspensionBehaviorDeliverImmediately);
commenting out those lines above in qt_init() solves the crash in Reaper. The crash with Cubase is related to the accessiblity handler in registerQtAccessibilityHIObjectSubclass(). So it seems that some handlers/observers are being registered twice which seems to cause a problem. This happens even with MacPluginApplication being set before the QApplication is created.