{"action":"opened","issue":{"url":"https://api.github.com/repos/Tealium/ios-library/issues/34","labels_url":"https://api.github.com/repos/Tealium/ios-library/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/Tealium/ios-library/issues/34/comments","events_url":"https://api.github.com/repos/Tealium/ios-library/issues/34/events","html_url":"https://github.com/Tealium/ios-library/issues/34","id":120472504,"number":34,"title":"Modifying the autolayout engine from a background thread","user":{"login":"bigsprocket","id":660638,"avatar_url":"https://avatars.githubusercontent.com/u/660638?v=3","gravatar_id":"","url":"https://api.github.com/users/bigsprocket","html_url":"https://github.com/bigsprocket","followers_url":"https://api.github.com/users/bigsprocket/followers","following_url":"https://api.github.com/users/bigsprocket/following{/other_user}","gists_url":"https://api.github.com/users/bigsprocket/gists{/gist_id}","starred_url":"https://api.github.com/users/bigsprocket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigsprocket/subscriptions","organizations_url":"https://api.github.com/users/bigsprocket/orgs","repos_url":"https://api.github.com/users/bigsprocket/repos","events_url":"https://api.github.com/users/bigsprocket/events{/privacy}","received_events_url":"https://api.github.com/users/bigsprocket/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-04T19:44:26Z","updated_at":"2015-12-04T19:44:26Z","closed_at":null,"body":"Since adding Tealium Full framework to our app, we are seeing a lot of the following error message to the console:\r\n\r\n```\r\nThis application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes.  This will cause an exception in a future release.\r\n Stack:(\r\n\t0   CoreFoundation                      0x000000010b39bf45 __exceptionPreprocess + 165\r\n\t1   libobjc.A.dylib                     0x000000010ae15deb objc_exception_throw + 48\r\n\t2   CoreFoundation                      0x000000010b39be7d +[NSException raise:format:] + 205\r\n\t3   Foundation                          0x000000010ab8b289 _AssertAutolayoutOnMainThreadOnly + 79\r\n\t4   Foundation                          0x000000010a9eb4e2 -[NSISEngine optimize] + 49\r\n\t5   Foundation                          0x000000010a9ebda4 -[NSISEngine withBehaviors:performModifications:] + 245\r\n\t6   UIKit                               0x000000010be00d4a -[UIView(Hierarchy) _postMovedFromSuperview:] + 575\r\n\t7   UIKit                               0x000000010be0e7e7 -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1967\r\n\t8   UIKit                               0x000000010c0bfda2 -[UITableViewCell _textLabel] + 163\r\n\t9   Direct Energy                       0x0000000108c66b0d +[TealiumIDGenerator titleForObject:] + 130\r\n\t10  Direct Energy                       0x0000000108c66769 +[TealiumIDGenerator roadMapFor:] + 549\r\n\t11  Direct Energy                       0x0000000108c664c5 +[TealiumIDGenerator newTealiumIdForObject:] + 52\r\n\t12  Direct Energy                       0x0000000108c5de29 +[TealiumInternalConstants tealiumIdFor:] + 128\r\n\t13  Direct Energy                       0x0000000108c5dade +[TealiumInternalConstants customDataForObject:] + 238\r\n\t14  Direct Energy                       0x0000000108c7cad3 -[TealiumProcessingCenter dataForObject:] + 444\r\n\t15  Direct Energy                       0x0000000108c7c76c -[TealiumProcessingCenter dataForEventObject:customData:] + 161\r\n\t16  Direct Energy                       0x0000000108c8c72d -[TealiumActual dispatchActual:customData:callType:wasAutotracked:priority:completionBlock:] + 1097\r\n\t17  Direct Energy                       0x0000000108c89585 +[TealiumActual trackCallType:customData:object:autotracked:completionBlock:] + 1338\r\n\t18  Direct Energy                       0x0000000108c8ca28 +[TealiumActual autotrackEvent:] + 369\r\n\t19  Direct Energy                       0x0000000108c8e44c __TealiumSendEvent_block_invoke61 + 45\r\n\t20  libdispatch.dylib                   0x000000010da64e5d _dispatch_call_block_and_release + 12\r\n\t21  libdispatch.dylib                   0x000000010da8549b _dispatch_client_callout + 8\r\n\t22  libdispatch.dylib                   0x000000010da6b8ec _dispatch_queue_drain + 2215\r\n\t23  libdispatch.dylib                   0x000000010da6ae0d _dispatch_queue_invoke + 601\r\n\t24  libdispatch.dylib                   0x000000010da6da56 _dispatch_root_queue_drain + 1420\r\n\t25  libdispatch.dylib                   0x000000010da6d4c5 _dispatch_worker_thread3 + 111\r\n\t26  libsystem_pthread.dylib             0x000000010ddb64f2 _pthread_wqthread + 1129\r\n\t27  libsystem_pthread.dylib             0x000000010ddb4375 start_wqthread + 13\r\n```\r\n\r\nThe basic problems is line 9... `titleForObject` is calling into `textLabel` on a cell, which causes UIKit to lazily create it. But, we're on a background thread, so this is illegal."}}