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

Crash report 0.5.0: ConcurrentModificationException #158

Closed
maxme opened this issue Oct 8, 2014 · 2 comments
Closed

Crash report 0.5.0: ConcurrentModificationException #158

maxme opened this issue Oct 8, 2014 · 2 comments

Comments

@maxme
Copy link
Member

maxme commented Oct 8, 2014

Got this crash after liking/unliking a comment from wpandroid notifications:

E/AndroidRuntime( 3977): java.util.ConcurrentModificationException
E/AndroidRuntime( 3977):    at java.util.HashMap$HashIterator.nextEntry(HashMap.java:792)
E/AndroidRuntime( 3977):    at java.util.HashMap$EntryIterator.next(HashMap.java:829)
E/AndroidRuntime( 3977):    at java.util.HashMap$EntryIterator.next(HashMap.java:827)
E/AndroidRuntime( 3977):    at org.json.JSONObject.writeTo(JSONObject.java:666)
E/AndroidRuntime( 3977):    at org.json.JSONStringer.value(JSONStringer.java:237)
E/AndroidRuntime( 3977):    at org.json.JSONArray.writeTo(JSONArray.java:572)
E/AndroidRuntime( 3977):    at org.json.JSONStringer.value(JSONStringer.java:233)
E/AndroidRuntime( 3977):    at org.json.JSONObject.writeTo(JSONObject.java:667)
E/AndroidRuntime( 3977):    at org.json.JSONObject.toString(JSONObject.java:636)
E/AndroidRuntime( 3977):    at com.simperium.android.PersistentStore$DataStore.save(PersistentStore.java:89)
E/AndroidRuntime( 3977):    at com.simperium.client.Bucket$1.run(Bucket.java:195)
E/AndroidRuntime( 3977):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
E/AndroidRuntime( 3977):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
E/AndroidRuntime( 3977):    at java.lang.Thread.run(Thread.java:856)
@beaucollins
Copy link
Contributor

Need to synchronize access to BucketObjects's mProperties field or possibly copy the data in the Bucket.sync method and use the copied data in the persistent store.

@maxme
Copy link
Member Author

maxme commented Oct 29, 2014

Same kind of issue reported:

java.util.ConcurrentModificationException
       at java.util.HashMap$HashIterator.nextEntry(HashMap.java:806)
       at java.util.HashMap$KeyIterator.next(HashMap.java:833)
       at com.simperium.util.JSONDiff.equals(JSONDiff.java:344)
       at com.simperium.util.JSONDiff.equals(JSONDiff.java:320)
       at com.simperium.util.JSONDiff.equals(JSONDiff.java:378)
       at com.simperium.util.JSONDiff.equals(JSONDiff.java:322)
       at com.simperium.util.JSONDiff.equals(JSONDiff.java:352)
       at com.simperium.client.Syncable.isModified(Syncable.java:39)
       at com.simperium.client.Bucket$1.run(Bucket.java:194)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:841)

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

No branches or pull requests

2 participants