EXC_BAD_ACCESS signal received

前端 未结 30 2765
轮回少年
轮回少年 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 07:16

    Forgot to take out a non-alloc'd pointer from dealloc. I was getting the exc_bad_access on my rootView of a UINavigationController, but only sometimes. I assumed the problem was in the rootView because it was crashing halfway through its viewDidAppear{}. It turned out to only happen after I popped the view with the bad dealloc{} release, and that was it!

    "EXC_BAD_ACCESS" [Switching to process 330] No memory available to program now: unsafe to call malloc

    I thought it was a problem where I was trying to alloc... not where I was trying to release a non-alloc, D'oh!

提交回复
热议问题