简体   繁体   English

iOS App在生产时崩溃,但在调试时不崩溃

[英]iOS App crashing on production but not on debugging

I have been working on an iOS app. 我一直在开发iOS应用程序。 It was working fine until a couple of days ago, it started behaving strangely. 直到几天前,它一直运行良好,开始表现异常。 The app crashes on production but it creates no crash logs. 该应用程序在生产时崩溃,但没有创建崩溃日志。 However, when same scenario is tested out in QA, it works fine. 但是,当在QA中测试了相同的场景时,它可以正常工作。 Now I have been trying to find out the reason but without any crash logs or crash in debugging mode, it has become very difficult for me. 现在,我一直在尝试找出原因,但是没有任何崩溃日志或调试模式下的崩溃,这对我来说变得非常困难。

Any suggestion, how to tackle it? 有什么建议,如何解决?

Thanks! 谢谢!

PS I am using XCode 4.6.1 and app is for iOS 6.0. PS我正在使用XCode 4.6.1,并且该应用程序适用于iOS 6.0。

Answering my own question, I have found out after detailed research on the internet that some crashes kill the application before logging the Crash Log . 回答我自己的问题后,我在互联网上进行了详细研究后发现,某些崩溃会在记录Crash Log之前杀死应用程序。 My error was that of a delegate property for my services. 我的错误是我的服务的委托属性。 After long hard tries, I got to the root cause of the problem, since I had converted the code to ARC so the delegate property was unsafe_unreatained , which released the delegate while it was still in use by the service, so I just had to convert it into strong and set it to nil in dealloc . 经过长时间的努力,我找到了问题的根本原因,因为我已将代码转换为ARC,因此委托属性为unsafe_unreatained ,在服务仍在使用委托的情况下释放了委托,因此我只需要转换将其设置为强,并在dealloc中将其设置为nil。 Further description can be seen here: https://stackoverflow.com/a/9065105/1351911 . 可以在这里查看更多描述: https : //stackoverflow.com/a/9065105/1351911

I had the same problem, building ipa's in Xcode 4.6.1 with sdk version 6.0 or above crashes the app like anything. 我遇到了同样的问题,在Xcode 4.6.1中使用sdk 6.0或更高版本构建ipa会使应用程序崩溃。 Try archiving it in Xcode 4.4 or 4.3 may be a lower version and try. 尝试将其归档在Xcode 4.4或4.3中可能是较低的版本,然后尝试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM