rxz99 / analytics-issues

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

Crash when using mobile analytics #514

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
---------------------------------------------------------------------------
NOTE: This issue tracking system is for Google Analytics developer products
only.
If you are not a developer/programmer visit:
http://www.google.com/analytics/support.html
---------------------------------------------------------------------------
Name of affected component: Mobile Tracking

Name of related library and version, if applicable (e.g. Android, iOS,
Snippets, etc.): iOS 3.0.9

Issue summary:
Crash occurs in analytics code

Steps to reproduce issue:
1. track something with the GAITracker's send:[[GAIDictionaryBuilder 
createEventWithCategory: action: label: value: ]]  API call

Expected output:
The event gets tracked

Actual results:
A crash in GAIUsageTracker

Notes:
Incident Identifier: [TODO]
CrashReporter Key:   [TODO]
Hardware Model:      iPhone5,1
Process:         Communicator [401]
Path:            
/private/var/mobile/Containers/Bundle/Application/15AFB2BF-5A86-40E8-86C0-1EC0CC
2D1163/Communicator.app/Communicator
Identifier:      com.avaya.AvayaCommunicator
Version:         2.1
Code Type:       ARM
Parent Process:  launchd [1]

Date/Time:       2014-10-15 09:02:45 +0000
OS Version:      iPhone OS 8.0.2 (12A405)
Report Version:  104

Exception Type:  SIGBUS
Exception Codes: BUS_ADRALN at 0xe756c0
Crashed Thread:  19

Thread 19 Crashed:
0   libsystem_platform.dylib            0x39e02e18 0x39e01000 + 7704
1   CoreFoundation                      0x2bfd0d6f 0x2bf92000 + 257391
2   CoreFoundation                      0x2c0716a3 0x2bf92000 + 915107
3   CoreFoundation                      0x2c070417 0x2bf92000 + 910359
4   CoreFoundation                      0x2bfd4a0b 0x2bf92000 + 272907
5   Communicator                        0x00714541 +[GAIUsageTracker 
trackTarget:action:] + 193
6   Communicator                        0x007049b3 -[GAITrackerImpl send:] + 47
7   Communicator                        0x00157b8d __66+[AnalyticsTracker 
sendTimingWithLevel:category:name:label:value:]_block_invoke 
(AnalyticsTracker.m:305)
8   libdispatch.dylib                   0x39ca58cb 0x39ca4000 + 6347
9   libdispatch.dylib                   0x39caeda3 0x39ca4000 + 44451
10  libdispatch.dylib                   0x39cafcd7 0x39ca4000 + 48343
11  libsystem_pthread.dylib             0x39e06e31 0x39e06000 + 3633

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

GoogleCodeExporter commented 8 years ago
We are seeing many instances of this.

Original comment by bman...@gmail.com on 6 Nov 2014 at 2:24

GoogleCodeExporter commented 8 years ago
Same here

Original comment by luo...@tapatalk.com on 8 Apr 2015 at 2:25

GoogleCodeExporter commented 8 years ago
same here,

Original comment by sushma.n...@gmail.com on 17 Apr 2015 at 5:24

GoogleCodeExporter commented 8 years ago
This turned out to be a thread safety issue in the GAI code.  Although it 
claims to be threadsafe, it apparently is not.

We fixed the issue by serializing GAI calls.  You can for example, create a 
serial queue, and schedule the code blocks that call GAI onto that queue.

Original comment by bman...@gmail.com on 17 Apr 2015 at 1:18

GoogleCodeExporter commented 8 years ago
Can you provide some example code for serializing?
I think they guys start sub-thread for network request in the SDK.

Original comment by luo...@tapatalk.com on 18 Apr 2015 at 9:27

GoogleCodeExporter commented 8 years ago
Example posted in Stack Overflow at:
http://stackoverflow.com/questions/29750038/threading-crash-in-google-analytics-
for-ios/29750238#29750238

Original comment by bman...@gmail.com on 20 Apr 2015 at 2:10

GoogleCodeExporter commented 8 years ago
Hi guys, I'm experiencing this issue too.
Can you tell us if the usage of a dedicated queue helps?

Did it solve these issues in your (mymobile...@gmail.com) product?

Original comment by perrch...@gmail.com on 4 Jun 2015 at 3:07

GoogleCodeExporter commented 8 years ago
Yes, it went from a randomly but too frequently occurring crash, to never 
crashing when we did this.  App has been in the field for a few weeks now, with 
no reported problems.

Original comment by bman...@gmail.com on 4 Jun 2015 at 3:54

GoogleCodeExporter commented 8 years ago
I appreciate your answer, thanks.

Original comment by perrch...@gmail.com on 7 Jun 2015 at 6:59