Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

App hangs on card-scanning screen #153

Closed
ABorshche opened this issue Oct 20, 2015 · 9 comments
Closed

App hangs on card-scanning screen #153

ABorshche opened this issue Oct 20, 2015 · 9 comments
Labels

Comments

@ABorshche
Copy link

App hangs on card-scanning screen when going back to foreground and keeps hanging up to 1 minute. And some times app even get killed by system.

Steps:

  1. Launch SampleApp or SampleApp-Swift
  2. Navigate to the card-scanning screen.
  3. Tap the iPhone's Home button to background the app.
  4. Double-tap the Home button and return app.

Reproduces every time on my iPhone 5s iOS 9.0.2

@bluk
Copy link
Contributor

bluk commented Oct 20, 2015

@ABorshche are you able to reproduce this on other devices? Also, which version of card.io are you using?

I don't have an iPhone 5s with exactly iOS 9.0.2 immediately on hand but tried a couple other devices including an iPhone 5 with iOS 8.4. I wasn't able to reproduce the issue with the freezing.

@ABorshche
Copy link
Author

I tried several devices with iOS 8/9 and also wasn't able to reproduce the issue. But is 100% reproduces on all 3 of iPhone 5s with iOS 9.0.2 which i have. So looks like it is device/OS specific issue. Unfortunately i have no iPhone 5s with any other iOS version.

I used CardIO 5.2.1 (SampleApp obj-c/swift form this repo).

@bluk
Copy link
Contributor

bluk commented Oct 21, 2015

@ABorshche thanks for the additional information! We will try looking as time permits but it is odd that it is only on an iPhone 5s.

@bluk bluk added the bug label Oct 21, 2015
@josharian
Copy link
Member

If you kill the app while it is hung, what is the backtrack? Is it always the same?

@ABorshche
Copy link
Author

@josharian , yes it is always the same

Incident Identifier: 6FB2FF1A-B8DB-49A6-A20C-87E972DA66FE
CrashReporter Key:   1f7f4ceffca8990ad9c893f951df1bb6be341051
Hardware Model:      iPhone6,1
Process:             ScanExample [4559]
Path:                /var/mobile/Containers/Bundle/Application/D8959B15-0316-4BD6-987E-32A502CD8C54/ScanExample.app/ScanExample
Identifier:          org.my.ScanExample
Version:             1.0 (1.0)
Code Type:           ARM-64 (Native)
Parent Process:      launchd [1]

Date/Time:           2015-10-21 10:23:07.07 +0300
Launch Time:         2015-10-21 10:22:51.51 +0300
OS Version:          iOS 9.0.2 (13A452)
Report Version:      105

Exception Type:  00000020
Exception Codes: 0x000000008badf00d
Exception Note:  SIMULATED (this is NOT a crash)
Highlighted by Thread:  0

Application Specific Information:
org.my.ScanExample failed to scene-update after 10.00s

Elapsed total CPU time (seconds): 11.090 (user 11.090, system 0.000), 55% CPU 
Elapsed application CPU time (seconds): 0.002, 0% CPU

Filtered syslog:
None found

Thread 0 name:  Dispatch queue: CompilerConnectionSerialQueue
Thread 0:
0   libsystem_kernel.dylib          0x0000000197dacc6c semaphore_wait_trap + 8
1   libdispatch.dylib               0x0000000197c8a684 _dispatch_semaphore_wait_slow + 244
2   libxpc.dylib                    0x0000000197ec29f8 xpc_connection_send_message_with_reply_sync + 204
3   AGXCompilerConnection           0x000000018920640c 0x189204000 + 9228
4   libdispatch.dylib               0x0000000197c79770 _dispatch_client_callout + 16
5   libdispatch.dylib               0x0000000197c849c4 _dispatch_barrier_sync_f_invoke + 100
6   AGXCompilerConnection           0x00000001892062f4 XPCCompilerConnection::BuildRequest(NSObject<OS_dispatch_data>*, NSObject<OS_dispatch_data>*, void (void const*, unsigned long) block_pointer) + 116
7   AGXGLDriver                     0x0000000180d827b0 AGXHalShaderFactoryT<AGXUserVertexShaderKey, AGXHalVertexShader>::create(AGXUserVertexShaderKey const*) + 204
8   AGXGLDriver                     0x0000000180db5b14 AGXVertexShader::getCompiledVariant(AGXContextRec*, _AGCVertexContextStateGL const*, _AGCSamplerPCFStates const*, unsigned int&) + 352
9   AGXGLDriver                     0x0000000180db6750 glrUpdateCtxSysVertexProgram + 292
10  AGXGLDriver                     0x0000000180d4511c gpusLoadCurrentPipelinePrograms + 588
11  AGXGLDriver                     0x0000000180d71d28 gldUpdateDispatch + 1336
12  GLEngine                        0x0000000185e33860 gleDoDrawDispatchCoreES2 + 632
13  GLEngine                        0x0000000185e0a570 gleDrawArraysOrElements_Entries_Body + 180
14  GLEngine                        0x0000000185e08ab0 glDrawElements_ES2Exec + 204
15  ScanExample                     0x000000010004ff54 -[CardIOGPURenderer withContextDo:] + 208
16  ScanExample                     0x000000010005069c -[CardIOGPURenderer renderToSize:] + 100
17  ScanExample                     0x000000010004ff54 -[CardIOGPURenderer withContextDo:] + 208
18  ScanExample                     0x0000000100050c00 -[CardIOGPURenderer renderUIImage:toSize:] + 148
19  ScanExample                     0x000000010004f7cc -[CardIOGPUFilter processUIImage:toSize:] + 52
20  ScanExample                     0x0000000100053688 __53-[CardIOGPUGaussianBlurFilter processUIImage:toSize:]_block_invoke + 116
21  ScanExample                     0x000000010004ff54 -[CardIOGPURenderer withContextDo:] + 208
22  ScanExample                     0x000000010005358c -[CardIOGPUGaussianBlurFilter processUIImage:toSize:] + 212
23  ScanExample                     0x00000001000363a4 +[CardIOUtilities blurredScreenImageView] + 356
24  ScanExample                     0x0000000100018bac -[CardIOPaymentViewController didReceiveBackgroundingNotification:] + 108
25  CoreFoundation                  0x000000018291e6ac __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
26  CoreFoundation                  0x000000018291decc _CFXRegistrationPost + 396
27  CoreFoundation                  0x000000018291dc4c ___CFXNotificationPost_block_invoke + 60
28  CoreFoundation                  0x0000000182983434 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1532
29  CoreFoundation                  0x000000018285e834 _CFXNotificationPost + 368
30  Foundation                      0x00000001837ca2fc -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
31  UIKit                           0x0000000187f38f3c -[UIApplication _deactivateForReason:notify:] + 800
32  UIKit                           0x000000018816de70 __61-[UIApplication _sceneSettingsPreLifecycleEventDiffInspector]_block_invoke + 124
33  FrontBoardServices              0x000000018c6b0b90 __52-[FBSSettingsDiffInspector inspectDiff:withContext:]_block_invoke27 + 208
34  Foundation                      0x00000001838795b8 __NSIndexSetEnumerate + 716
35  BaseBoard                       0x0000000189dc2898 -[BSSettingsDiff inspectChangesWithBlock:] + 104
36  FrontBoardServices              0x000000018c6abbe0 -[FBSSettingsDiff inspectOtherChangesWithBlock:] + 88
37  FrontBoardServices              0x000000018c6b0968 -[FBSSettingsDiffInspector inspectDiff:withContext:] + 292
38  UIKit                           0x000000018816f288 __70-[UIApplication scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 120
39  UIKit                           0x000000018816ef30 -[UIApplication scene:didUpdateWithDiff:transitionContext:completion:] + 708
40  FrontBoardServices              0x000000018c6bf7ec -[FBSSerialQueue _performNext] + 184
41  FrontBoardServices              0x000000018c6bfb6c -[FBSSerialQueue _performNextFromRunLoopSource] + 56
42  CoreFoundation                  0x00000001829305a4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
43  CoreFoundation                  0x0000000182930038 __CFRunLoopDoSources0 + 540
44  CoreFoundation                  0x000000018292dd38 __CFRunLoopRun + 724
45  CoreFoundation                  0x000000018285cdc0 CFRunLoopRunSpecific + 384
46  GraphicsServices                0x000000018d9b0088 GSEventRunModal + 180
47  UIKit                           0x0000000187f36f44 UIApplicationMain + 204
48  ScanExample                     0x0000000100016fcc main (main.m:15)
49  libdyld.dylib                   0x0000000197caa8b8 start + 4

Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0   libsystem_kernel.dylib          0x0000000197dc859c kevent_qos + 8
1   libdispatch.dylib               0x0000000197c8ca04 _dispatch_mgr_invoke + 232
2   libdispatch.dylib               0x0000000197c7b93c _dispatch_source_invoke + 0

@dgoldman-pdx
Copy link
Member

Looks like upon backgrounding, the code that creates a blurred screenshot (for the app snapshot that appears in the app-switcher) failed to run to completion. Probably a timeout?

I do have simpler code lying around somewhere for screen-blurring (*). Maybe updating that method would help.

(*) which this margin is too narrow to contain

@ABorshche
Copy link
Author

@dgoldman-ebay, disableBlurWhenBackgrounding flag indeed solves the issue for 5s.

@dgoldman-pdx
Copy link
Member

@ABorshche that's reassuring!

@bluk I'll try to find a free moment to send you a pull request in https://github.com/card-io/card.io-iOS-source with the improved screen-blurring code.

@bluk
Copy link
Contributor

bluk commented Nov 3, 2015

Thanks to @dgoldman-ebay's fix which is in release 5.2.2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants