[iOS SDK Crash Issue] AGXGLDriver (gldUpdateDispatch): OpenGL rendering while app in background state

Hi Zoom Developer Team,

I got an issue detected on Firebase Crashlytics, but I cannot find where the issue actually is, can you please check it? Based on their log, my app got an issue when running Zoom Call with MobileRTC, the message is:

Description

“Based on the stack trace displayed here, it looks like new calls triggering OpenGL rendering took place while the app was transitioning to, or from, a background state. If you set up OpenGL drawing in your app delegate’s methods, make sure that you only did so in applicationDidBecomeActive:, never in application:willFinishLaunchingWithOptions: or application:didFinishLaunchingWithOptions:. According to some reports, even displaying an FPS indicator for SpriteKit could cause rendering to occur before it is allowed.”

Here is the stack trace:

Crashed: Thread #1

EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x000000000000000

Crashed: Thread
0 libGPUSupportMercury.dylib 0x24248bfe4 gpus_ReturnNotPermittedKillClient
1 AGXGLDriver 0x246b39ed8 gldUpdateDispatch
2 libGPUSupportMercury.dylib 0x24248cfac gpusSubmitDataBuffers
3 AGXGLDriver 0x246b3b404 gldUpdateDispatch
4 AGXGLDriver 0x246b36b00 gldPresentFramebufferData
5 AGXGLDriver 0x246b2f974 gldPresentFramebufferData
6 GLEngine 0x247b1eb10 glTexSubImage2D_Exec
7 OpenGLES 0x229682214 glTexSubImage2D + 88
8 MobileRTC 0x1032db180 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 20698876
9 MobileRTC 0x1032d90b0 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 20690476
10 MobileRTC 0x1032d962c TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 20691880
11 MobileRTC 0x1032d49c4 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 20672320
12 MobileRTC 0x1032d48cc TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 20672072
13 MobileRTC 0x1032ce8c4 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 20647488
14 MobileRTC 0x1032ce918 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 20647572
15 MobileRTC 0x1032d1b34 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 20660400
16 MobileRTC 0x103317434 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 20945328
17 MobileRTC 0x1032d1b34 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 20660400
18 MobileRTC 0x10333e7d0 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 21105996
19 MobileRTC 0x10333ebcc TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 21107016
20 MobileRTC 0x1032ce8c4 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 20647488
21 MobileRTC 0x1032ce918 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 20647572
22 MobileRTC 0x1032d1b34 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 20660400
23 MobileRTC 0x10327f38c TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 20322568
24 MobileRTC 0x10326fa88 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 20258820
25 libsystem_pthread.dylib 0x2260992c0 _pthread_body + 128
26 libsystem_pthread.dylib 0x226099220 _pthread_start + 44
27 libsystem_pthread.dylib 0x22609ccdc thread_start + 4

com.apple.main-thread

0 libsystem_kernel.dylib 0x22600c0f4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x22600b5a0 mach_msg + 72
2 CoreFoundation 0x22640c914 __CFRunLoopServiceMachPort + 236
3 CoreFoundation 0x226407824 __CFRunLoopRun + 1360
4 CoreFoundation 0x226406fb4 CFRunLoopRunSpecific + 436
5 GraphicsServices 0x22860879c GSEventRunModal + 104
6 UIKitCore 0x252c68c38 UIApplicationMain + 212
7 0x1000c4338 main + 24 (AppDelegate.swift:24)
8 libdyld.dylib 0x225eca8e0 start + 4

com.apple.uikit.eventfetch-thread
0 libsystem_kernel.dylib 0x22600c0f4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x22600b5a0 mach_msg + 72
2 CoreFoundation 0x22640c914 __CFRunLoopServiceMachPort + 236
3 CoreFoundation 0x226407824 __CFRunLoopRun + 1360
4 CoreFoundation 0x226406fb4 CFRunLoopRunSpecific + 436
5 Foundation 0x226dd595c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300
6 Foundation 0x226dd57ec -[NSRunLoop(NSRunLoop) runUntilDate:] + 96
7 UIKitCore 0x252d4e754 -[UIEventFetcher threadMain] + 136
8 Foundation 0x226f024a0 NSThread__start + 984
9 libsystem_pthread.dylib 0x2260992c0 _pthread_body + 128
10 libsystem_pthread.dylib 0x226099220 _pthread_start + 44
11 libsystem_pthread.dylib 0x22609ccdc thread_start + 4

com.google.firebase.crashlytics.MachExceptionServer
0 0x1005fa374 FIRCLSProcessRecordAllThreads + 392 (FIRCLSProcess.c:392)
1 0x1005fa758 FIRCLSProcessRecordAllThreads + 423 (FIRCLSProcess.c:423)
2 0x1005f1030 FIRCLSHandler + 34 (FIRCLSHandler.m:34)
3 0x1005f3a2c FIRCLSMachExceptionServer + 524 (FIRCLSMachException.c:524)
4 libsystem_pthread.dylib 0x2260992c0 _pthread_body + 128
5 libsystem_pthread.dylib 0x226099220 _pthread_start + 44
6 libsystem_pthread.dylib 0x22609ccdc thread_start + 4

com.sendbird.SocketRocket.NetworkThread
0 libsystem_kernel.dylib 0x22600c0f4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x22600b5a0 mach_msg + 72
2 CoreFoundation 0x22640c914 __CFRunLoopServiceMachPort + 236
3 CoreFoundation 0x226407824 __CFRunLoopRun + 1360
4 CoreFoundation 0x226406fb4 CFRunLoopRunSpecific + 436
5 Foundation 0x226dd595c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 300
6 SendBirdSDK 0x101572420 -[SendBird_SRRunLoopThread main] + 70 (SendBird_SRRunLoopThread.m:70)
7 Foundation 0x226f024a0 NSThread__start + 984
8 libsystem_pthread.dylib 0x2260992c0 _pthread_body + 128
9 libsystem_pthread.dylib 0x226099220 _pthread_start + 44
10 libsystem_pthread.dylib 0x22609ccdc thread_start + 4

com.apple.NSURLConnectionLoader
0 libsystem_kernel.dylib 0x22600c0f4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x22600b5a0 mach_msg + 72
2 CoreFoundation 0x22640c914 __CFRunLoopServiceMachPort + 236
3 CoreFoundation 0x226407824 __CFRunLoopRun + 1360
4 CoreFoundation 0x226406fb4 CFRunLoopRunSpecific + 436
5 CFNetwork 0x226a2174c -[__CoreSchedulingSetRunnable runForever] + 216
6 Foundation 0x226f024a0 NSThread__start + 984
7 libsystem_pthread.dylib 0x2260992c0 _pthread_body + 128
8 libsystem_pthread.dylib 0x226099220 _pthread_start + 44
9 libsystem_pthread.dylib 0x22609ccdc thread_start + 4

com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x226017328 __select + 8
1 libsystem_kernel.dylib 0x226017328 select$DARWIN_EXTSN + 8
2 CoreFoundation 0x2264155f8 __CFSocketManager + 620
3 libsystem_pthread.dylib 0x2260992c0 _pthread_body + 128
4 libsystem_pthread.dylib 0x226099220 _pthread_start + 44
5 libsystem_pthread.dylib 0x22609ccdc thread_start + 4

Thread
0 libsystem_kernel.dylib 0x226016ee4 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x226091cf8 _pthread_cond_wait$VARIANT$mp + 636
2 MobileRTC 0x102c3c424 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 13756832
3 MobileRTC 0x102ad4e88 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 12284932
4 MobileRTC 0x102995ed4 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 10978384
5 libsystem_pthread.dylib 0x2260992c0 _pthread_body + 128
6 libsystem_pthread.dylib 0x226099220 _pthread_start + 44
7 libsystem_pthread.dylib 0x22609ccdc thread_start + 4

Thread
0 libsystem_kernel.dylib 0x226016ee4 __psynch_cvwait + 8
1 libsystem_pthread.dylib 0x226091cf8 _pthread_cond_wait$VARIANT$mp + 636
2 MobileRTC 0x102c3c424 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 13756832
3 MobileRTC 0x102ad979c TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 12303640
4 MobileRTC 0x102995ed4 TermSBPTUIModule(Cmm::ICmmMessageQueueClient*) + 10978384
5 libsystem_pthread.dylib 0x2260992c0 _pthread_body + 128
6 libsystem_pthread.dylib 0x226099220 _pthread_start + 44
7 libsystem_pthread.dylib 0x22609ccdc thread_start + 4

AVAudioSession Notify Thread
0 libsystem_kernel.dylib 0x22600c0f4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x22600b5a0 mach_msg + 72
2 CoreFoundation 0x22640c914 __CFRunLoopServiceMachPort + 236
3 CoreFoundation 0x226407824 __CFRunLoopRun + 1360
4 CoreFoundation 0x226406fb4 CFRunLoopRunSpecific + 436
5 AVFAudio 0x22c379334 GenericRunLoopThread::Entry(void*) + 156
6 AVFAudio 0x22c3a3c60 CAPThread::Entry(CAPThread*) + 88
7 libsystem_pthread.dylib 0x2260992c0 _pthread_body + 128
8 libsystem_pthread.dylib 0x226099220 _pthread_start + 44
9 libsystem_pthread.dylib 0x22609ccdc thread_start + 4

com.apple.sydprotection
0 libsystem_kernel.dylib 0x22600c0f4 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x22600b5a0 mach_msg + 72
2 libdispatch.dylib 0x225e70884 _dispatch_mach_send_and_wait_for_reply + 500
3 libdispatch.dylib 0x225e70d14 dispatch_mach_send_with_result_and_wait_for_reply$VARIANT$mp + 52
4 libxpc.dylib 0x2260d091c xpc_connection_send_message_with_reply_sync + 204
5 SyncedDefaults 0x24d190d0c -[SYDClient _sendMessageWithReplySync:] + 316
6 SyncedDefaults 0x24d1918dc -[SYDClient sendMessageWithName:userInfo:] + 92
7 SyncedDefaults 0x24d19424c -[SYDRemotePreferencesSource _synchronizeForced:] + 812
8 SyncedDefaults 0x24d193ef4 __48-[SYDRemotePreferencesSource synchronizeForced:]_block_invoke + 52
9 libdispatch.dylib 0x225eb97d4 _dispatch_client_callout + 16
10 libdispatch.dylib 0x225e67c1c _dispatch_lane_barrier_sync_invoke_and_complete + 56
11 SyncedDefaults 0x24d193e98 -[SYDRemotePreferencesSource synchronizeForced:] + 116
12 Foundation 0x226e13674 -[NSUbiquitousKeyValueStore synchronizeWithSourceForced:] + 32
13 Foundation 0x226fe14c4 __53-[NSUbiquitousKeyValueStore _syncConcurrentlyForced:]_block_invoke + 40
14 libdispatch.dylib 0x225eb8a38 _dispatch_call_block_and_release + 24
15 libdispatch.dylib 0x225eb97d4 _dispatch_client_callout + 16
16 libdispatch.dylib 0x225e62324 _dispatch_lane_serial_drain$VARIANT$mp + 592
17 libdispatch.dylib 0x225e62e40 _dispatch_lane_invoke$VARIANT$mp + 428
18 libdispatch.dylib 0x225e6b4ac _dispatch_workloop_worker_thread + 596
19 libsystem_pthread.dylib 0x22609a114 _pthread_wqthread + 304
20 libsystem_pthread.dylib 0x22609ccd4 start_wqthread + 4

com.google.fira.worker
0 libobjc.A.dylib 0x22566b528 objc_msgSend + 8
1 Foundation 0x226dd4828 -[NSString stringByAppendingString:] + 148
2 0x1006a34bc -[APMAlarm cancel] + 4303549628
3 0x1006a3174 -[APMAlarm runAfterDelay:withBlock:] + 4303548788
4 0x1006c0c50 -[APMMeasurement updateSchedule] + 4303670352
5 0x1006f6374 -[APMMeasurement(Event) handleEventOnWorkerQueue:] + 4303889268
6 0x1006c31c8 -[APMMeasurement logEventOnWorkerQueue:notifyEventListeners:] + 4303679944
7 0x1006c3170 -[APMMeasurement logEventOnWorkerQueueWithOrigin:isPublicEvent:name:parameters:timestamp:enabled:ignoreEnabled:ignoreInterceptor:interceptor:addedScreenParameters:] + 4303679856
8 0x1006c2e4c __151-[APMMeasurement logEventWithOrigin:isPublicEvent:name:parameters:timestamp:enabled:ignoreEnabled:ignoreInterceptor:interceptor:addedScreenParameters:]_block_invoke + 4303679052
9 0x1006cffdc __51-[APMScheduler scheduleOnWorkerQueueBlockID:block:]_block_invoke + 4303732700
10 libdispatch.dylib 0x225eb8a38 _dispatch_call_block_and_release + 24
11 libdispatch.dylib 0x225eb97d4 _dispatch_client_callout + 16
12 libdispatch.dylib 0x225e62324 _dispatch_lane_serial_drain$VARIANT$mp + 592
13 libdispatch.dylib 0x225e62e40 _dispatch_lane_invoke$VARIANT$mp + 428
14 libdispatch.dylib 0x225e6b4ac _dispatch_workloop_worker_thread + 596
15 libsystem_pthread.dylib 0x22609a114 _pthread_wqthread + 304
16 libsystem_pthread.dylib 0x22609ccd4 start_wqthread + 4

iOS SDK:zoom-sdk-ios-5.4.54802.0124

Screenshots

Smartphone:

  • Device: iPhone 6
  • OS: iOS 12.4.9

Additional context
I can find the issue where actually is, please inform me what is cause the issue and how to solve it? thank you

Hey @bayuaslamaa,

Thanks for using the dev forum!

Can you provide the following:

  • Are you using scenedelgates?
  • Do you have background modes enabled?
  • What does your appdelegate code look like?
  • What device(s) have been effected by this?

Thanks!
Michael

Hey Michael,

Thanks for responding my topic in dev forum

Here is my answer that can I provide for your questions:

  • I used to use scenedelegates, but now I am not using it any more as instructed for integrating with zoom sdk

  • Yes I have background modes enabled for remote notifications

  • My code in AppDelegate look like this:
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) → Bool {






    let zoomSDK = MobileRTCSDKInitContext()
    zoomSDK.domain = “zoom.us
    zoomSDK.appGroupId = “”
    MobileRTC.shared().initialize(zoomSDK)
    let zoomAuth = MobileRTC.shared().getAuthService()
    zoomAuth?.delegate = self
    zoomAuth?.clientKey = “”
    zoomAuth?.clientSecret = “”
    zoomAuth?.sdkAuth()



    }

  • The device have been effected is iPhone 6 with iOS 12.4.9

And I have a question, Is it possible cause I wrote it inside didFinishLaunchingWithOption, after I create rootViewController?

Thank you

Best Regards

Bayu

Hey @bayuaslamaa,

Thank you for answering those :slight_smile:

This may be possible, however I have not seen this exact crash before with other developers who have initialized the SDK there. You do not have to initialize the SDK in any specific part of the app, so it may be worth trying to move that code somewhere else if you are suspicious that the placement of it is causing issues.

Do you have the MobileRTC appdelegate calls in your application?

func applicationWillTerminate(_ application: UIApplication) {
MobileRTC.shared().appWillTerminate()
}

func applicationDidBecomeActive(_ application: UIApplication) {
    MobileRTC.shared().appDidBecomeActive()
}

func applicationWillResignActive(_ application: UIApplication) {
    MobileRTC.shared().appWillResignActive()
}

func applicationDidEnterBackground(_ application: UIApplication) {
    MobileRTC.shared().appDidEnterBackgroud()
}

Thanks!
Michael

Hey @bayuaslamaa,

One other question, are you using annotations in your app?

Thanks!
Michael

Hey Michael,

Thanks for responding my answer before,

Oh, I see, I will try to move the code somewhere if this is a suspect for the crash did.

No, I don’t have those MobileRTC appdelegate calls in my application, do I have to use and call it in my application / app delegate?

For the annotations, I don’t set it, just some config for default zoom

Unfortunately, I get another crash (ios_getpid()) from firebase crashlytics,

Here is the detail:

  • Device: iPhone SE (2nd generation)
  • iOS 14.4.0
  • Stack Trace:

Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x19a6cb0f8 objc_msgSend + 24
1 MobileRTC 0x104e01770 ios_getpid() + 432204
2 libdispatch.dylib 0x1852a724c _dispatch_call_block_and_release + 32
3 libdispatch.dylib 0x1852a8db0 _dispatch_client_callout + 20
4 libdispatch.dylib 0x1852b67ac _dispatch_main_queue_callback_4CF + 836
5 CoreFoundation 0x18563011c CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16
6 CoreFoundation 0x18562a120 __CFRunLoopRun + 2508
7 CoreFoundation 0x18562921c CFRunLoopRunSpecific + 600
8 GraphicsServices 0x19d1f5784 GSEventRunModal + 164
9 UIKitCore 0x188069ee8 -[UIApplication _run] + 1072
10 UIKitCore 0x18806f75c UIApplicationMain + 168
11 0x102fb4338 main + 24 (AppDelegate.swift:24)
12 libdyld.dylib 0x1852e96b0 start + 4

Is it related from the crash before?

Thank you

Best Regards,
Bayu Aslama Z A

Hey @bayuaslamaa,

Yes, these calls alert the SDK of application events so that the proper meeting actions can be performed by Zoom. It is possible that without these, there exists some scenario that would cause the SDK to crash.

I see. We have identified an issue with the annotation feature that can cause crashes. If annotations are used in your application we suggest the following:
On Xcode 11, Edit scheme > Run > Options > Metal API validation > disable
On Xcode 12, Edit scheme > Run > Diagnostics > Metal > uncheck API validation

As for that second crash, it is hard to tell what could’ve caused that just from this trace. However, it may also be related to the appdelegate calls not being implemented.

Thanks!
Michael

Hey @Michael_Condon ,

Thanks for the suggestion, I will add it to my app delegate code and try your suggestiion about annotation. If the issue still exist, I will tell you soon

Best Regards
Bayu

1 Like

Hey @bayuaslamaa,

Sounds good! Keep me posted.

Thanks!
Michael

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.