集合< __ NSSetM:0x174a5c8f0>在被列举时被突变

时间:2017-03-02 10:05:17

标签: ios objective-c

在子线程上引发了异常。看来我在子线程上做了一些UI任务,但你可以看到我从stacktrace调用了performSelectorOnMainThread,它让我感到困惑,任何人都可以帮助我,谢谢!

#14 Thread
NSGenericException: Collection <__NSSetM: 0x174a5c8f0> was mutated while being enumerated.
0 CoreFoundation    ___exceptionPreprocess + 124
1 libobjc.A.dylib   objc_exception_throw + 56
2 CoreFoundation    -[NSException name]
3 Foundation    -[NSISEngine substituteOutAllOccurencesOfBodyVar:withExpression:] + 388
4 Foundation    -[NSISEngine pivotToMakeBodyVar:newHeadOfRowWithHead:andDropRow:] + 360
5 Foundation    -[NSISEngine minimizeConstantInObjectiveRowWithHead:] + 172
6 Foundation    -[NSISEngine _optimizeWithoutRebuilding] + 348
7 Foundation    -[NSISEngine optimize] + 112
8 Foundation    -[NSISEngine performPendingChangeNotifications] + 112
9 UIKit -[UIView(Hierarchy) layoutSubviews] + 220
10 UIKit    -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1196
11 QuartzCore   -[CALayer layoutSublayers] + 148
12 QuartzCore   CA::Layer::layout_if_needed(CA::Transaction*) + 292
13 QuartzCore   CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 32
14 QuartzCore   CA::Context::commit_transaction(CA::Transaction*) + 252
15 QuartzCore   CA::Transaction::commit() + 512
16 QuartzCore   CA::Transaction::release_thread(void*) + 660
17 libsystem_pthread.dylib  __pthread_tsd_cleanup + 572
18 libsystem_pthread.dylib  __pthread_exit + 200
19 libsystem_pthread.dylib  pthread_exit + 44
20 Foundation   -[NSObject(NSThreadPerformAdditions) performSelectorOnMainThread:withObject:waitUntilDone:]
21 Foundation   ___NSThread__start__ + 1044
22 libsystem_pthread.dylib  __pthread_body + 240
23 libsystem_pthread.dylib  __pthread_body
24 libsystem_pthread.dylib  thread_start + 4

0 个答案:

没有答案