2010-04-07 42 views
0

当我在xcode中对代码执行重构时,除了一个文件以外,所有文件都被正确地重构,并且当我单击以检查该文件中所做的更改时,出现以下“内部错误”: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,查看内部应该进行的更改。它会在不编辑文件的情况下引发此错误。

回答

0

在Mac OS X 10.6.3上运行的Xcode 3.2.1(64位)上效果很好,因此在我看来,您使用的是旧版本的Xcode或Beta版本。 对于将来,最好向苹果bug记者报告这样的错误,以便苹果公司的人会照顾到这个问题,因为那些是唯一的源代码:)

链接到Apple Bug报告工具: Bug Reporter

+0

非常感谢。我还没有意识到Code 3.2.2是在Beta版本中。 – 2010-04-08 13:18:04