Widget extension 0xdead10cc crash when accessing Core Data in shared app group

I am getting frequent WidgetKit extension crashes with termination reason 0xdead10cc. The widget extension shares the core data database with the main app via a shared app group.

Apparently the extension gets terminated because it is holding onto the sqlite database lock during suspension.

There are several blog posts that suggest these crashes are unavoidable and recommend not sharing core data between app and extension. For some reason the forum will not allow me to link to these posts.

I find it hard to believe that it is impossible to share core data in this manner. Is there any work around? And barring that, when the widget extension crashes, does it restart within a certain amount of time? My widget mostly functions well although occasionally it will not refresh and requires a hard device reboot. I cannot determine if these freezes are due to this crash or another bug.

Crash report example attached.


I’m having the exact same scenario with the exact same problem right now.

Did you find a solution by now?

Widget extension 0xdead10cc crash when accessing Core Data in shared app group
 
 
Q