matomo-org / matomo-sdk-android

SDK for Android to measure your apps with Matomo. Works on Android phones, tablets, Fire TV sticks, and more!
BSD 3-Clause "New" or "Revised" License
388 stars 162 forks source link

Concurrency issue when setting custom variables #89

Closed d4rken closed 8 years ago

d4rken commented 8 years ago

Seems to be very rare, happened only a few times out of a few 10k events. Writing this down so I don't forget it :). Maybe fix this and do #69 at the same time?

java.util.ConcurrentModificationException
        at java.util.HashMap$HashIterator.nextEntry(HashMap.java:806)
        at java.util.HashMap$EntryIterator.next(HashMap.java:843)
        at java.util.HashMap$EntryIterator.next(HashMap.java:841)
        at org.json.JSONObject.<init>(JSONObject.java:128)
        at org.piwik.sdk.CustomVariables.toString(CustomVariables.java:90)
        at org.a.a.e.a(Tracker.java:16684)
        at eu.thedarken.sdm.tools.e.a.a(PiwikHelper.java:13159)
        at eu.thedarken.sdm.tools.piwik.PiwikHelper$1.run(PiwikHelper.java:305)
        at java.lang.Thread.run(Thread.java:841)
dotsbb commented 8 years ago

I would like to take care of this one, if You don't mind

d4rken commented 8 years ago

Sure :+1:, happy hacking.

d4rken commented 8 years ago

Fixed by @dotsbb in #90