I have a production Swift application that lives in the menu bar and is designed to permanently reside there.
The only "normal" way to quit the application is to select "Quit" from the menu.
The application has a few thousand users, but only two users report that the app quits over night, i.e. it was running when their Mac goes to sleep and when they wake it in the morning it is no longer running.
I suspected that it might crash during the wake up operation, but there is no crash log in Console.app (on Big Sur apps crash silently without a dialog showing). Then I thought it might be the "application can be killed immediately to reclaim memory, etc." but this is switched off in Info.plist.
I use assertions, but apparently on optimised release builds these are ignored.
My app usually quits without displaying a "are you sure?" dialog, but I added one in a private build just to see whether it gets called. It does not.
Any ideas what might kill my app in the middle of the night?