Thursday, November 7, 2019

RunningBoard in Catalina

Howard Oakley:

Normally, assertions are used during development and debugging, then switched off when software is released. In macOS 10.15 and 10.15.1, at least, the subsystem for handling assertions, RunningBoard, is fully active in release versions, which suggests a substantial change in software practice by Apple.

This subsystem consists of a small service, /usr/libexec/runningboardd, and two Private Frameworks, RunningBoard.framework and RunningBoardServices.framework. There is also an AssertionServices.framework still, as in Mojave. Minimal access is provided from the public macOS interface, in the form of the NSAssertionHandler class and a few calls such as the NSAssert() macro. At present, RunningBoard and assertions are largely the preserve of macOS and don’t appear to be intended for direct third-party use, except in some Objective-C code.

Update (2019-11-08): I’ve received a tip that RunningBoard is not related to NSAssertionHandler. It’s intended for resource assertions, e.g. keeping the device alive during a download or temporarily using more memory.

2 Comments RSS · Twitter

That's interesting to learn about - mainly that assertions are more of a programming practice change. Going overboard with correctness can be a problem in itself, especially for app framework creators like AppKit. For example, Catalina (10.15.0 and 10.15.1) has an assertion that will crash any app using more than 256 cursorRects in a view. Apps like Hype use a lot of cursor rects for changing the mouse pointer icon when hovering over selection handles. This is assertion ridiculous on many fronts: a) arbitrarily small limit b) should not be crashing an app over a very trivial matter like not being able to make a cursor rect, c) binary compatibility regression. I do believe this is a bug, but I just don't see any justification for using asserts in shipping code to cause a crash in lieu of exceptions unless completely catastrophic. And then if you crash, there's a crash report to use. I'd like to know more about the justification for adding yet another system daemon.

Wow yes this has absolutely nothing to do with errors or invariants, and is very much more akin to “power assertions” that have existed for decades.

Leave a Comment