Friday, December 31, 2010

[android-developers] Re: Google analytics crash

Hmm, I have only one global tracker object that I create in the
onCreate() of my main activity, and with a regular dispatch interval
through the format tracker.start("UA-12345-0", nseconds, this), so I'd
say that it all works from one alive thread. However, in one pair of
crash logs the first GoogleAnalyticsTracker.trackEvent() crash occurs
after my app had been running for some time, while the second
GoogleAnalyticsTracker.trackEvent() crash occurs immediately at app
startup only 3 minutes later, for the same device FINGERPRINT,
suggesting that indeed some sort of lock had lived on even across runs
to cause a second crash because the second run would not be owning the
lingering lock. This was for a Samsung GT-I5800 running Android 2.1-
update1.

On Dec 31, 3:21 pm, H <m...@howardb.com> wrote:
> Looking in the analytics source after you've called trackEvent(), I suspect
> that error is coming out when it is using a database transaction to insert
> the event into the database. Once inserted, it calls endTransaction as well
> as setTransactionSuccessful. Both of these do this check:
>
> if (!mLock.isHeldByCurrentThread()) {
>             throw new IllegalStateException("no transaction pending");
>         }
>
> So it could be worth checking to see if you are tracking the event from a
> thread that has ended, or calling dispatch from a different thread...?
>
> HTH.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate