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

ConcurrentModificationException #116

Closed
furkanvarol opened this issue Feb 12, 2015 · 2 comments
Closed

ConcurrentModificationException #116

furkanvarol opened this issue Feb 12, 2015 · 2 comments

Comments

@furkanvarol
Copy link
Member

Recently I started to have this exception. Sometimes it crashes the app and sometimes don't. I will try to investigate the problem.

E/AndroidRuntime﹕ FATAL EXCEPTION: main
    java.util.ConcurrentModificationException
            at java.util.HashMap$HashIterator.nextEntry(HashMap.java:806)
            at java.util.HashMap$KeyIterator.next(HashMap.java:833)
            at org.altbeacon.beacon.BeaconManager$1.onServiceConnected(BeaconManager.java:574)
            at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1114)
            at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1131)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5579)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
            at dalvik.system.NativeStart.main(Native Method)
@mattwritescode
Copy link
Contributor

@furkanvarol this is already fixed correct? Or is this somehow separate from #117?

@furkanvarol
Copy link
Member Author

I mixed my work email in #117 so I push again in #118. If you got the particular error that wrote in first comment than yes, I believe it is fixed.

You can check it out, it was a single line fix actually. I just removed Map's put method in a foreach (BeaconManager's service connection handler).

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