This application is modifying the autolayout engine from a background thread after the engine was accessed from the main thread. This can lead to engine corruption and weird crashes

Hi @saghul

I am getting " This application is modifying the autolayout engine from a background thread after the engine was accessed from the main thread. This can lead to engine corruption and weird crashes." this error message and crash in IOS 13 when I am running Jitsi call.

As soon as call switches from audio to video or vice versa it get crashed.
I know its something regarding to the main thread updation but I cannot understand where to apply this main thread in Jitsi or React native code.

Here are the logs of crash got.

2019-10-29 16:37:49.941658+0530 Melp[4124:3112563] Audio route changed, reapplying RTCAudioSession config
2019-10-29 16:37:50.842533+0530 Melp[4124:3112628] [VideoTrackAdapter] Adapter created for track mixedlabelvideo0
2019-10-29 16:37:50.901904+0530 Melp[4124:3112627] [AudioMode] Audio session didSetActive:1
2019-10-29 16:37:51.162946+0530 Melp[4124:3112930] Audio route changed, reapplying RTCAudioSession config
2019-10-29 16:37:53.861865+0530 Melp[4124:3112364] [VideoTrackAdapter] Mute event for 0 394047D0-1298-4D34-8319-8B91C77179BB mixedlabelvideo0
2019-10-29 16:37:54.497967+0530 Melp[4124:3112607] This application is modifying the autolayout engine from a background thread after the engine was accessed from the main thread. This can lead to engine corruption and weird crashes.
Stack:(
0 Foundation 0x00000001a6b2acd4 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 2251988
1 Foundation 0x00000001a6935fd4 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 200660
2 Foundation 0x00000001a6935eec 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 200428
3 Foundation 0x00000001a6935b60 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 199520
4 UIKitCore 0x00000001aaaed65c 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 15185500
5 QuartzCore 0x00000001acfd95f8 5A4A8F86-A37D-3290-AC6A-9C03140FA5D3 + 1377784
6 UIKitCore 0x00000001aaa59b9c 82C949DD-37F6-35F7-B3EF-62BA342F6BF5 + 14580636
7 QuartzCore 0x00000001acfdde28 5A4A8F86-A37D-3290-AC6A-9C03140FA5D3 + 1396264
8 QuartzCore 0x00000001acfe9894 5A4A8F86-A37D-3290-AC6A-9C03140FA5D3 + 1443988
9 QuartzCore 0x00000001acf329f0 5A4A8F86-A37D-3290-AC6A-9C03140FA5D3 + 694768
10 QuartzCore 0x00000001acf5c890 5A4A8F86-A37D-3290-AC6A-9C03140FA5D3 + 866448
11 QuartzCore 0x00000001acf5d814 5A4A8F86-A37D-3290-AC6A-9C03140FA5D3 + 870420
12 libsystem_pthread.dylib 0x00000001a6374350 C3FA4F34-750F-362B-BEFE-835BFB15C0F8 + 58192
13 libsystem_pthread.dylib 0x00000001a6371248 C3FA4F34-750F-362B-BEFE-835BFB15C0F8 + 45640
14 libsystem_pthread.dylib 0x00000001a637229c C3FA4F34-750F-362B-BEFE-835BFB15C0F8 + 49820
15 libsystem_pthread.dylib 0x00000001a6372034 _pthread_wqthread + 420
16 libsystem_pthread.dylib 0x00000001a6374ae0 start_wqthread + 8
)
(lldb)

Please help me with some solution for this.

Regards
Chandra

What SDK version are you using?

Regarding xcode its 11.1 and regarding ios version its ios 13 on my ios device. If you want to know about the Jitsi version, I dont’ know exact version but its of August 2019 that I am using it.

Weird, there is no Jitsi component in the stack trace. I’m not sure what to do here. Can you reproduce it with the SDK samples? https://github.com/jitsi/jitsi-meet-sdk-samples

Does this happen on a real device or a simulator?