Strange crash relating to NSStatusBar item rendering

Originator:cmsj
Number:rdar://32675107 Date Originated:2017-06-09
Status:Closed Resolved:Duplicate
Product:AppKit Product Version:10.12
Classification: Reproducible:Rarely
 
My app (Hammerspoon - http://www.hammerspoon.org) includes an NSStatusBar item, and also allows users to create their own.

Something, unfortunately I don't know what, because I haven't been able to reproduce it myself, is causing occasional status bar rendering to crash very deep in a stack which contains none of my code. Here is the main recurrence of this that my crash logger is catching: http://crashes.to/s/4f66b4a188b

The source for Hammerspoon is all on GitHub (https://github.com/Hammerspoon/hammerspoon) the code for the main app status bar item is in Hammerspoon/MJMenuIcon.m and does very little indeed. The source for user added status bar items is in extensions/menubar/internal.m and is much more complex.

I don't have any idea which of the two is causing the crash, but I would note that BetterTouchTool also is experiencing these crashes, and they do not have user-created status bar items: https://github.com/fifafu/BetterTouchTool/issues/831

I'm very prepared to believe that we are doing something wrong, but the crash happens so far down a stack that I sort of feel like even if we're doing something wrong, macOS should really be rejecting the mistake earlier.

Steps to Reproduce:
Not really sure - it may have something to do with connecting monitors and/or coming out of sleep (perhaps where the display configuration is changing during a wakeup? but that's a guess)

Expected Results:
No crash

Observed Results:
Crash

Version:
10.12

Notes:


Configuration:

Comments

Engineering has determined that your bug report (32675107) is a duplicate of 19759543 and will be closed.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!