AnsweredAssumed Answered

java.util.ConcurrentModificationException in ServerPingWithAlarmManager

Question asked by andrejvanderzee on Jun 22, 2015
Latest reply on Jun 26, 2015 by andrejvanderzee

Hi,

 

Occasionally we get this exception on Android using Smack 4.1.1:

 

java.lang.RuntimeException: Error receiving broadcast Intent { act=org.igniterealtime.smackx.ping.ACTION flg=0x14 (has extras) } in org.jivesoftware.smackx.ping.android.ServerPingWithAlarmManager$2@42851e18

       at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:799)

       at android.os.Handler.handleCallback(Handler.java:808)

       at android.os.Handler.dispatchMessage(Handler.java:103)

       at android.os.Looper.loop(Looper.java:193)

       at android.app.ActivityThread.main(ActivityThread.java:5348)

       at java.lang.reflect.Method.invokeNative(Method.java)

       at java.lang.reflect.Method.invoke(Method.java:515)

       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829)

       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645)

       at dalvik.system.NativeStart.main(NativeStart.java)

Caused by: java.util.ConcurrentModificationException

       at java.util.WeakHashMap$HashIterator.next(WeakHashMap.java:165)

       at org.jivesoftware.smackx.ping.android.ServerPingWithAlarmManager$2.onReceive(Ser verPingWithAlarmManager.java:116)

       at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:789)

       at android.os.Handler.handleCallback(Handler.java:808)

       at android.os.Handler.dispatchMessage(Handler.java:103)

       at android.os.Looper.loop(Looper.java:193)

       at android.app.ActivityThread.main(ActivityThread.java:5348)

       at java.lang.reflect.Method.invokeNative(Method.java)

       at java.lang.reflect.Method.invoke(Method.java:515)

       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829)

       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645)

       at dalvik.system.NativeStart.main(NativeStart.java)

Outcomes