Xcode 4.5.1在归档时卡住了 [英] Xcode 4.5.1 get stuck when archiving

查看:290
本文介绍了Xcode 4.5.1在归档时卡住了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将我的xcode升级到4.5.1版。

一切正常,但是现在,当我存档项目时, xcode卡住/挂起并且永远不会完成存档。

处于最高状态,文字说:

I just upgraded my xcode to version 4.5.1.
Everything worked fine before but now, when I Archive the project, xcode get stuck/hanging and never finishes the archiving.
In the status on top, the text says:


编译10个源文件中的10个...

Compiling 10 of 10 source files...

之后没有任何事情发生。它只是卡住。

我仍​​然可以编译和构建代码(没有归档),一切都在模拟器中运行得很好。


我重新安装了xcode 。之后问题仍然存在。

任何建议都会受到批评。



更多信息:

我已将问题指向特定的代码行:
CGRect tmpFrame3 = seeDetailsButton.frame;

我没有看到这行有什么问题...

为什么会这样?它在模拟器中构建和运行时工作正常但归档时失败???

Nothing happens after that. It is just stuck.
I can still compile and build the code (without archiving) and everything runs just fine in the simulator.

I have reinstalled xcode. The issue still happens after that.
Any suggestion will be appriciated.

More info:
I've pinpointed the problem to a specific line of code:
CGRect tmpFrame3 = seeDetailsButton.frame;
I don't see any problem with this line...
Why would it work fine when building and running in the simulator but fail when archiving???

推荐答案

我弄清楚这里发生了什么。$
首先,它与归档过程本身无关,而与 Release 模式中的构建无关。

我在归档期间遇到问题的原因是因为它在发布模式下构建。


关于问题本身:

似乎存在某种 Apple编译器错误在xcode 4.5.1中。

我正在使用Apple LLVM编译器4.1。在编译期间,它具有不同的优化级别。

在调试中 - 优化设置为无并且关闭。在发布中,它被设置为最快,最小[-Os]。当我在发布模式下关闭优化(将其设置为'无')时 - 问题不会发生。



更多信息:

挖掘后在我的代码中,并试图找出在优化过程中会导致编译器错误的原因,我看到我有以下内容:

I figured out what is going on here.
First, it is not related to the archive process itself but to the build in Release mode.
The reason that I had the problem during archive is because then it builds in release mode.

About the issue itself:
It seems that there is some sort of an Apple compiler bug in xcode 4.5.1.
I'm using the Apple LLVM compiler 4.1. During compilation it has different optimization levels.
In Debug - the optimization is set to 'None' and is off. In release it is set to 'Fastest, Smallest [-Os]'. When I turn off the optimization in release mode (set it to 'None') - the issue does not happen.

More info:
After digging in my code, and trying to figure out what would cause a compiler bug during optimization, I saw that I had the following:

__weak ProfileButton *tmp = myButton;

其中ProfileButton只是一个常规按钮继承自UIButton。

当我删除 __弱一切正常。即使我将编译器优化设置为最快,最小[-Os]。

Where ProfileButton is just a regular button inherits from UIButton.
When I remove the __weak everything works just fine. Even when I set the compiler optimization to 'Fastest, Smallest [-Os]'.

这篇关于Xcode 4.5.1在归档时卡住了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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