card-io / card.io-iOS-source

The open-source code for the card.io-iOS-SDK: provides fast, easy credit card scanning in mobile apps
Other
686 stars 372 forks source link

EXC_BAD_ACCESS upon [CardIOGPURenderer withContextDo:] (glFlush) #89

Open rvandijke opened 7 years ago

rvandijke commented 7 years ago

General information

Issue description

We've been seeing the following crash happening very infrequently (~ 20 instances) in 4 months. It looks like an EXC_BAD_ACCESS occurs when the app is put in the background. I haven't been able to reproduce this issue myself so far.

Have you seen this before? Any idea what might cause this? Thanks!

Stacktrace

Exception Codes: 0x00000000 at 0x00000000000000b0
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Thread 0 Crashed:
0   AppleMetalGLRenderer           0x00000001a4829980 GLRResourceList::addFence(GLRResource*) + 20
1   AppleMetalGLRenderer           0x00000001a483ab60 GLDContextRec::flushContextInternal() + 128
2   AppleMetalGLRenderer           0x00000001a483ab60 GLDContextRec::flushContextInternal() + 128
3   GLEngine                       0x000000019df03064 glFinish_Exec + 124
4   App                          0x0000000101b2c218 -[CardIOGPURenderer withContextDo:] (CardIOGPURenderer.mm:105)
5   App                          0x0000000101afa004 -[CardIOVideoStream didReceiveBackgroundingNotification:] (CardIOVideoStream.mm:741)
6   CoreFoundation                 0x00000001894a822c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
7   CoreFoundation                 0x00000001894a7930 _CFXRegistrationPost + 400
8   CoreFoundation                 0x00000001894a76ac ___CFXNotificationPost_block_invoke + 60
9   CoreFoundation                 0x0000000189516b9c -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1504
10  CoreFoundation                 0x00000001893e9bf4 _CFXNotificationPost + 376
11  Foundation                     0x0000000189ef362c -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
12  UIKit                          0x000000018f3d0f84 -[UIApplication _deactivateForReason:notify:] + 828
13  UIKit                          0x000000018f5f6a38 -[UIApplication _handleApplicationDeactivationWithScene:shouldForceExit:transitionContext:completion:] + 364
14  UIKit                          0x000000018f604fdc -[UIApplication _handleApplicationLifecycleEventWithScene:transitionContext:completion:] + 452
15  UIKit                          0x000000018f5f05e0 -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 152
16  UIKit                          0x000000018f5f0264 -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 888
17  UIKit                          0x000000018f921ba4 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 464
18  FrontBoardServices             0x000000018b087b8c __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke.376 + 208
19  FrontBoardServices             0x000000018b0b58bc __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 36
20  FrontBoardServices             0x000000018b0b5728 -[FBSSerialQueue _performNext] + 176
21  FrontBoardServices             0x000000018b0b5ad0 -[FBSSerialQueue _performNextFromRunLoopSource] + 56
22  CoreFoundation                 0x00000001894bc278 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
23  CoreFoundation                 0x00000001894bbbc0 __CFRunLoopDoSources0 + 524
24  CoreFoundation                 0x00000001894b97c0 __CFRunLoopRun + 804
25  CoreFoundation                 0x00000001893e8048 CFRunLoopRunSpecific + 444
26  GraphicsServices               0x000000018ae6e198 GSEventRunModal + 180
27  UIKit                          0x000000018f3d42fc -[UIApplication _run] + 684
28  UIKit                          0x000000018f3cf034 UIApplicationMain + 208
29  App                           0x00000001000ca3ec main (main.swift:31)
30  libdyld.dylib                  0x00000001883cc5b8 start + 4