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

后端 未结 10 1033
情歌与酒
情歌与酒 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

    I got this error while I tried to write to a variable at the same time from different threads. Creating a private queue and making sure one thread at a time can write to that variabele at the same time. It was a dictionary in my case.

提交回复
热议问题