Stupid debugging 1. Stupid debugging

Source: Internet
Author: User

Stupid debugging 1. Stupid debugging

Just yesterday, an iOS app used by the company was released through the Enterprise id because no problems were found during debugging on the real machine. Directly replaces the online files. However, after downloading and installing the program, it is found that the program will flash back after it is enabled and appears every time, which makes me very confused. It is okay to debug the real machine, why is there such a serious bug. Connect the iPhone to orgnizer immediately. Check the device logs and check whether it is a bad access error. The console also encountered the cocould not lookup ReleaseType from system version dictionary error. I checked the code for locating the bad access before finding any problems. Then we can find the releasetype issue. There is very little online information on this issue and it cannot help me solve the problem. I will start with the code. I found that it was related to dispatch_queue. I read a lot of information about him. Because I compile iOS5 and run iOS6, I suspect that the difference between the arc and dispatch_queue is 5 6, and then start tracing from this direction (in fact, I am wrong, I will talk about it later ). Constantly modify the relevant code, re-release, install and run. Since there is no problem with xcode installation, you can only debug it like this. The problem persists. Then, you can search for all relevant materials on the Internet. At, I still did not solve the problem. I can only wash and sleep. When I get up in the morning, my mind gets a lot awake. Instead of all my thoughts last night, I start with the code, comment out the code, and debug it. Check the code carefully. In the end, it is found that the while LOOP does not exit at the place where it should be exited. Will it be a problem here. After modification, release the test. Everything works. The problem is caused here. I still don't understand why the endless loop cannot be seen in the debug stage.

 

We recommend an article about iOS Device logs debugging:

Http://www.raywenderlich.com/23704/demystifying-ios-application-crash-logs

 

Summary of this experience:

1. This is a stupid bug. While endless loop. If the test is correct, it does not mean that the release is normal, because different models may have different problems.

2. The online version is not backed up, so I can only restore the oldest version. In the future, any updates should be made in the previous version.

3. I was nervous because there was no backup + debug, And I was confused. I was too confused to find a problem, which caused a lot of time waste. Be sure to be calm; otherwise, it will be messy, and your mind will not be easy.

4. Do not check the code carefully; otherwise, it will be done long ago. Although I checked it carefully for the first time, it was not comprehensive. Careful check includes comprehensive and meticulous.

5. The error "cocould not lookup ReleaseType from system version dictionary" may be caused by code problems.

6, dispatch_release in iOS6 arc does not need to be used, but in iOS6 earlier versions of the arc need http://stackoverflow.com/questions/8618632/does-arc-support-dispatch-queues

 

Why is it one, because there may be other silly things in the future?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.