只在已归档的Mac OS X产品中显示的错误 [英] Bug that only appears in archived Mac OS X product

查看:236
本文介绍了只在已归档的Mac OS X产品中显示的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的朋友和我正在为Mac应用商店开发一个应用。我们将它提交给应用商店,但苹果拒绝了它,在我们自己以前从未遇到的错误的基础上。我们很难再现错误,但经过一段时间的调试后,我们发现该错误只出现在归档的产品中。

My friend and I are developing an app for the Mac app store. We submitted it to the app store but Apple rejected it on the basis of a bug we'd never experienced before ourselves. We had a hard time reproducing the error, but after quite some time debugging we found out that the bug only appears in an archived product.

错误的症状是我们的应用程序中的一些按钮突然停止响应后使用该应用程序的随机时间。我们唯一一次看到这个问题是在归档的应用程序,所以试图找出导致问题的原因是很困难的。

The symptom of the bug is that some of the buttons in our app suddenly stop responding after using the app for a random amount of time. The only time we see this problem is in an archived app, so trying to find out what causes the problem is difficult.

当我们归档我们的应用程序实际发生了什么?它与直接在Xcode中运行的构建有什么不同?

What is actually happening when we archive our app? How does it differ from a build running directly in Xcode? Have anyone of you experienced a similar problem?

推荐答案

您找到的是heisenbug。

What you have found is a heisenbug.

当你构建你的代码进行调试时,编译器不会优化你的最终构建产品。当您归档应用程序时,编译器将优化最终产品,使其运行更快,占用更少的内存。您的错误只会在您优化代码时显示。

When you build your code for debugging, the compiler does not optimize your final build product. When you archive your application, the compiler will optimize the final product to make it run faster and take less memory. Your bug only shows up when you have optimized code.

您可能遇到死锁或某些其他竞争条件,它们不在应用程序的调试版本中。

You could be experiencing a deadlock or some other race condition that isn't present in the debug version of your application. You could build and run against your release configuration of your target and see if you can identify where it might be occurring.

但是,如果没有看到代码,那么SO就不会对你有很大的帮助。祝你好运!

Without seeing the code, however, SO won't be much help to you. Good Luck!

这篇关于只在已归档的Mac OS X产品中显示的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆