Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiving ConcurrentModificationExceptionThrown when registerSuperPropertiesMap or track is called from onResume #658

Closed
hakanbagci opened this issue Jan 3, 2020 · 3 comments · Fixed by #676

Comments

@hakanbagci
Copy link

hakanbagci commented Jan 3, 2020

Here is the related part from stack trace for this exception. It seems like superPropertiesCache map is somehow concurrently being modified.

java.util.LinkedHashMap$LinkedHashIterator.nextEntry (LinkedHashMap.java:346) java.util.LinkedHashMap$EntryIterator.next (LinkedHashMap.java:375) java.util.LinkedHashMap$EntryIterator.next (LinkedHashMap.java:373) org.json.JSONObject.writeTo (JSONObject.java:719) org.json.JSONStringer.value (JSONStringer.java:237) org.json.JSONObject.writeTo (JSONObject.java:720) org.json.JSONObject.toString (JSONObject.java:689) com.mixpanel.android.mpmetrics.PersistentIdentity.storeSuperProperties (PersistentIdentity.java:556) com.mixpanel.android.mpmetrics.PersistentIdentity.registerSuperProperties (PersistentIdentity.java:244) com.mixpanel.android.mpmetrics.MixpanelAPI.registerSuperProperties (MixpanelAPI.java:759) com.mixpanel.android.mpmetrics.MixpanelAPI.registerSuperPropertiesMap (MixpanelAPI.java:733) de.flixbus.analytics.mixpanel.MixpanelGuard.registerSuperProperties (MixpanelGuard.java:28)

This is not happening all the time, but happening quite often. It is also not specific to a device family or to an android version.

@hakanbagci
Copy link
Author

Hey Mixpanel team, did you have time to check this bug?

@hakanbagci
Copy link
Author

Some additional context: It is only happening if track or registerSuperProperties methods of MixpanelAPI are called from onResume callback method of the first activity.

@hakanbagci hakanbagci changed the title Receiving ConcurrentModificationExceptionThrown when MixpanelAPI.registerSuperPropertiesMap is called Receiving ConcurrentModificationExceptionThrown when registerSuperPropertiesMap or track is called from onResume Jan 17, 2020
@patedit
Copy link
Contributor

patedit commented Mar 3, 2020

thanks for your patience @hakanbagci. We haven't been able to reproduce this issue (and we've tried hard). Even so, we added a lock when accessing super properties which will, hopefully, solve your crash. Feel free to take a look at the PR #676

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants