【发布时间】:2011-07-15 17:40:19
【问题描述】:
就在最近,我开始在使用 XCode 时遇到很多麻烦。每当我在模拟器上运行我的应用程序并崩溃(引发异常或其他问题)时,模拟器会在我下次运行它时崩溃,即使我撤消了导致初始崩溃的代码。
例如,在一个 init 方法中,我调用
self = [super init];
return self;
我可以运行它一百次,每次都运行良好。但如果我打电话
self = [super init];
[super wrlgnqelrguqrngouqerngerg];
return self;
然后它应该崩溃。但是,如果我撤消随机消息调用,那么它又是
self = [super init];
return self;
我再次在模拟器上运行它,它崩溃了!即使我解开了导致崩溃的代码。当我点击运行时,它说 XCode 内部错误,当我点击显示详细信息时,它给了我这个:
ASSERTION FAILURE in /SourceCache/IDEKit/IDEKit-303/Framework/Classes/Workspace/IDEWorkspaceTabController.m:2327
Details: Assertion failed: [suppressionTargetValue isEqualToString:_kUserDefaults_IDESuppressStopExecutionWarningTargetValue_Add]
Object: <IDEWorkspaceTabController: 0x201759bc0>
Method: -_showWarningForBuild:forOtherExecution:trackersToStop:taskActionBlock:
Thread: <NSThread: 0x2000217a0>{name = (null), num = 1}
Hints: None
Backtrace:
0 0x0000000100949773 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in IDEKit)
1 0x000000010006d394 _DVTAssertionFailureHandler (in DVTFoundation)
2 0x0000000100931e02 -[IDEWorkspaceTabController _showWarningForBuild:forOtherExecution:trackersToStop:taskActionBlock:] (in IDEKit)
3 0x00000001008e830b -[IDEWorkspaceTabController _performContextTask:command:commandName:] (in IDEKit)
4 0x00007fff81fd7e9a -[NSApplication sendAction:to:from:] (in AppKit)
5 0x00000001001cf63c -[DVTApplication sendAction:to:from:] (in DVTKit)
6 0x000000010085b656 -[IDEApplication sendAction:to:from:] (in IDEKit)
7 0x00007fff81fd7e9a -[NSApplication sendAction:to:from:] (in AppKit)
8 0x00000001001cf63c -[DVTApplication sendAction:to:from:] (in DVTKit)
9 0x000000010085b656 -[IDEApplication sendAction:to:from:] (in IDEKit)
10 0x000000010031b9f3 -[DVTDelayedMenuButtonCell trackMouse:inRect:ofView:untilMouseUp:] (in DVTKit)
11 0x00007fff82062215 -[NSControl mouseDown:] (in AppKit)
12 0x00007fff81f7c34f -[NSWindow sendEvent:] (in AppKit)
13 0x00007fff81eb1a86 -[NSApplication sendEvent:] (in AppKit)
14 0x000000010085b36e -[IDEApplication sendEvent:] (in IDEKit)
15 0x00007fff81e484da -[NSApplication run] (in AppKit)
16 0x00007fff81e411a8 NSApplicationMain (in AppKit)
17 0x0000000100000eec
18 0x0000000000000002
然后我点击继续,模拟器启动,应用程序崩溃,我得到:
Couldn't register NI.nipod-app-final with the bootstrap server. Error: unknown error code.
This generally means that another instance of this process was already running or is hung in the debugger.
我已尝试重新安装 XCode。没用!
【问题讨论】:
-
您正在使用其中一个测试版吗?提交错误。即使你不是,你也可以向苹果提交错误