NSZombieEnabled FIXING my application?

When I click on a specific view controller, then go over it and then repeat a random number of times when the application crashes with the error EXC_BAD_ACCESS over time.

This I can reliably reproduce EVERY TIME. This happens most often the second time I go to the view controller, but sometimes it can be the third or fourth.

So I decided to install NSZombieEnabled to find out what the problem is.

But at the same time, the accident cannot be replicated. All that has changed, I check the box next to "NSZombieEnabled" in my active executable configuration, and the application works fine.

Any ideas what causes this?

thanks

+2
source share
1 answer

I had the same problem with the iPhone app in the simulator. It would throw EXC_BAD_ACCESS when I pulled out a specific view controller, but as soon as NSZombieEnabled was turned on, the error disappeared.

To narrow it down, I commented on all the releases in the dealloc popup access controller, as a result of which the application did not work, and then uncommented them one at a time until it crashed again, showing the violating variable.

In my case, it was actually an instruction of the variable itself, which threw EXC_BAD_ACCESS

I can’t say exactly how to fix this, except to not let it out. I was able to get it working fine after setting and clearing the code, but when I try to roll back the changes to get the error again and narrow down the exact fix, I could not reproduce the problem. I really got it in the first rollback, but never again. Maybe there is something environmental at work?

This is not an answer for sure, but perhaps it will point someone in the right direction.

+2
source

Source: https://habr.com/ru/post/1413623/


All Articles