Unable to find the cause of crash-Exception Type: EXC_BREAKPOINT (SIGTRAP)

I would be so appreciated if anybody could spend their time to help me!!!


What I am facing now:

I am developing an app used for Autofill Passwords, which means when click the little key icon in the QuickType Bay above the keyboard, my app will be triggered.

Then my autofill extension shows up and looks through the needed accounts and password from database, after the search is done, the correct info shows up in a table view.

Then bomb! The crash happens without giving me the hint to locate the line that caused the crash (for most of crashes, Xcode will lead programmer to the line).

What I tried:
Added many breakpoints, found that after the search is done, if I don't present the table view controller to show the correct info, no crash. But after the presentation, after the info is loaded rightly in the table, seconds later, crash happens.

What I can provide:
I can provide the full crash report:



Replies

This crash is triggered by auto layout code running on Thread 1, which is not the main thread. All UI related code needs to be done on the main thread. The Main Thread Checker can help identify such issues.