This is really weird ...
I run my application, and while it opens, and the views are created, I get:
Collection <CALayerArray: 0x124650> was mutated while being enumerated.
The code trace goes through the following:
main
UIApplicationMain
-[UIApplication _run]
CFRunLoopRunInMode
CFRunLoopRunSpecific
_UIApplicationHandleEvent
-[UIApplication sendEvent:]
-[UIApplication handleEvent:withNewEvent:]
-[UIApplication _runWithURL:sourceBundleID:]
-[UIApplication _performInitilizationWithURL:sourceBundleID:]
-[AppDelegate applicationDidFinishLaunching:]
+[Controller initializeController]
[window addSubview: pauseMenuController.view]
-[UIView(Hierarchy) addSubview:]
-[UIView(Internal) _addSubview:positioned:relativeTo:]
-[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:]
-[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:]
-[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:]
_NSFastEnumerationMutationHandler
objc_exception_throw
I ran the game many times and many times, and I never saw this, and then suddenly appeared. The strange thing is that I do not create any other threads (which I know) until this code is called. It will be easier for me to debug this if someone can give me some explanation of what could be changed when it is available in UIView. Maybe this has something to do with adding something to the view, although it is already adding something? Any ideas?
source
share