Sau khi một số nhà phát triển đang làm việc trên bảng phân cảnh trong một trong các ứng dụng của chúng tôi, chúng tôi hiện gặp phải lỗi này khi cố gắng mở bảng phân cảnh trong Xcode Interface Builder:Không thể mở bảng phân cảnh (com.apple.InterfaceBuilder lỗi -1.)
Không thể mở tài liệu "MainStoryboard_iPhone.storyboard". Thao tác không thể hoàn thành. (com.apple.InterfaceBuilder lỗi -1.)
Kiểm tra nhật ký bảng điều khiển để biết thêm thông tin.
Tất cả chúng ta đang chạy phiên bản mới nhất của Xcode (4.6.2 4H1003) và tất cả các thay đổi đã được thực hiện cho bảng phân cảnh trong Trình tạo giao diện. Không có thông tin bổ sung nào hiển thị trong nhật ký bảng điều khiển. Tôi giả định lỗi là đề cập đến cùng một bảng điều khiển đăng nhập, nơi các báo cáo đăng nhập và gỡ lỗi xuất hiện, hoàn toàn trống.
Một trong những nhà phát triển nhận được lỗi này khi cố gắng mở bảng phân cảnh trong một ứng dụng khác mà tôi đang thực hiện. Câu chuyện này mở ra tốt cho tôi trong Xcode trên máy tính của tôi tuy nhiên, vì vậy chúng tôi không bao giờ bận tâm để nhìn vào lỗi nhiều hơn vào thời điểm đó (điều này xảy ra lần đầu tiên một vài tháng trước). Nhưng lần này, tất cả chúng ta đều gặp lỗi tương tự (4 trong số chúng tôi đã thử nghiệm mở nó trên máy tính của chính mình).
Chúng tôi đang sử dụng GitHub để quản lý kiểm soát nguồn của chúng tôi trên cả hai dự án, sử dụng một số khách hàng Git khác nhau. Bất kỳ ý tưởng nào về những gì gây ra lỗi này và cách sửa lỗi đó?
UPDATE: Đây là sản phẩm để /var/logs/system.log trên máy tính của tôi sau khi cố gắng mở các kịch bản:
Jun 5 16:38:44 my-computer-host-name Xcode[271]: Exception raised while unarchiving document objects - *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
Jun 5 16:38:45 my-computer-host-name Xcode[271]: [MT] DVTAssertions: Warning in /SourceCache/IDEKit/IDEKit-2113/Framework/Classes/Editor/IDEEditorDocument.m:1364
Details: Message sent to invalidated IBStoryboardDocument instance <IBStoryboardDocument: 0x40ecc34c0>. Backtrace for invalidation:
0 0x000000010d814f86 -[IDEEditorDocument _invalidate] (in IDEKit)
1 0x000000010d883291 -[IDEEditorDocument initForURL:withContentsOfURL:ofType:error:] (in IDEKit)
2 0x00000001103005d0 -[IBDocument initForURL:withContentsOfURL:ofType:error:] (in IDEInterfaceBuilderKit)
3 0x000000010d882efd +[IDEDocumentController _newEditorDocumentWithClass:forURL:withContentsOfURL:ofType:extension:error:] (in IDEKit)
4 0x000000010d882dba -[IDEEditorContext _newEditorDocumentWithClass:forURL:withContentsOfURL:ofType:extension:error:] (in IDEKit)
5 0x000000010d88290c -[IDEEditorContext _openNavigableItem:withContentsOfURL:documentExtension:shouldInstallEditorBlock:] (in IDEKit)
6 0x000000010d991628 -[IDEEditorContext _notifyDelegateAndOpenNavigableItem:withContentsURL:documentExtensionIdentifier:locationToSelect:annotationRepresentedObject:stateDictionary:annotationWantsIndicatorAnimation:exploreAnnotationRepresentedObject:highlightSelection:] (in IDEKit)
7 0x000000010d8bfe7b -[IDEEditorContext _notifyDelegateAndOpenEditorOpenSpecifier:updateHistory:] (in IDEKit)
8 0x000000010d8bf99c -[IDEEditorContext _openEditorOpenSpecifier:updateHistory:] (in IDEKit)
9 0x000000010d8bf8ba -[IDEEditorContext openEditorOpenSpecifier:] (in IDEKit)
10 0x000000010d8cbf40 -[IDEEditorGeniusMode openEditorOpenSpecifier:editorContext:] (in IDEKit)
11 0x000000010d8bf76e -[IDEEditorArea _openEditorOpenSpecifier:editorContext:takeFocus:] (in IDEKit)
12 0x000000010d9a3174 __108+[IDEEditorCoordinator _doOpenEditorOpenSpecifier:forWorkspaceTabController:editorContext:target:takeFocus:]_block_invoke (in IDEKit)
13 0x000000010d8bf6cc +[IDEEditorCoordinator _doOpenWithWorkspaceTabController:editorContext:target:allowFallback:documentURL:usingBlock:] (in IDEKit)
14 0x000000010d8bf12d +[IDEEditorCoordinator _doOpenEditorOpenSpecifier:forWorkspaceTabController:editorContext:target:takeFocus:] (in IDEKit)
15 0x000000010d8bed45 -[_IDEOpenRequest _runIfNecessary] (in IDEKit)
16 0x00007fff8bfde395 __NSFireDelayedPerform (in Foundation)
17 0x00007fff8b169804 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ (in CoreFoundation)
18 0x00007fff8b16931d __CFRunLoopDoTimer (in CoreFoundation)
19 0x00007fff8b14ead9 __CFRunLoopRun (in CoreFoundation)
20 0x00007fff8b14e0e2 CFRunLoopRunSpecific (in CoreFoundation)
21 0x00007fff8ac57eb4 RunCurrentEventLoopInMode (in HIToolbox)
22 0x00007fff8ac57c52 ReceiveNextEventCommon (in HIToolbox)
23 0x00007fff8ac57ae3 BlockUntilNextEventMatchingListInMode (in HIToolbox)
24 0x00007fff85f5d563 _DPSNextEvent (in AppKit)
25 0x00007fff85f5ce22 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit)
26 0x00007fff85f541d3 -[NSApplication run] (in AppKit)
27 0x00007fff85ef8c06 NSApplicationMain (in AppKit)
28 0x000000010cbc9b6f (in Xcode)
29 0x000000010cbc9b00 (in Xcode)
30 0x0000000000000002
Object: <IBStoryboardDocument: 0x40ecc34c0>
Method: -updateChangeCount:
Thread: <NSThread: 0x40030a220>{name = (null), num = 1}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
Và đây là sản phẩm ghi trên máy tính dev khác sau cố gắng mở bảng phân cảnh trong dự án khác mà chúng tôi nhận được lỗi tương tự trên (đây là bảng phân cảnh mở ra tốt trên máy tính của tôi):
Jun 5 17:20:13 other-dev-computer-host-name Xcode[157]: Exception raised while unarchiving document objects - *** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
Jun 5 17:20:13 other-dev-computer-host-name Xcode[157]: [MT] DVTAssertions: Warning in /SourceCache/IDEKit/IDEKit-2113/Framework/Classes/Editor/IDEEditorDocument.m:1364
Details: Message sent to invalidated IBStoryboardDocument instance <IBStoryboardDocument: 0x409ec3340>. Backtrace for invalidation:
0 0x000000010d746f86 -[IDEEditorDocument _invalidate] (in IDEKit)
1 0x000000010d7b5291 -[IDEEditorDocument initForURL:withContentsOfURL:ofType:error:] (in IDEKit)
2 0x00000001102755d0 -[IBDocument initForURL:withContentsOfURL:ofType:error:] (in IDEInterfaceBuilderKit)
3 0x000000010d7b4efd +[IDEDocumentController _newEditorDocumentWithClass:forURL:withContentsOfURL:ofType:extension:error:] (in IDEKit)
4 0x000000010d7b4dba -[IDEEditorContext _newEditorDocumentWithClass:forURL:withContentsOfURL:ofType:extension:error:] (in IDEKit)
5 0x000000010d7b490c -[IDEEditorContext _openNavigableItem:withContentsOfURL:documentExtension:shouldInstallEditorBlock:] (in IDEKit)
6 0x000000010d7d9c96 -[IDEEditorContext _openNavigableItem:withContentsOfURL:shouldInstallEditorBlock:] (in IDEKit)
7 0x000000010d8c3667 -[IDEEditorContext _notifyDelegateAndOpenNavigableItem:withContentsURL:documentExtensionIdentifier:locationToSelect:annotationRepresentedObject:stateDictionary:annotationWantsIndicatorAnimation:exploreAnnotationRepresentedObject:highlightSelection:] (in IDEKit)
8 0x000000010d7f1e7b -[IDEEditorContext _notifyDelegateAndOpenEditorOpenSpecifier:updateHistory:] (in IDEKit)
9 0x000000010d7f199c -[IDEEditorContext _openEditorOpenSpecifier:updateHistory:] (in IDEKit)
10 0x000000010d7f18ba -[IDEEditorContext openEditorOpenSpecifier:] (in IDEKit)
11 0x000000010d7f189f -[IDEEditorModeViewController openEditorOpenSpecifier:editorContext:] (in IDEKit)
12 0x000000010d7f176e -[IDEEditorArea _openEditorOpenSpecifier:editorContext:takeFocus:] (in IDEKit)
13 0x000000010d8d5174 __108+[IDEEditorCoordinator _doOpenEditorOpenSpecifier:forWorkspaceTabController:editorContext:target:takeFocus:]_block_invoke (in IDEKit)
14 0x000000010d7f16cc +[IDEEditorCoordinator _doOpenWithWorkspaceTabController:editorContext:target:allowFallback:documentURL:usingBlock:] (in IDEKit)
15 0x000000010d7f112d +[IDEEditorCoordinator _doOpenEditorOpenSpecifier:forWorkspaceTabController:editorContext:target:takeFocus:] (in IDEKit)
16 0x000000010d7f0d45 -[_IDEOpenRequest _runIfNecessary] (in IDEKit)
17 0x00007fff98955395 __NSFireDelayedPerform (in Foundation)
18 0x00007fff909bd804 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ (in CoreFoundation)
19 0x00007fff909bd31d __CFRunLoopDoTimer (in CoreFoundation)
20 0x00007fff909a2ad9 __CFRunLoopRun (in CoreFoundation)
21 0x00007fff909a20e2 CFRunLoopRunSpecific (in CoreFoundation)
22 0x00007fff92e5eeb4 RunCurrentEventLoopInMode (in HIToolbox)
23 0x00007fff92e5ec52 ReceiveNextEventCommon (in HIToolbox)
24 0x00007fff92e5eae3 BlockUntilNextEventMatchingListInMode (in HIToolbox)
25 0x00007fff96036563 _DPSNextEvent (in AppKit)
26 0x00007fff96035e22 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit)
27 0x00007fff9602d1d3 -[NSApplication run] (in AppKit)
28 0x00007fff95fd1c06 NSApplicationMain (in AppKit)
29 0x000000010caf9b6f (in Xcode)
30 0x000000010caf9b00 (in Xcode)
31 0x0000000000000002
Object: <IBStoryboardDocument: 0x409ec3340>
Method: -updateChangeCount:
Thread: <NSThread: 0x40030a1a0>{name = (null), num = 1}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
Cả hai đầu ra nhật ký đều rất giống nhau. Có một dòng bổ sung trong ngăn xếp cuộc gọi của đầu ra thứ 2 tại dòng 6: [IDEEditorContext _openNavigableItem:withContentsOfURL:shouldInstallEditorBlock:] (in IDEKit)
. Và dòng 11 (10 ngày 1) tham chiếu phương thức IDEEditorModeViewController
thay vì IDEEditorGeniusMode
. Nếu không, kết quả đầu ra của nhật ký sẽ giống hệt nhau.
Lưu ý, bảng phân cảnh thứ 2 mà chúng tôi nhận được lỗi này ban đầu sẽ không gặp sự cố với các xung đột hợp nhất Git vì tôi là nhà phát triển duy nhất đã làm việc trên bảng phân cảnh này. Tôi chưa bao giờ cần hợp nhất các cam kết vào kho lưu trữ này vì tôi là nhà phát triển duy nhất đóng góp vào nó.
Bạn có thể kiểm tra phiên bản trước của bảng phân cảnh và mở phiên bản thành công bằng cùng một cài đặt Xcode trên cùng một máy tính không? –
có thể trùng lặp với lỗi [com.apple.InterfaceBuilder -1. Bảng phân cảnh không thể mở được] (http://stackoverflow.com/questions/17495793/com-apple-interfacebuilder-error-1-storyboard-can-not-be-opened) – Laszlo