what does Error “Thread 1:EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)” mean?

后端 未结 10 997
情歌与酒
情歌与酒 2020-11-29 02:42

I got this error:

Thread 1:EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

How can I solve this? The code works normally,

10条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 03:27

    In my case it happened when calling a function by passing a parameter of a Core Data managed object's property. At the time of calling the object was no longer existed, and that caused this error.

    I have solved the issue by checking if the managed object exists or not before calling the function.

提交回复
热议问题