runt18 / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 0 forks source link

Occasionally crash when IOS app is in background mode. #391

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Occasionally crash when IOS app is in background mode. I can see one worker 
thread in GAI library is still running and prevent the IOS put my app to sleep 
again.
Setting dryRun and removeTracker doesn't work to stop that worker thread. I 
need release function from GAI library that will dealloc the library.

Google Analytics iOS SDK version 3.02.

Original issue reported on code.google.com by betun...@gmail.com on 24 Jan 2014 at 7:15

GoogleCodeExporter commented 8 years ago
This is also happening to our app.  We have gotten many reports from customers 
about the app getting killed during checkout if they leave the app for more 
than a minute or two.  We are probably going to remove this library until this 
issue is fixed.

The crash report highlights the GAI thread as the culprit:

Date/Time:           2015-11-02 18:26:27.27 -0800
Launch Time:         2015-11-02 17:11:09.09 -0800
OS Version:          iOS 9.1 (13B143)
Report Version:      105

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

Application Specific Information:
<BKNewProcess: 0x15461c120; com.my.app; pid: 4149; hostpid: -1> has active 
assertions beyond permitted time: 
{(
    <BKProcessAssertion: 0x15451d390> id: 4149-7FE6FB7F-ED28-403F-8D5D-E970197C78AA name: Session End process: <BKNewProcess: 0x15461c120; com.my.app; pid: 4149; hostpid: -1> permittedBackgroundDuration: 180.000000 reason: finishTask owner pid:4149 preventSuspend  preventIdleSleep  preventSuspendOnSleep 
)}

Elapsed total CPU time (seconds): 3.470 (user 3.470, system 0.000), 35% CPU 
Elapsed application CPU time (seconds): 0.029, 0% CPU

Thread 3 name:  GAIThread
Thread 3:
0   libsystem_kernel.dylib          0x000000019a09ca40 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x000000019a09c8bc mach_msg + 72
2   CoreFoundation                  0x0000000184b50108 
__CFRunLoopServiceMachPort + 196
3   CoreFoundation                  0x0000000184b4de0c __CFRunLoopRun + 1032
4   CoreFoundation                  0x0000000184a7cca0 CFRunLoopRunSpecific + 384
5   Foundation                      0x00000001859f52bc -[NSRunLoop(NSRunLoop) 
runMode:beforeDate:] + 308
6   Foundation                      0x0000000185a4a8f4 -[NSRunLoop(NSRunLoop) 
run] + 88
7   MyApp                           0x00000001003bfa9c +[GAI threadMain:] + 72
8   Foundation                      0x0000000185adbc80 __NSThread__start__ + 1000
9   libsystem_pthread.dylib         0x000000019a17fb28 _pthread_body + 156
10  libsystem_pthread.dylib         0x000000019a17fa8c _pthread_body + 0
11  libsystem_pthread.dylib         0x000000019a17d028 thread_start + 4

Original comment by to...@vsco.co on 9 Nov 2015 at 6:09

GoogleCodeExporter commented 8 years ago
Hello,
Can you include what version of the iOS SDK you are using?
Thank you,
Matt

Original comment by mcoh...@google.com on 9 Nov 2015 at 7:43

GoogleCodeExporter commented 8 years ago
I am using version 3.13

Original comment by to...@vsco.co on 9 Nov 2015 at 7:53

GoogleCodeExporter commented 8 years ago
Also am seeing the exact same thing in my app on most recent 3.14, any word on 
this? May end up removing the library as well.

Original comment by khatut...@whoop.com on 10 Dec 2015 at 6:37