本文介绍了iOS Xcode-编辑情节提要对象导致视图控制器场景中的场景重复另一个场景,然后Xcode崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Sierra版本10.12.6和Xcode 8.3 ,我在Storyboard中有3个场景,这些场景都通过推送选择相互连接。



第一个场景有一个tableView和一个带有imageView和2个标签的单元格。



第二个场景有一个tableView和一个具有imageView和一个单元格4个标签。



第三个场景的tableView的单元格包含3个标签,而collectionView的collectionView的单元格具有imageView。



当我尝试调整第三个场景时,第一个和第二个场景会自动更新以匹配第三个场景中的相同元素,然后Xcode崩溃。



仅当我尝试对第三个场景进行调整时,才会出现问题。



在第三个场景中,我尝试从其视图控制器断开所有对象的连接,然后进行调整,但第一个和第二个场景仍然重复所有操作,Xcode崩溃且何时发生重新打开所有连接仍然有效(就像我从未断开连接一样)。



然后我断开了场景之间的连接,但是发生了同样的确切问题-一旦我做出调整到第三个场景后,其他两个场景将更新为匹配,然后发生崩溃。



崩溃后,我打开项目后,一切恢复正常。



第三个​​场景一直向右,里面有粉红色:



在对第三个场景进行调整之前:



我对第三项进行调整之后场景:



我尝试用深层清洁(定期清洁)清洁项目,删除派生数据,完全卸载Xcode,然后再次重新安装,但问题仍然存在。



为什么另两个场景会自动更新以匹配第三个场景?





以下是崩溃日志:

$ b $ $ b

线程5 :: com.apple.NSURL ConnectionLoader 0 libsystem_kernel.dylib
0x0000000111ceb34a mach_msg_trap + 10 1 libsystem_kernel.dylib

0x0000000111cea797 mach_msg + 55 2 com.apple.CoreFoundation

0x00007fffb2382874 3 CFRun br>
com.apple.CoreFoundation 0x00007fffb2381cf1 __CFRunLoopRun +
1361 4 com.apple.CoreFoundation 0x00007fffb2381544
CFRunLoopRunSpecific + 420 5 com.apple.CFNetwork

0x000000011152a734 + (加载程序)_resourceLoadLoop:] +
313 6 com.apple.Foundation 0x00007fffb3dc28ad
__NSThread__start
+ 1243 7 libsystem_pthread.dylib 0x0000000111dc593b _pthread_body + 180 8 libsystem_pthread.dylib

0887 _pthread_start + 286 9 libsystem_pthread.dylib

0x0000000111dc508d thread_start + 13



线程6 :: com.apple.NSEventThread 0 libsystem_kernel.dylib

0x00000 00111ceb34a mach_msg_trap + 10 1 libsystem_kernel.dylib

0x0000000111cea797 mach_msg + 55 2 com.apple.CoreFoundation

0x00007fffb2382874 __CFFoundLoopServiceMachPort + 212 3

f2cf。 __CFRunLoopRun +
1361 4 com.apple.CoreFoundation 0x00007fffb2381544
CFRunLoopRunSpecific + 420 5 com.apple.AppKit

0x00007fffaffc7f02 _NSEventThread + 205 6 libsystem_pthread.dylib
$ b $ 11dc _pthread_body + 180 7 libsystem_pthread.dylib

0x0000000111dc5887 _pthread_start + 286 8 libsystem_pthread.dylib

0x0000000111dc508d thread_start + 13



线程7 :: DYMobileDeviceManager 0 libsystem_kernel.dylib

0x0000000111ceb34a mach_msg_trap + 10 1 libsystem_kernel.dylib

0x0000000111cea797 mach_msg + 55 2 com.apple.CoreFoundation

0x00007fffb2382874 CFRunLoopServiceMachPort + 21 2 3

com.apple.CoreFoundation 0x00007fffb2381cf1 __CFRunLoopRun +
1361 4 com.apple.CoreFoundation 0x00007fffb2381544
CFRunLoopRunSpecific + 420 5 com.apple.Foundation

0x00007fff2 -[NSRunLoop(NSRunLoop)runMode:beforeDate:] + 277
6 com.apple.Foundation 0x00007fffb3db212a
-[NSRunLoop(NSRunLoop)run] + 76 7 com.apple.GPUToolsMobileFoundation 0x00000001272f525d
- [DYMobileDeviceManager _deviceNotificationThread:] + 134 8 com.apple.Foundation 0x00007fffb3dc28ad __NSThread__start
+ 1243 9 libsystem_pthread.dylib 0x0000000111dc593b _pthread_body + 180 10 libsystem_pthread.dylib 0x0000000111dcstart_b> 286 $ b 0x0000000111dc508d thread_start + 13



线程8:0 libsystem_pthread.dylib 0x0000000111dc5070
start_wqthread + 0 1 ???

0x000070000c38db80 0 + 123145507363712



线程9:0 libsystem_kernel.dylib 0x0000000111cf2bf2
psynch_cvwait + 10 1 libsystem_pthread.dylib 0x0000000111dc67fa _pthread_cond_wait + 712 2

com.apple.Xcode.DevToolsCore 0x0000000120ef3822-[XCBlockQueue
_processBlocksInThreadSlotNumber:] + 594 3 com.apple.Foundation 0x00007fffb3dc28ad __NSThread__start
+ 1243 4

libsystem_pthread.dylib
libsystem_pthread.dylib 180
5 libsystem_pthread.dylib 0x0000000111dc5887 _pthread_start +
286 6 libsystem_pthread.dylib 0x0000000111dc508d thread_start
+ 13



线程10:0 libsystem_kernel。 dylib 0x0000000111cf2bf2
psynch_cvwait + 10 1 libsystem_pthread.dylib 0x0000000111dc67fa _pthread_cond_wait + 712 2

com.apple.Xcode.DevToolsCore 0x0000000120ef3822-[XCBlockQueue
locksInThreadSlotNumber:] + 594 3 com.apple.Foundation 0x00007fffb3dc28ad __NSThread__start
+ 1243 4

libsystem_pthread.dylib 0x0000000111dc593b _pthread_body + 180
5 libsystem_pthread.dylib 0_00000001_bstart +286 6 libsystem_pthread.dylib 0x0000000111dc508d thread_start
+ 13



线程11:0 libsystem_kernel.dylib 0x0000000111cf2bf2
psynch_cvwait + 10 1 libsystem_pthread.dylib 0x0000000111dc67fa _pthread_cond_wait + 712 2

com.apple.Xcode.DevToolsCore 0x0000000120ef3822-[XCBlockQueue
_processBlocksInThreadSlotNumber:] + 594 3 com.apple.Foundation 0x00007fffb3dc28ad __NSThread__start 4
b $ b libsystem_pthread.dylib 0x0000000111dc593b _pthread_body + 180
5 libsystem_pthread.dylib 0x0000000111dc5887 _pthread_start +
286 6 libsystem_pthr ead.dylib 0x0000000111dc508d thread_start
+ 13



线程12:0 libsystem_pthread.dylib 0x0000000111dc5070
start_wqthread + 0 1 ???

0x0000000000000010 0 + 16



线程13:0 libsystem_kernel.dylib 0x0000000111cf344e
__workq_kernreturn + 10 1 libsystem_pthread.dylib 0x0000000111dc548e _pthread_wqthread + 1023 2

libsystem_pthread.dylib 0x0000000111dc507d start_wqthread + 13



线程14:0 libsystem_pthread.dylib 0x0000000111dc5070
start_wqthread + 0 1 ???

0x00007fc08b23c020 0 + 140464944824352



线程15:0 libsystem_kernel.dylib 0x0000000111cf344e
__workq_kernreturn + 10 1 libsystem_pthread.dylib 0x0000000111dc548e _pthread_wqthread + b $ b 2 b libsystem_pthread.dylib 0x0000000111dc507d start_wqthread + 13



线程16 :0 libsystem_kernel.dylib 0x0000000111cf2f46
__semwait_signal + 10 1 libsystem_c.dylib 0x00007fffc816ab72 nanosleep + 199 2 com.apple.CoreSymbolication

0x00007fffbe4f62ed cleaner_thread_main(br * $ +)42 libsystem_pthread.dylib 0x0000000111dc593b _pthread_body + 180
4 libsystem_pthread.dylib 0x0000000111dc5887 _pthread_start +
286 5 libsystem_pthread.dylib 0x0000000111dc508d thread_start
+ 13



0x0000000000000000 rbx:0x0000000000000006 rcx:0x00007fff51855448
rdx:0x0000000000000000 rdi:0x0000000000000307 rsi:
0x0000000000000006 rbp:0x00007fff51855 br>
r8:0x00007fc09a5058e0 r9:0x0000000110411897 r10:
0x0000000008000000 r11:0x0000000000000206 r12:0x00007fffc77c8410
r13:0x0000000000000000 r14:0x0000000111dc d3c0 r15:
0x00007fc0a096d640 rip:0x0000000111cf2d42 rfl:0x0000000000000206
cr2:0x00007fffd1019128逻辑CPU:0错误代码:

0x02000148陷阱号:133



解决方案

由于您的library / caches文件夹中的IBCocoaTouchAutolayoutArbitrationUnit.m文件,Xcode崩溃了。根据此,您可以删除库中的文件/ caches文件夹(请勿删除该文件夹本身),您应该可以。那应该解决问题。但是为了安全起见,您可能应该将此文件移到另一个位置而不是删除。另外,尝试在Xcode 9 Beta中打开工作区,以查看是否以相同的错误消息崩溃。


I'm working on Sierra version 10.12.6 and Xcode 8.3, I have 3 scenes in Storyboard that are all connected to one another via push segues.

The 1st scene has a tableView and a cell with an imageView and 2 labels.

The 2nd scene has a tableView and a cell with an imageView and 4 labels.

The 3rd scenes has a tableView with a cell that contains 3 labels and a collectionView with a cell that has an imageView.

When I try to make adjustments to the 3rd scene the 1st and 2nd scene automatically updates to match the same exact elements that are on the 3rd scene and then Xcode crashes.

The problem only happens when I try to make adjustments to the 3rd scene.

On the 3rd scene I tried to disconnect all the objects from it's view controller and then make the adjustments but the 1st and 2nd scene still duplicates everything, Xcode crashes and when it reopens all of the connections are still alive (as if I never disconnected them).

I then disconnected the segues between the scenes but the same exact problem occurs -once I make an adjustment to the 3rd scene the other two scenes update to match and then there is a crash.

After the crash once I open the project everything is back to normal.

The 3rd scene is the all the way to the right and has pink inside of it:

Before I make an adjustment on the 3rd scene:

After I make an adjustment to the 3rd scene:

I tried cleaning the project with a deep clean, a regular clean, deleting derived data, completely uninstalled Xcode then reinstalled it again but the problem still occurs.

Why are the other 2 scenes automatically updating to match the 3rd scene?

Here are the crash logs:

Thread 5:: com.apple.NSURLConnectionLoader 0 libsystem_kernel.dylib 0x0000000111ceb34a mach_msg_trap + 10 1 libsystem_kernel.dylib
0x0000000111cea797 mach_msg + 55 2 com.apple.CoreFoundation
0x00007fffb2382874 CFRunLoopServiceMachPort + 212 3
com.apple.CoreFoundation 0x00007fffb2381cf1 __CFRunLoopRun + 1361 4 com.apple.CoreFoundation 0x00007fffb2381544 CFRunLoopRunSpecific + 420 5 com.apple.CFNetwork
0x000000011152a734 +[NSURLConnection(Loader) _resourceLoadLoop:] + 313 6 com.apple.Foundation 0x00007fffb3dc28ad __NSThread__start
+ 1243 7 libsystem_pthread.dylib 0x0000000111dc593b _pthread_body + 180 8 libsystem_pthread.dylib
0x0000000111dc5887 _pthread_start + 286 9 libsystem_pthread.dylib
0x0000000111dc508d thread_start + 13

Thread 6:: com.apple.NSEventThread 0 libsystem_kernel.dylib
0x0000000111ceb34a mach_msg_trap + 10 1 libsystem_kernel.dylib
0x0000000111cea797 mach_msg + 55 2 com.apple.CoreFoundation
0x00007fffb2382874 __CFRunLoopServiceMachPort + 212 3
com.apple.CoreFoundation 0x00007fffb2381cf1 __CFRunLoopRun + 1361 4 com.apple.CoreFoundation 0x00007fffb2381544 CFRunLoopRunSpecific + 420 5 com.apple.AppKit
0x00007fffaffc7f02 _NSEventThread + 205 6 libsystem_pthread.dylib
0x0000000111dc593b _pthread_body + 180 7 libsystem_pthread.dylib
0x0000000111dc5887 _pthread_start + 286 8 libsystem_pthread.dylib
0x0000000111dc508d thread_start + 13

Thread 7:: DYMobileDeviceManager 0 libsystem_kernel.dylib
0x0000000111ceb34a mach_msg_trap + 10 1 libsystem_kernel.dylib
0x0000000111cea797 mach_msg + 55 2 com.apple.CoreFoundation
0x00007fffb2382874 CFRunLoopServiceMachPort + 212 3
com.apple.CoreFoundation 0x00007fffb2381cf1 __CFRunLoopRun + 1361 4 com.apple.CoreFoundation 0x00007fffb2381544 CFRunLoopRunSpecific + 420 5 com.apple.Foundation
0x00007fffb3db2252 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 277 6 com.apple.Foundation 0x00007fffb3db212a -[NSRunLoop(NSRunLoop) run] + 76 7 com.apple.GPUToolsMobileFoundation 0x00000001272f525d -[DYMobileDeviceManager _deviceNotificationThread:] + 134 8 com.apple.Foundation 0x00007fffb3dc28ad __NSThread__start
+ 1243 9 libsystem_pthread.dylib 0x0000000111dc593b _pthread_body + 180 10 libsystem_pthread.dylib 0x0000000111dc5887 _pthread_start + 286 11 libsystem_pthread.dylib
0x0000000111dc508d thread_start + 13

Thread 8: 0 libsystem_pthread.dylib 0x0000000111dc5070 start_wqthread + 0 1 ???
0x000070000c38db80 0 + 123145507363712

Thread 9: 0 libsystem_kernel.dylib 0x0000000111cf2bf2 psynch_cvwait + 10 1 libsystem_pthread.dylib 0x0000000111dc67fa _pthread_cond_wait + 712 2
com.apple.Xcode.DevToolsCore 0x0000000120ef3822 -[XCBlockQueue _processBlocksInThreadSlotNumber:] + 594 3 com.apple.Foundation 0x00007fffb3dc28ad __NSThread__start
+ 1243 4
libsystem_pthread.dylib 0x0000000111dc593b _pthread_body + 180 5 libsystem_pthread.dylib 0x0000000111dc5887 _pthread_start + 286 6 libsystem_pthread.dylib 0x0000000111dc508d thread_start + 13

Thread 10: 0 libsystem_kernel.dylib 0x0000000111cf2bf2 psynch_cvwait + 10 1 libsystem_pthread.dylib 0x0000000111dc67fa _pthread_cond_wait + 712 2
com.apple.Xcode.DevToolsCore 0x0000000120ef3822 -[XCBlockQueue _processBlocksInThreadSlotNumber:] + 594 3 com.apple.Foundation 0x00007fffb3dc28ad __NSThread__start
+ 1243 4
libsystem_pthread.dylib 0x0000000111dc593b _pthread_body + 180 5 libsystem_pthread.dylib 0x0000000111dc5887 _pthread_start + 286 6 libsystem_pthread.dylib 0x0000000111dc508d thread_start + 13

Thread 11: 0 libsystem_kernel.dylib 0x0000000111cf2bf2 psynch_cvwait + 10 1 libsystem_pthread.dylib 0x0000000111dc67fa _pthread_cond_wait + 712 2
com.apple.Xcode.DevToolsCore 0x0000000120ef3822 -[XCBlockQueue _processBlocksInThreadSlotNumber:] + 594 3 com.apple.Foundation 0x00007fffb3dc28ad __NSThread__start
+ 1243 4
libsystem_pthread.dylib 0x0000000111dc593b _pthread_body + 180 5 libsystem_pthread.dylib 0x0000000111dc5887 _pthread_start + 286 6 libsystem_pthread.dylib 0x0000000111dc508d thread_start + 13

Thread 12: 0 libsystem_pthread.dylib 0x0000000111dc5070 start_wqthread + 0 1 ???
0x0000000000000010 0 + 16

Thread 13: 0 libsystem_kernel.dylib 0x0000000111cf344e __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x0000000111dc548e _pthread_wqthread + 1023 2
libsystem_pthread.dylib 0x0000000111dc507d start_wqthread + 13

Thread 14: 0 libsystem_pthread.dylib 0x0000000111dc5070 start_wqthread + 0 1 ???
0x00007fc08b23c020 0 + 140464944824352

Thread 15: 0 libsystem_kernel.dylib 0x0000000111cf344e __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x0000000111dc548e _pthread_wqthread + 1023 2
libsystem_pthread.dylib 0x0000000111dc507d start_wqthread + 13

Thread 16: 0 libsystem_kernel.dylib 0x0000000111cf2f46 __semwait_signal + 10 1 libsystem_c.dylib 0x00007fffc816ab72 nanosleep + 199 2 com.apple.CoreSymbolication
0x00007fffbe4f62ed cleaner_thread_main(void*) + 42 3
libsystem_pthread.dylib 0x0000000111dc593b _pthread_body + 180 4 libsystem_pthread.dylib 0x0000000111dc5887 _pthread_start + 286 5 libsystem_pthread.dylib 0x0000000111dc508d thread_start + 13

Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x0000000000000006 rcx: 0x00007fff51855448 rdx: 0x0000000000000000 rdi: 0x0000000000000307 rsi: 0x0000000000000006 rbp: 0x00007fff51855470 rsp: 0x00007fff51855448
r8: 0x00007fc09a5058e0 r9: 0x0000000110411897 r10: 0x0000000008000000 r11: 0x0000000000000206 r12: 0x00007fffc77c8410 r13: 0x0000000000000000 r14: 0x0000000111dcd3c0 r15: 0x00007fc0a096d640 rip: 0x0000000111cf2d42 rfl: 0x0000000000000206 cr2: 0x00007fffd1019128 Logical CPU: 0 Error Code:
0x02000148 Trap Number: 133

解决方案

Xcode is crashing because of the the IBCocoaTouchAutolayoutArbitrationUnit.m file in your library/caches folder. According to this link, you can just delete the files in your library/caches folder (don't delete the folder itself) and you should be fine. That should fix the problem. But to play it on the safe side, you probably should move this file to another location instead of deleting. Also try opening your workspace in Xcode 9 beta to see if it crashes the same way with the same error message.

这篇关于iOS Xcode-编辑情节提要对象导致视图控制器场景中的场景重复另一个场景,然后Xcode崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 08:08