问题描述
iPhone sdk 3.1.2,xcode 3.1.4,mac os x 10.5.8,
iPhone sdk 3.1.2, xcode 3.1.4, mac os x 10.5.8,
我是使用OCUnit的新手配有iphone sdk。我得到的唯一错误是:
I'm a newbie using OCUnit comes with iphone sdk. The only error i get is:
错误:测试装备'/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.2.sdk/Developer/usr/ bin / otest'存在异常代码139 (它可能已经崩溃)。
error: Test rig '/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.2.sdk/Developer/usr/bin/otest' existed abnormally with code 139 (it may have crashed).
有谁知道它是什么?谢谢。
Does anyone know what it is? Thanks.
编辑:我找到了原因。我把非常愚蠢的代码放在我编写单元测试的类的-dealloc中。像这样:
I found the cause. I put very stupid code in the -dealloc of the class I was writing unit tests for. Like this:
- (void)dealloc {
[someObject1 dealloc]; //wtf, dealloc?
[someObject2 dealloc]; //wtf, dealloc?
[super dealloc];
}
有时这会导致代码139,有时是138。
And sometimes this will cause code 139, sometimes 138.
推荐答案
当我看到这个时,通常意味着我的单元测试一旦出现错误逻辑并导致 otest
崩溃。这不是一个非常有用的答案,因为代码139不是一个非常有用的错误代码。对不起!
When I've seen this, it usually means that once of my unit tests has faulty logic and has caused otest
to crash. This isn't a terribly helpful answer, because code 139 isn't a terribly helpful error code. Sorry!
这篇关于iPhone OCUnit,代码139退出异常,它是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!