sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

TraceTestViewController.assertTransaction crashes

Open philipphofmann opened this issue 3 years ago • 0 comments

Description

We see a few crashes in Sentry with

NSInternalInconsistencyException
Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread.
0   CoreFoundation                  0x30d5e7dc0         __exceptionPreprocess
1   libobjc.A.dylib                 0x336d987a4         objc_exception_throw
2   CoreAutoLayout                  0x3372c67cc         _AssertAutoLayoutOnAllowedThreadsOnly
3   CoreAutoLayout                  0x3372c6aac         -[NSISEngine withBehaviors:performModifications:]
4   UIKitCore                       0x312378498         __57-[UIView _switchToLayoutEngine:]_block_invoke
5   UIKitCore                       0x312378244         -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]
6   UIKitCore                       0x31236aa7c         -[UIWindow(UIConstraintBasedLayout) _switchToLayoutEngine:]
7   UIKitCore                       0x31236ab74         -[UIWindow(UIConstraintBasedLayout) _initializeLayoutEngineDiscardingOldIfNeeded:]
8   UIKitCore                       0x31236b438         -[UIView(UIConstraintBasedLayout) _layoutEngine_windowDidChange]
9   UIKitCore                       0x31246093c         -[UIView(Internal) _didMoveFromWindow:toWindow:]
10  UIKitCore                       0x312454944         __45-[UIView _postMovedFromSuperview:]_block_invoke
11  UIKitCore                       0x312454830         -[UIView(Hierarchy) _postMovedFromSuperview:]
12  UIKitCore                       0x312463690         -[UIView(Internal) _addSubview:positioned:relativeTo:]
13  iOS-Swift                       0x20286440c         UIAssert.assert
14  iOS-Swift                       0x202864aac         UIAssert.isEqual<T>
15  iOS-Swift                       0x2028610ec         TraceTestViewController.assertTransaction
16  iOS-Swift                       0x202860780         TraceTestViewController.viewWillAppear
17  iOS-Swift                       0x20285c9c4         thunk for closure
18  iOS-Swift                       0x20285c994         thunk for closure
19  iOS-Swift                       0x20285d258         SpanObserver.observeValue
20  iOS-Swift                       0x20285d470         SpanObserver.observeValue
21  Foundation                      0x30fcd1e18         NSKeyValueNotifyObserver
22  Foundation                      0x30fcd4390         NSKeyValueDidChange
23  Foundation                      0x30fcd3dfc         -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:]
24  Foundation                      0x30fc0d0dc         -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:]
25  Foundation                      0x30fccdeb8         _NSSetObjectValueAndNotify
26  Sentry                          0x102932984         -[SentrySpan finishWithStatus:]
27  Sentry                          0x10292de28         -[SentryTracer canBeFinished]
28  Sentry                          0x10292d2e0         -[SentryTracer spanFinished:]
29  Sentry                          0x1029329e0         -[SentrySpan finishWithStatus:]
30  Sentry                          0x102920d7c         -[SentryNetworkTracker urlSessionTask:setState:]
31  Sentry                          0x1028f9bd0         __57+[SentryNetworkTrackingIntegration swizzleURLSessionTask]_block_invoke_2.66
32  CFNetwork                       0x30e323f20         <redacted>
33  CFNetwork                       0x30e323b2c         <redacted>
34  CFNetwork                       0x30e3c8e8c         CFURLDownloadCancel
35  CFNetwork                       0x30e32968c         <redacted>
36  libdispatch.dylib               0x30cef5480         _dispatch_block_async_invoke2
37  libdispatch.dylib               0x30cee6818         _dispatch_client_callout
38  libdispatch.dylib               0x30ceee000         _dispatch_lane_serial_drain
39  libdispatch.dylib               0x30ceeec30         _dispatch_lane_invoke
40  libdispatch.dylib               0x30cef94b8         _dispatch_workloop_worker_thread
41  libsystem_pthread.dylib         0x3a52c57a0         _pthread_wqthread
42  libsystem_pthread.dylib         0x3a52cc748         start_wqthread

It seems like these crashes originate from our UITests.

philipphofmann avatar Apr 11 '22 13:04 philipphofmann