2012-10-01 62 views
1

當我嘗試在故事板中編輯UILabels時,Xcode會崩潰。任何想法可能導致這種情況?看起來它與自動佈局約束之一有關。這裏的錯誤報告:Xcode 4.5故事板崩潰

Process:   Xcode [43938] 
Path:   /Applications/Xcode.app/Contents/MacOS/Xcode 
Identifier:  com.apple.dt.Xcode 
Version:   4.5 (1839) 
Build Info:  IDEApplication-1839000000000000~3 
App Item ID:  497799835 
App External ID: 10747437 
Code Type:  X86-64 (Native) 
Parent Process: launchd [43283] 

Date/Time:  2012-10-01 09:43:36.443 -0400 
OS Version:  Mac OS X 10.7.4 (11E53) 
Report Version: 9 
Sleep/Wake UUID: 8C7C93A7-0BEF-42C6-944C-488D8C7896DD 

Interval Since Last Report:   152594 sec 
Crashes Since Last Report:   6 
Per-App Interval Since Last Report: 135715 sec 
Per-App Crashes Since Last Report: 5 
Anonymous UUID:      E745D8FE-362B-4FD2-8594-7EC5C26767B2 

Crashed Thread: 0 Dispatch queue: com.apple.main-thread 

Exception Type: EXC_CRASH (SIGABRT) 
Exception Codes: 0x0000000000000000, 0x0000000000000000 

Application Specific Information: 
ProductBuildVersion: 4G182 
ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilderCocoaTouch/IDEInterfaceBuilderCocoaTouch-1926/IBPlugin/Utilities/IBObjectMarshalling.m:651 
Details: Failed to start deciding frames for IBNSLayoutConstraint, IBUILabel, IBUITabBarItem, IBUITableView, IBUIView, and IBUIViewController. 

Interface Builder encountered an error communicating with the iOS Simulator. If you choose to file a crash report or radar for this issue, please check Console.app for crash reports for "Interface Builder Cocoa Touch Tool" and include their content in your crash report. 

Exception name: IBAssertionFailure 
Exception reason: ASSERTION FAILURE: realConstraint 
Reason:  Should have found real constraint for represented constraint <NSLayoutConstraint:0x86a8c30 H:[UIView:0x868a0f0(71)]> 
File:  /SourceCache/IBAutolayoutFoundationIOS/IBAutolayoutFoundation-1818/Framework/Classes/Arbitration/IBAutolayoutEngine.m:223 
Method:  __76-[IBAutolayoutEngine realConstraintsFromCollectionOfRepresentedConstraints:]_block_invoke_0 
Exception backtrace: 
    0. CoreFoundation   0x022a4012 __exceptionPreprocess 
    1. libobjc.A.dylib   0x01703e7e objc_exception_throw 
    2. CoreFoundation   0x0232cfb1 -[NSException raise] 
    3. ???      0x0000beae [IBCocoaTouchTool startAutolayoutFrameDecisionSessionWithRequest:document:] 
    4. ???      0x000342a5 [IBMessageReceiveChannel deliverMessage:toTarget:withArguments:result:] 
    5. ???      0x00033fa9 [IBMessageReceiveChannel deliverMessage:toTarget:withArguments:result:] 
    6. ???      0x00033c47 [IBMessageReceiveChannel runBlockingReceiveLoopNotifyingQueue:notifyingTarget:] 
    7. libdispatch.dylib  0x04c3d731 _dispatch_barrier_sync_f_slow_invoke 
    8. libdispatch.dylib  0x04c4c014 _dispatch_client_callout 
    9. libdispatch.dylib  0x04c3c7d5 _dispatch_main_queue_callback_4CF 
10. CoreFoundation   0x0224aaf5 __CFRunLoopRun 
11. CoreFoundation   0x02249f44 CFRunLoopRunSpecific 
12. CoreFoundation   0x02249e1b CFRunLoopRunInMode 
13. Foundation    0x01308c7c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] 
14. ???      0x0000cf06 [IBCocoaTouchTool startServingReceiveChannel:] 
15. ???      0x0000d09f [IBCocoaTouchTool startServingWithSocket:] 
16. ???      0x0000e1b7 [IBCocoaTouchTool .cxx_destruct] 
17. ???      0x00002365 ??? 
Exception info:{ 
} 
+0

我在使用故事板中的元素時遇到了Xcode崩潰的問題,但在Google搜索後找不到答案。我想添加(如果它幫助任何人找到答案):我只有在Xcode(4.5)的最新更新之後才體會到它,在複製/粘貼故事板中的圓形按鈕時以及在調整大小時標籤。我正在運行OS X 10.8.2。 – JoeFryer

+0

這裏同樣的問題。我不知道是什麼造成的,但令人難以置信的令人沮喪。 同樣,每當我嘗試添加另一個圓形按鈕時也是如此。 – Robert

回答

4

我有同樣的問題......當在「Rounded Rect Buttons」故事板工作它崩潰。有時用一個或兩個按鈕,有時我可以添加十個按鈕,然後崩潰。

編輯: 經過一些實驗後,我沒有選中故事板的「文件檢查器」中的「使用Autolayout」,它的工作原理。 也許你會試試看。

+0

感謝您的建議,當我每次添加容器視圖時,IB都會崩潰。每當我添加一個,嵌入segue就會指向視圖控制器場景,看起來像零寬度(在故事板上非常細小的場景)。取消選中「使用Autolayout」後,創建的場景與容器視圖大小相同,因爲它應該是。之後您可以重新啓用Autolayout。 – Stuart

+0

我遇到同樣的問題。不幸的是,取消選中「使用Autolayout」並不能解決問題。 –

0

解決方法是將&從故事板粘貼到.xib。

*對於我來說,當ContainerView被拖到畫布上時,它會在IB中使用.xib崩潰。 Xcode版本8.2.1。