Answered

[iOS] 16.1.1 still has UI thread violation: [UIApplication supportsMultipleScenes]

  • 12 October 2023
  • 1 reply
  • 87 views

It looks like Intercom.logEvent(withName: ) is not thread safe, 

Yet the in line documentation is not warns the user and the provided url is broken: 
“Log an event with a given name. You can log events in Intercom based on user actions in your app. Details about Events here “

Broken url: https://developers.intercom.com/reference/#events

 

Workaround:
Intercom.logEvent(withName: event) should be called on main thread only.

 

Solution:
Make sure Intercom.logEvent(withName: event) is thread safe or make it clear if its not.

Stack trace:

Main Thread Checker: UI API called on a background thread: -[UIApplication supportsMultipleScenes]
PID: 16482, TID: 5635365, Thread name: (none), Queue name: com.apple.NSXPCConnection.m-user.com.apple.photos.service, QoS: 0
Backtrace:
4 Intercom 0x0000000105475054 IntercomSDK_PINRemoteImageManagerSubclassOverridesSelector + 810620
5 Intercom 0x00000001053f3c44 IntercomSDK_PINRemoteImageManagerSubclassOverridesSelector + 281196
6 Intercom 0x00000001053f38a0 IntercomSDK_PINRemoteImageManagerSubclassOverridesSelector + 280264
7 Intercom 0x000000010522a9e4 Intercom + 27108
8 Intercom 0x000000010522a29c Intercom + 25244
9 Teleprompter 0x0000000100b22948 $s12Teleprompter12EventManagerC011logIntercomB033_1768655BADB6CC7E572E42D4AE426D1BLL_10parametersySS_SDySS8Mixpanel0N4Type_pGSgtF + 332
10 Teleprompter 0x0000000100b22438 $s12Teleprompter12EventManagerC03logB0_10parametersySS_SDySS8Mixpanel0F4Type_pGSgtF + 96
11 Teleprompter 0x00000001009d1138 $s12Teleprompter26VideoPreviewViewControllerC9exportTapyyypFySb_s5Error_pSgtcfU0_ + 1340
12 Teleprompter 0x00000001009d1cb4 $sSbs5Error_pSgIegyg_SbSo7NSErrorCSgIeyByy_TR + 136
13 Photos 0x00000001c4bf7ae8 98DE7C60-A169-383D-846D-104DDE07D15E + 965352
14 Photos 0x00000001c4bf9670 98DE7C60-A169-383D-846D-104DDE07D15E + 972400
15 Photos 0x00000001c4bf9094 98DE7C60-A169-383D-846D-104DDE07D15E + 970900
16 Photos 0x00000001c4bf8c8c 98DE7C60-A169-383D-846D-104DDE07D15E + 969868
17 CoreFoundation 0x00000001add27134 CEB74A0C-5EA4-3F5A-9DE8-73F0DAD2F4CB + 205108
18 CoreFoundation 0x00000001add26bcc CEB74A0C-5EA4-3F5A-9DE8-73F0DAD2F4CB + 203724
19 Foundation 0x00000001accfcf20 60F744F4-1345-325E-8970-D37BB5A1A31D + 446240
20 Foundation 0x00000001accfcaa0 60F744F4-1345-325E-8970-D37BB5A1A31D + 445088
21 Foundation 0x00000001accfc408 60F744F4-1345-325E-8970-D37BB5A1A31D + 443400
22 libxpc.dylib 0x0000000216f3eb44 8E13493A-AC3E-3EEF-8B3E-102A3D715B23 + 125764
23 libxpc.dylib 0x0000000216f314b4 8E13493A-AC3E-3EEF-8B3E-102A3D715B23 + 70836
24 libdispatch.dylib 0x00000001049f2bb4 _dispatch_client_callout3 + 20
25 libdispatch.dylib 0x0000000104a11ca8 _dispatch_mach_msg_async_reply_invoke + 392
26 libdispatch.dylib 0x00000001049fa7c4 _dispatch_lane_serial_drain + 376
27 libdispatch.dylib 0x00000001049fb75c _dispatch_lane_invoke + 460
28 libdispatch.dylib 0x0000000104a085f8 _dispatch_root_queue_drain_deferred_wlh + 328
29 libdispatch.dylib 0x0000000104a07c2c _dispatch_workloop_worker_thread + 444
30 libsystem_pthread.dylib 0x0000000216ede964 _pthread_wqthread + 288
31 libsystem_pthread.dylib 0x0000000216edea04 start_wqthread + 8

 

icon

Best answer by Racheal 17 October 2023, 01:30

View original

1 reply

Userlevel 4
Badge +5

Hey @Laszlo Tuss Racheal from the support engineer team here👋 

 

These types of questions require some deeper digging. I’ll forward you into the support team now and update this thread when we’ve got some more detail!

Reply