how to find and fix the cause of the crash

倾然丶 夕夏残阳落幕 提交于 2019-12-24 08:57:04

问题


I submited an app to the app store and it was rejected due to:

"We found that your app crashed on iPhone 5 running iOS 6.1.2, which is not in compliance with the App Store Review Guidelines.

Your app crashed when we:

when the user taps to sign into the app, a crash is produced.

This occurred when your app was used:

  • On Wi-Fi
  • On cellular network

Your app may encounter this issue if it is using too much memory. To learn more about iOS memory usage and how to track memory usage and leaks, please see the Memory Usage Performance Guidelines."

I couldn't trigger the crash again on my side. I profiled my app with the allocations instrument, and saw that that my live bytes never exceeded 12MB. With the leaks instrument I figured out that I have a few leaks (all in 3rd party sources), but they are very minor and shouldn't have cause the app to crash.. I have no clue what to do..

  1. Did the app really crash due to using too much memory?
  2. Could there be another reason?
  3. How should I approach this and fix the problem?

EDIT - attached the crash log

Check out this&that, it seems like using ASIHTTPRequest framework is causing the crash some how, but only on ad-hoc or distribution builds, which makes debugging it more of a headache. Is it really the cause? Should I switch to AFNetworking instead?


回答1:


Yes, you should switch to AFNetworking, because ASIHTTPRequest is not supported any more.

To debug this issue, try to set Optimization Level to Fastest, Smalles [-Os]. This is usually the reason, why debug and release code behaves differently.




回答2:


Did the app really crash due to using too much memory?

No your app crashed because of a bad access. Normally this means you tried to access a deallocated object.

How should I approach this and fix the problem?

The crash occurs in line 132 of your Server.m (Method: registerWithUserProvider:). You should have a look at this method. Maybe a simple nil check can solve your problem but thats hard to say without code.



来源:https://stackoverflow.com/questions/15186766/how-to-find-and-fix-the-cause-of-the-crash

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!