Xcode在重构时引发异常

时间:2010-04-07 12:05:42

标签: objective-c xcode exception refactoring

当我在xcode中的代码上运行重构时,所有文件都被正确重构,除了一个,当我单击以检查该文件中所做的更改时,发生以下“内部错误”:

Uncaught Exception:
Invalid parameter not satisfying: fileName

Stack Backtrace:
The stack backtrace has been logged to the console.

以下是它在控制台中吐出的内容:

4/7/10 06:47:30  Xcode[35355] [MT] Uncaught Exception:
Invalid parameter not satisfying: fileName

Backtrace:
0  0x92842bbd __raiseError (in CoreFoundation)
1  0x914b9509 objc_exception_throw (in libobjc.A.dylib)
2  0x92842908 +[NSException raise:format:arguments:] (in CoreFoundation)
3  0x98801dc3 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] (in Foundation)
4  0x98db0f8e -[NSDocument(NSDeprecated) initWithContentsOfFile:ofType:] (in AppKit)
5  0x0075c07e -[PBXTextFileDocument initWithContentsOfFile:ofType:] (in DevToolsInterface)
6  0x007dc5be -[PBXFileDocument initWithFileReference:usingType:] (in DevToolsInterface)
7  0x00b1c0f8 -[XCRefactoringFileChangeSet(XCRefactoringModule_HelperMethods) referencedTextFileDocument] (in DevToolsInterface)
8  0x00b1d1f4 -[XCRefactoringEditableExistingTextFileChangeSet populateComparator:] (in DevToolsInterface)
9  0x00ab19b7 -[XCRefactoringModuleFileItem populateComparator:previewFinished:] (in DevToolsInterface)
10  0x00aa4606 -[XCRefactoringModule(MasterListDelegate) outlineViewSelectionDidChange:] (in DevToolsInterface)
11  0x987381cb _nsnote_callback (in Foundation)
12  0x927ca3f9 __CFXNotificationPost (in CoreFoundation)
13  0x927c9e2a _CFXNotificationPostNotification (in CoreFoundation)
14  0x9872d098 -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation)
15  0x9873a475 -[NSNotificationCenter postNotificationName:object:] (in Foundation)
16  0x98af1de2 -[NSTableView _enableSelectionPostingAndPost] (in AppKit)
17  0x98bd11d0 -[NSTableView mouseDown:] (in AppKit)
18  0x98bcfeea -[NSOutlineView mouseDown:] (in AppKit)
19  0x007596c3 -[PBXExtendedOutlineView mouseDown:] (in DevToolsInterface)
20  0x98b6e548 -[NSWindow sendEvent:] (in AppKit)
21  0x00757a06 -[XCWindow sendEvent:] (in DevToolsInterface)
22  0x98a871af -[NSApplication sendEvent:] (in AppKit)
23  0x006f6dec -[PBXExtendedApplication sendEvent:] (in DevToolsInterface)
24  0x98a1ac4f -[NSApplication run] (in AppKit)
25  0x98a12c85 NSApplicationMain (in AppKit)
26  0x0000eee1
27  0x000021a5

如果你想看一下我正在研究的项目,这里有一个下载我的xcodeproject的链接:     Tea Timer.zip

要重新创建我的问题,打开Timer.h,尝试将timeField重构为minuteField,使用重构的预览功能,然后选择Timer.m,查看所谓的更改。然后它会在不编辑文件的情况下引发此错误。

1 个答案:

答案 0 :(得分:0)

在Mac OS X 10.6.3上运行的Xcode 3.2.1(64位)上运行得很好,所以在我看来你使用的是旧版本的Xcode或beta版本。 对于未来,最好将此类错误报告给apple bug记者,以便来自Apple的人会处理这个问题,因为这些是唯一的源代码:)

指向Apple Bug报告工具的链接: Bug Reporter