iOS, xcode, "Thread 1 signal sig

2018-01-23  本文已影响0人  木木爱吃糖醋鱼

Thread 1 signal SIGABRTis a common issue happened while you are trying to run your project via simulator.  Here these short passages meant to show you how to fix it.  For people are able to access Youtube, please directly watch the video in the reference.  If you can't access Youtube, then please read the texts.

CAUSE:

Generally, the cause to this problem is that you have a component(or several) on your storyboard that linked to an outlet, but the corresponding definition code is missing.To those who are familiar with Java, it is somewhat alike to a "NullPointerException", which means something references other thing that does not exist.

For example, to regenerate this problem, you can create a new project.  Drag a label to your main storyboard.  Hold ctrl + left key and drag to create a property.  Now select the label you just added and take a look at the "Referencing Outlets", which is at "Connection Inspector" of "Utility Panel" under the view tab, you will see a connection that you just created.  Here is a catch, if you delete the property of the label and hit run button, theThread 1 signal SIGABRT will appear.

FIX:

To fix that, you simply need to manually delete the connection in Connection Inspector.  

Conclusion:

This problem could come in various causes.  In my case, I copy-paste a label from a view scene to another.  The label somehow gets two referencing outlet connections.  Only one of them has been defined.  Therefore,Thread 1 signal SIGABRT problem has been triggered.  Unfortunately it seems do not have a easy way to iterate through all components that potentially has problem and fix it quickly.  Developers have to manually screen them one by one.

ref:https://www.youtube.com/watch?v=MkcqBIS8Swc

上一篇下一篇

猜你喜欢

热点阅读