EXC_BAD_ACCESS signal received

前端 未结 30 3085
轮回少年
轮回少年 2020-11-22 06:37

When deploying the application to the device, the program will quit after a few cycles with the following error:

Program received signal: \"EXC_BAD_ACCESS\".         


        
30条回答
  •  青春惊慌失措
    2020-11-22 06:51

    Don't forget the @ symbol when creating strings, treating C-strings as NSStrings will cause EXC_BAD_ACCESS.

    Use this:

    @"Some String"
    

    Rather than this:

    "Some String"
    

    PS - typically when populating contents of an array with lots of records.

提交回复
热议问题