Friday, December 16, 2016

Touch Bar Crash Protection

Daniel Jalkut:

I wrote previously about crashes related to Apple’s Touch Bar. These crashes seem to affect all apps that were built with a certain toolchain. Most likely it affects all apps that were built against an SDK of a certain vintage. For example, some of my apps that are still built against a 10.6 SDK crash on Touch Bar Macs, either frequently or infrequently, depending upon the user.

I had hoped that we might see a fix from Apple in macOS 10.12.2, but alas the issue is still there.

[…]

Poking around the AppKit infrastructure supporting the Touch Bar, I discovered a secret NSUserDefaults setting, NSFunctionBarAPIEnabled, which seems to determine whether the system exposes an app to the Touch Bar at all. It defaults to YES, but if it’s set to NO for an app, I think the app remains more or less invisible to the Touch Bar.

Worth a try if, like me, you are getting crashes in DFRFoundation/DFRElement/CALayer.

Update (2017-01-13): Instead of using NSFunctionBarAPIEnabled, you can set NSLayerPerformanceUpdates to YES. This works around the memory management bug that causes the crash without having to turn off the Touch Bar.

Comments RSS · Twitter

Leave a Comment