折腾:
后,继续去尝试把本地代码上传到git上。
去拷贝一份代码出来,再去用Xcode打开,结果点击xib文件:
后,就崩溃闪退
试了多次。还是问题依旧。
重启Mac,问题依旧。
换用Xcode9.1或9.2,问题依旧。
pod install: ➜ inquzhou_ios git:(master) ✗ pod install Analyzing dependencies Downloading dependencies Using AFNetworking (2.6.3) Using MBProgressHUD (0.9.2) Using MJRefresh (3.1.0) Using RaptureXML@Gilt (1.0.11) Using Realm (0.98.8) Using SDWebImage (3.7.6) Using SSZipArchive (1.4) Using TCBlobDownload (2.1.1) Using UMengAnalytics (4.1.0) Using UMengSocial (5.0) Using YYModel (1.0.3) Generating Pods project Integrating client project Sending stats Pod installation complete! There are 11 dependencies from the Podfile and 11 total pods installed.
后,问题依旧。
想要去:
pod update
结果却install半天无法结束,所以放弃。
再去试试,可以update了:
inquzhou_ios git:(master) ✗ pod update Update all pods Updating local specs repositories $ /usr/bin/git -C /Users/crifan/.cocoapods/repos/master fetch origin --progress remote: Counting objects: 122, done. remote: Compressing objects: 100% (115/115), done. remote: Total 122 (delta 76), reused 2 (delta 0), pack-reused 0 Receiving objects: 100% (122/122), 14.08 KiB | 120.00 KiB/s, done. Resolving deltas: 100% (76/76), completed with 43 local objects. From https://github.com/CocoaPods/Specs 02bf162329a..599d9e7b34b master -> origin/master $ /usr/bin/git -C /Users/crifan/.cocoapods/repos/master rev-parse --abbrev-ref HEAD master $ /usr/bin/git -C /Users/crifan/.cocoapods/repos/master reset --hard origin/master HEAD is now at 599d9e7b34b [Delete] CIBOpenCV 0.1.1 CocoaPods 1.4.0.beta.2 is available. To update use: `sudo gem install cocoapods --pre` [!] This is a test version we'd love you to try. For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.4.0.beta.2 Analyzing dependencies Downloading dependencies Using AFNetworking (2.6.3) Using MBProgressHUD (0.9.2) Using MJRefresh (3.1.0) Using RaptureXML@Gilt (1.0.11) Using Realm (0.98.8) Using SDWebImage (3.7.6) Installing SSZipArchive 1.8.1 (was 1.4) Using TCBlobDownload (2.1.1) Installing UMengAnalytics 4.2.4 (was 4.1.0) Using UMengSocial (5.0) Using YYModel (1.0.3) Generating Pods project Integrating client project Sending stats Pod installation complete! There are 11 dependencies from the Podfile and 11 total pods installed.
结果,问题依旧。
点击别的xib:
也会崩溃。
所以去搜:
xcode 9 click xib crash
ios – xcode 9 crash when open storyboard – Stack Overflow
试试:
Open Quickly
不过此处是:
不是Finder中打开INQuzhou.xcworkspace
而是直接打开Xcode
然后此处还出现:
点击Choose Device后,貌似没有崩溃,至少xib是显示出来内容了:
再去试试另外的之前的xib:
也就可以了:
【总结】
此处Xcode9.1或9.2都有bug。
之前可以正常点击xib打开文件的。
不知道何故,直接双击.xcworkspace后,再去点击xib会崩溃。
折腾了一堆,都不行。
后来的后来,先打开Xcode(Xcode 9.1),然后貌似就好了:
(会提示让你选择Device)此时已经打开上次推出时打开的xib文件了。
注:
期间折腾了:
- pod install
- pod update
- 重启Mac
等,不知道是否对于解决上述问题是否有影响。
【后记】
后来又遇到同样问题:
拷贝一份新代码过来,结果又是点击xib崩溃
Process: Xcode [3324] Path: /Applications/Xcode-beta.app/Contents/MacOS/Xcode Identifier: Xcode Version: 9.2 (13768) Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: Xcode [3324] User ID: 501 Date/Time: 2017-12-12 17:35:03.377 +0800 OS Version: Mac OS X 10.13.1 (17B1003) Report Version: 12 Anonymous UUID: 160C533C-378B-706C-346B-BDF1A2166BEA Time Awake Since Boot: 4800 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Application Specific Information: ProductBuildVersion: 9C34b ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-13768/IDEKit/Application/IDEDocumentController.m:2223 Details: There can only be one document registered with a given URL. newDocument:<IBXIBDocument: 0x7fd2040b4c00>( 0 -[IDEEditorDocument init] (in IDEKit) 1 -[IBDocument init] (in IDEInterfaceBuilderKit) 2 -[NSDocument initForURL:withContentsOfURL:ofType:error:] (in AppKit) 3 -[IDEEditorDocument initForURL:withContentsOfURL:ofType:error:] (in IDEKit) 4 -[IBDocument initForURL:withContentsOfURL:ofType:error:] (in IDEInterfaceBuilderKit) 5 +[IDEDocumentController _newEditorDocumentWithClass:forURL:withContentsOfURL:ofType:extension:error:] (in IDEKit) 6 +[IDEDocumentController _retainedEditorDocumentForURL:type:error:] (in IDEKit) 。。。 Thread 18: 0 libsystem_pthread.dylib 0x00007fff55affc40 start_wqthread + 0 1 ??? 0x0000000000000010 0 + 16 Thread 19: 0 libsystem_pthread.dylib 0x00007fff55affc40 start_wqthread + 0 Thread 20: 0 libsystem_kernel.dylib 0x00007fff559c61d2 __semwait_signal + 10 1 libsystem_c.dylib 0x00007fff55941754 nanosleep + 199 2 com.apple.CoreSymbolicationDT 0x000000010cde6c05 cleaner_thread_main(void*) + 41 3 libsystem_pthread.dylib 0x00007fff55b006c1 _pthread_body + 340 4 libsystem_pthread.dylib 0x00007fff55b0056d _pthread_start + 377 5 libsystem_pthread.dylib 0x00007fff55affc5d thread_start + 13 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x00007fff8eec6340 rcx: 0x00007ffee6540628 rdx: 0x0000000000000000 rdi: 0x0000000000000307 rsi: 0x0000000000000006 rbp: 0x00007ffee6540660 rsp: 0x00007ffee6540628 r8: 0x00007fff88947350 r9: 0x000000010b9439d5 r10: 0x0000000000000000 r11: 0x0000000000000206 r12: 0x0000000000000307 r13: 0x0000000000000000 r14: 0x0000000000000006 r15: 0x000000000000002d rip: 0x00007fff559c5fce rfl: 0x0000000000000206 cr2: 0x00000001059cab3a Logical CPU: 0 Error Code: 0x0200014e Trap Number: 133 Binary Images: 0x1096bd000 - 0x1096beff7 com.apple.dt.Xcode (9.2 - 13768) <D5BB87CC-36E1-38B0-90A2-6284A3EEF897> /Applications/Xcode-beta.app/Contents/MacOS/Xcode 0x1096c5000 - 0x109c7afff com.apple.dt.DVTFoundation (9.2 - 13762) <8AEF8626-E483-357E-B4D3-F8A4BA694274> /Applications/Xcode-beta.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/DVTFoundation 0x109ee5000 - 0x10a262ff7 com.apple.dt.DVTKit (9.2 - 13762) <25EE604E-4204-3390-A2D9-4F4F2A208417> /Applications/Xcode-beta.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/DVTKit 0x10a4c0000 - 0x10ac2ffff com.apple.dt.IDEFoundation (9.2 - 13768) <F83705C6-D51A-38DE-A4BD-8412AE2BFD3B> /Applications/Xcode-beta.app/Contents/Frameworks/IDEFoundation.framework/Versions/A/IDEFoundation 0x10b166000 - 0x10bb25ff7 com.apple.dt.IDEKit (9.2 - 13768) <472CB415-AF86-33A9-B4E5-DCA709741B53> /Applications/Xcode-beta.app/Contents/Frameworks/IDEKit.framework/Versions/A/IDEKit 0x10c27f000 - 0x10c28dfff +libswiftAVFoundation.dylib (4.0.3 - 900.0.72) <09DD4834-1DAF-30D4-A7AB-D658C9FDD6A5> /Applications/Xcode-beta.app/Contents/Frameworks/libswiftAVFoundation.dylib 0x10c299000 - 0x10c65cfff +libswiftCore.dylib (4.0.3 - 900.0.72) <1EC6B01A-A898-38E3-8C82-2932D8A194CD> /Applications/Xcode-beta.app/Contents/Frameworks/libswiftCore.dylib …. …. …. ……. 0x7fff55a1c000 - 0x7fff55a3bfff libsystem_malloc.dylib (140.1.1) <9F0745FF-B92F-330D-8812-BB74001D1D33> /usr/lib/system/libsystem_malloc.dylib 0x7fff55a3c000 - 0x7fff55adfff3 libsystem_network.dylib (1229.21.1) <ECB15E1D-5D02-3B79-9C64-64BAAC808278> /usr/lib/system/libsystem_network.dylib 0x7fff55ae0000 - 0x7fff55aeaffb libsystem_networkextension.dylib (767.20.1) <27F139B6-3250-345D-8495-7C22A00BC488> /usr/lib/system/libsystem_networkextension.dylib 0x7fff55aeb000 - 0x7fff55af4ff3 libsystem_notify.dylib (172) <98EA3D62-7C86-30DE-8261-D020D2F1EFF3> /usr/lib/system/libsystem_notify.dylib 0x7fff55af5000 - 0x7fff55afcff7 libsystem_platform.dylib (161.20.1) <9090E7AA-5F8F-31BA-8476-7B7122CC82BC> /usr/lib/system/libsystem_platform.dylib 0x7fff55afd000 - 0x7fff55b08fff libsystem_pthread.dylib (301.20.1) <8AF70211-A670-3CC7-AE24-EFE9F1C2B1E5> /usr/lib/system/libsystem_pthread.dylib 0x7fff55b09000 - 0x7fff55b0cff3 libsystem_sandbox.dylib (765.21.1) <FAC0DA75-892E-3161-9D6A-2F999D8519B6> /usr/lib/system/libsystem_sandbox.dylib 0x7fff55b0d000 - 0x7fff55b0eff3 libsystem_secinit.dylib (30) <F06ADB8F-9E94-34A7-B3C9-2C22FDD14BAD> /usr/lib/system/libsystem_secinit.dylib 0x7fff55b0f000 - 0x7fff55b16ff7 libsystem_symptoms.dylib (820.20.3) <4439B818-4C84-30E9-91B5-B7766FA74650> /usr/lib/system/libsystem_symptoms.dylib 0x7fff55b17000 - 0x7fff55b2aff7 libsystem_trace.dylib (829.20.1) <878582CE-0647-31DD-92C3-AFCD5C3A714D> /usr/lib/system/libsystem_trace.dylib 0x7fff55b2c000 - 0x7fff55b31ff7 libunwind.dylib (35.3) <6D4FCD49-D2A9-3233-95C7-A7635CE265F2> /usr/lib/system/libunwind.dylib 0x7fff55b32000 - 0x7fff55b5eff7 libxpc.dylib (1205.20.31) <58676E88-35FD-3CF3-99BB-2A82E09F8058> /usr/lib/system/libxpc.dylib External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 1 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 5270 thread_create: 0 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=833.0M resident=0K(0%) swapped_out_or_unallocated=833.0M(100%) Writable regions: Total=1.5G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.5G(100%) VIRTUAL REGION REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Accelerate framework 640K 5 Activity Tracing 256K 2 CG backing stores 15.9M 5 CG image 7824K 108 CG raster data 308K 35 CoreAnimation 78.5M 265 CoreGraphics 8K 2 CoreImage 472K 43 CoreUI image data 6228K 39 CoreUI image file 316K 12 Dispatch continuations 8192K 2 Foundation 160K 6 Image IO 572K 23 JS JIT generated code 8K 3 JS JIT generated code (reserved) 1.0G 2 reserved VM address space (unallocated) Kernel Alloc Once 8K 2 MALLOC 360.9M 144 MALLOC guard page 192K 43 MALLOC_LARGE (reserved) 516K 2 reserved VM address space (unallocated) Memory Tag 242 12K 2 Memory Tag 244 128K 3 Memory Tag 251 40K 4 Memory Tag 255 32K 2 SQLite page cache 4928K 25 STACK GUARD 56.1M 22 Stack 18.2M 22 VM_ALLOCATE 152K 27 WebKit Malloc 1056K 4 __DATA 75.6M 620 __FONT_DATA 4K 2 __GLSLBUILTINS 2588K 2 __LINKEDIT 261.5M 203 __TEXT 571.5M 599 __UNICODE 560K 2 libnetwork 128K 2 mapped file 333.3M 305 shared memory 684K 18 =========== ======= ======= TOTAL 2.8G 2570 TOTAL, minus reserved VM space 1.8G 2570
然后打开Xcode后,点击Open,选择INQuzhou.xcworkspace,结果都还是不行。
再去试试Open Recent:
结果还是不行。
xcode 9 click xib crash
xcode 9 interface builder not loading storyboard | Apple Developer Forums
ios – xcode 9 crash when open storyboard – Stack Overflow
Xib file crashes Xcode | Apple Developer Forums
help with xib file crashing xcode | Official Apple Support Communities
Interface builder designable fails to compile in Xcode 9 · Issue #10072 · mapbox/mapbox-gl-native
Xcode 9 GM crashes when opening any storyboard | Apple Developer Forums
“Cleaning build folder, clean, delete derived data, delete saved state, reboot with reopening windows, create new single view application, open storyboard.”
去清除derived data
再去Clean
结果问题依旧,点击xib崩溃。
“Try changing the “View As:” to iPhone X. Then storyboard loads quickly again.”
去把目标换成iPhone X
结果:问题依旧。
xcode9 click xib crash site:forums.developer.apple.com
Xcode9 crashes when adding multiple bar button … | Apple Developer Forums
Xcode 9 beta 6 hang | Apple Developer Forums
Not impressed with Xcode 9 | Apple Developer Forums
【后记】
同样代码,同事拿过去后,结果用其Xcode可以正常点击xib,不会崩溃
其Xcode版本为:
Xcode 9.2 9C40b
然后就是去:
结果换用最新的Xcode 9.2 9C40b
依旧是:点击xib,Xcode崩溃。
去删除:
/Users/crifan/Library/Developer/Xcode/DerivedData
clean后,再去试试,问题依旧。
重启Mac结果,问题依旧。
算了,懒得理会了。
感觉最大可能还是Xcode自己的问题吧。
【后记 2017-12-22】
不知道是什么原因:
是最新macOS升级到最新的10.13.2 (17C88)?
还是刚才Mac显示出问题,重启了Mac
总之,现在Xcode 9.2去打开项目,点击xib,又不会崩溃,可以正常打开了:
诡异。
转载请注明:在路上 » 【已解决】Xcode9中点击xib就崩溃