New to iOS dev but not new to coding. Using XCode 8.0 and going through the FoodTracker tutorial I am receiving what seems to be a similar error message in Lesson 4 (Work with View Controllers). The provided code also gives the same error message. It happens when I click on the ImageView in the simulator. It says "Thread 9: signal SIGABRT" which I take to mean an exception was thrown and not handled by the app. I added a breakpoint for all exceptions but the breakpoint isn't catching anything and I'm not sure what the error is telling me to fix.
Error:
Unable to capture view hierarchy.
Details: Error fetching view hierarchy: (
"Exception gathering view hierarchy information: -[UIApplication _performWithUICACommitStateSnapshotting:] must be called on the main thread
(
0 CoreFoundation
0x000000010420434b __exceptionPreprocess + 171
1 libobjc.A.dylib
0x000000010156521e objc_exception_throw + 48
2 CoreFoundation
0x0000000104208442 +[NSException raise:format:arguments:] + 98
3 Foundation
0x0000000101131e09 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
4 UIKit
0x0000000101a407c2 -[UIApplication _performWithUICACommitStateSnapshotting:] + 305
5 UIKit
0x0000000101dd2ecc +[UIScreen _beginDisableScreenUpdatesForSnapshotUsingSnapshotCover:] + 622
6 UIKit
0x0000000101ad59a3 __53-[UIView drawViewHierarchyInRect:afterScreenUpdates:]_block_invoke + 40
7 UIKit
0x0000000101afefcc +[_UIReplicantView _pendingSnapshotOfTarget:snapshotBlock:] + 705
8 UIKit
0x0000000101ad588c -[UIView drawViewHierarchyInRect:afterScreenUpdates:] + 263
9 libViewDebuggerSupport.dylib
0x000000010101ad9f +[DBGViewDebuggerSupport_iOS _renderEffectViewUsingDrawHierarchyInRect:] + 2081
10 libViewDebuggerSupport.dylib
0x000000010101a07d +[DBGViewDebuggerSupport_iOS snapshotView:errorString:] + 524
11 libViewDebuggerSupport.dylib
0x000000010101d8ac +[DBGViewDebuggerSupport _snapshotView:andAddDataToDictionary:] + 82
12 libViewDebuggerSupport.dylib
0x000000010101d5d6 +[DBGViewDebuggerSupport collectViewInfo:] + 178
13 libViewDebuggerSupport.dylib
0x000000010101def4 +[DBGViewDebuggerSupport _collectSubviewInfoForView:encodeLayers:] + 43
14 libViewDebuggerSupport.dylib
0x000000010101e062 +[DBGViewDebuggerSupport _collectSubviewInfoForView:encodeLayers:] + 409
15 libViewDebuggerSupport.dylib
0x000000010101e062 +[DBGViewDebuggerSupport _collectSubviewInfoForView:encodeLayers:] + 409
16 libViewDebuggerSupport.dylib
0x000000010101e062 +[DBGViewDebuggerSupport _collectSubviewInfoForView:encodeLayers:] + 409
17 libViewDebuggerSupport.dylib
0x000000010101e062 +[DBGViewDebuggerSupport _collectSubviewInfoForView:encodeLayers:] + 409
18 libViewDebuggerSupport.dylib
0x000000010101e062 +[DBGViewDebuggerSupport _collectSubviewInfoForView:encodeLayers:] + 409
19 libViewDebuggerSupport.dylib
0x000000010101e062 +[DBGViewDebuggerSupport _collectSubviewInfoForView:encodeLayers:] + 409
20 libViewDebuggerSupport.dylib
0x000000010101d0ac +[DBGViewDebuggerSupport fetchViewHierarchy] + 661
21 ???
0x0000000119cafc4b 0x0 + 4727700555
22 FoodTracker
0x0000000100f7a350 main + 0
23 libsystem_c.dylib
0x00000001051d6ff7 abort + 129
24 libsystem_sim_kernel.dylib
0x00000001052a794b __interposition_sim_fallback_abort_with_payload + 0
25 libsystem_sim_kernel.dylib
0x00000001052a795a __interposition_sim_fallback_terminate_with_reason + 0
26 TCC
0x000000010dc3954b __TCCAccessRequest_block_invoke_2.80 + 0
27 TCC
0x000000010dc39473 __CRASHING_DUE_TO_PRIVACY_VIOLATION__ + 0
28 TCC
0x000000010dc3c6c3 __tccd_send_block_invoke + 268
29 libxpc.dylib
0x00000001053fbfc7 _xpc_connection_reply_callout + 45
30 libxpc.dylib
0x00000001053f3d1b _xpc_connection_call_reply + 36
31 libdispatch.dylib
0x00000001050e20cd _dispatch_client_callout + 8
32 libdispatch.dylib
0x00000001050c1366 _dispatch_queue_override_invoke + 1426
33 libdispatch.dylib
0x00000001050c33b7 _dispatch_root_queue_drain + 720
34 libdispatch.dylib
0x00000001050c308b _dispatch_worker_thread3 + 123
35 libsystem_pthread.dylib
0x000000010548b4de _pthread_wqthread + 1129
36 libsystem_pthread.dylib
0x0000000105489341 start_wqthread + 13
)"
)
Method: -[DBGAbstractViewDescriber handleFetchedViewInfo:fetchError:resultHandler:]
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.