weird crash when launching app from Notification Center

前端 未结 1 1340
鱼传尺愫
鱼传尺愫 2020-12-16 04:40

I\'m at my wits end, I\'m getting a weird crash that only happens when the app is launched from Notification Center. Either tapping on a local notification (in the notificat

相关标签:
1条回答
  • 2020-12-16 05:18

    Either your code or a third-party library you are using is manually spinning the runloop. This is causing -workspaceDidEndTransaction: to be called re-entrantly and triggers a use after free. If you set a breakpoint on -[NSRunLoop runMode:beforeDate:] and -[NSRunLoop runUntilDate:], it should hit with the guilty code being on the previous stack frame.

    While manually spinning the run loop is never recommended, if you can delay doing it until your application finishes starting up (all the launch app delegate calls received) you should avoid hitting this crash.

    0 讨论(0)
提交回复
热议问题