One of the things discussed in Understanding the exception types in a crash report is the 0xdead10cc
code under EXC_CRASH (SIGKILL)
:
0xdead10cc (pronounced “dead lock”). The operating system terminated the app because it held on to a file lock or SQLite database lock during suspension.
My app gets killed this way here and there, and it's been on my project list for some time to make the requisite changes to database connection handling to fix it. With an App Store build, as far as I know it just means the app cold-starts when launched instead of resuming, but in a TestFlight build it actually shows a crash reporter dialog.
Reports of this issue from TestFlight users got more frequent with a recent update that had the effect of keeping more SQLite handles open longer, and I realized that I personally have never seen a crash reporter dialog after fast-app-switching away from a TestFlight build on my device. And I use the TF build as my daily driver, and I use my app a lot.
My question is this: is it possible that the 0xdead10cc
crash doesn't happen on Developer Mode devices?
I realized that 0xdead100c
only happens when dealing with files in a shared folder like an App Group container. The reason I never saw it was that the variant of my app I use from TestFlight doesn't use an App Group folder. The users who were reporting the issue are on a variant of the app that does use App Groups.
With a build that uses App Groups, I was able to reproduce what appears to be 0xdead100c
in debug on a device by either beginning a transaction or preparing and not finalizing a statement on a SQLite database before suspending the app.
I've filed FB12161496 for more clarity in the tooling around this issue.