Develop branch crash on macos 10.7 / 10.8

Two additionnal if (@available(macos10.10)) have to be added in juce_mac_Accessibility.mm in order to allow the application to run on macos 10.7, otherwise it will crash on startup:

one in:

void notifyAccessibilityEventInternal (const AccessibilityHandler& handler, InternalAccessibilityEvent eventType) 
{
#if JUCE_OBJC_HAS_AVAILABLE_FEATURE
  if (@available (macOS 10.10, *)
#endif 
  {
  ...
  }
}

and the other one in

void AccessibilityHandler::notifyAccessibilityEvent (AccessibilityEvent eventType) const
{
#if JUCE_OBJC_HAS_AVAILABLE_FEATURE
  if (@available (macOS 10.10, *))
#endif
  {
  ...
}
3 Likes

Thanks, this should be fixed in a9d17d8. Let me know if it’s still causing issues.

Unfortunately with this patch it is crashing on startup, during initialisation of global variables it seems (the stack trace is not very informative).

1 Like

Ah I think I might have made a typo there, can you try changing the condition to:

#if (! defined (MAC_OS_X_VERSION_10_9)) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9

and see if that works? It should be using the NSString literal when the deployment target is lower than 10.9.

1 Like

That was it, it works now, thanks !

2 Likes

Great, I’ll make that change shortly.