Why, when I first start after installation, the release build of my iPhone application crashes on the device?

I have an iPhone app that has been under development for about 2 weeks. We recently tried the "release" version of the assembly on the device, and to our great misfortune, it crashes in one of the views using "EXC_BAD_ACCESS".

This failure occurs only on devices and only in the release build. Not only that, but it only happens when you first start the application! It also plays back 100%.

We removed a small block of code that deals with persistence of data, and tried to reopen Xcode, clean up the project, uninstall and reinstall the application, etc., as some other questions suggest.

Do you have any tips for a) what might cause this problem, and b) how to debug if this happens only in the "release"?

thanks

+4
source share
2 answers

It turns out that there were no problems in the code at all.

The reason it crashed was because Xcode was trying to attach a debugger to the release build for some reason! We are still trying to figure out why, because we checked the most obvious places, but I'm sure it will not be so difficult to track.

The build works great if you install iTunes or the Xcode organizer instead of creating and running from Xcode directly, so that it will not affect your end users if you closely monitor other problems.

+4
source

We can only guess what could be the reason, but if it is 100% reproducible, then it should be a good candidate for fprintf-style debugging.

Find out the most likely place for the error to occur and start typing "Got past xxx initialization" style instructions to begin narrowing the problem. This is tiring, but in the end you will get there.

In theory, fprintf statements can affect the problem. However, it is rare that this is so, so this is a good place to start.

+1
source

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


All Articles