Rich-text Reply

Android crash on initialization

Silenthillnight 03-11-16

Android crash on initialization

Our app has been experiencing a ConcurrentModificationException recently.  We started an experiment and suddenly, crashlytics is seeing a large uptick in crashes.  There appears to only be one crash per user so I'm guessing it could just be a hiccup but it's still concerning.

 

Caused by java.util.ConcurrentModificationException
java.util.HashMap$HashIterator.nextEntry (HashMap.java:787)
java.util.HashMap$KeyIterator.next (HashMap.java:814)
com.optimizely.integration.PluginRegistry.topologicalSort (Unknown Source:4311)
com.optimizely.Optimizely.continueStart (Unknown Source:14757)
com.optimizely.Optimizely$3.onDownloadError (Unknown Source:1713)
com.optimizely.Core.OptimizelyData$1.onDownloadError (Unknown Source:147)
com.optimizely.Network.OptimizelyDownloader.executeDownloadTask (Unknown Source:77)
com.optimizely.Network.OptimizelyDownloader.downloadDataFile (Unknown Source:49)
com.optimizely.Core.OptimizelyData.fetchRemoteDataFile (Unknown Source:129)
com.optimizely.Optimizely.startOptimizelyInstance$de51918 (Unknown Source:1702)
com.optimizely.Optimizely.startOptimizelyWithAPIToken (Unknown Source:368)
Pam 03-14-16
 

Re: Android crash on initialization

[ Edited ]

Hi @Silenthillnight

 

Thanks for reaching out!  Can you please share what version of the Optimizely SDK you're using?  

 

Also, note that if you see crashes caused by Optimizely, the crash should only happen once for each user.  Our SDK has automatic crash disabling - for each user, the crash will only happen the first time, Optimizely will be disabled until the next time the app is updated.

 

Please let me know if you have the version of the Optimizely SDK you're using!

 

Best,

Pam

Pam
Optimizely

Re: Android crash on initialization

The version of Optimizely SDK we have in the current release of our app is 1.3.7. We have updated to 1.4.1 but it won't be released for another couple weeks. Is there a problem with the old version? We have another app using 1.3.7 with a couple experiments that isn't exhibiting the same crashes.
Pam 03-14-16
 

Re: Android crash on initialization

Hi - yes, we have seen some customers who have encountered this issue on v1.3.7. We recommend upgrading to v1.4.2 of the SDK, which should resolve the issue you're seeing. Does that work for you? Please let me know!
Pam
Optimizely

Re: Android crash on initialization

I'm having trouble pulling down 1.4.2. Is it available in the fabric or bintray repositories?
Pam 03-14-16
 

Re: Android crash on initialization

It should be available in the bintray repositiories.

 

In your terminal, can you try running the following command in your terminal:

rm -Rf ~/.gradle

 

 

Please let me know if this helps and if you're able to pull v1.4.2 of our Android SDK!

Pam
Optimizely

Re: Android crash on initialization

Hi - We thought the issue had passed after we updated the SDK to 1.4.2 but it appears that it has come around again. We started a new experiment yesterday afternoon and since then, our crashlytics has reported over 7000 crashes. Here is another stacktrace of the exception.

Fatal Exception: java.lang.RuntimeException: Unable to create application com.locationlabs.finder.android.core.AndroidLocatorApplication: java.util.ConcurrentModificationException
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4824)
at android.app.ActivityThread.access$1600(ActivityThread.java:157)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1417)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5551)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
Caused by java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:787)
at java.util.HashMap$KeyIterator.next(HashMap.java:814)
at com.optimizely.integration.PluginRegistry.topologicalSort(Unknown Source:4311)
at com.optimizely.Optimizely.continueStart(Unknown Source:14757)
at com.optimizely.Optimizely$3.onDownloadError(Unknown Source:1713)
at com.optimizely.Core.OptimizelyData$1.onDownloadError(Unknown Source:147)
at com.optimizely.Network.OptimizelyDownloader.executeDownloadTask(Unknown Source:77)
at com.optimizely.Network.OptimizelyDownloader.downloadDataFile(Unknown Source:49)
at com.optimizely.Core.OptimizelyData.fetchRemoteDataFile(Unknown Source:129)
at com.optimizely.Optimizely.startOptimizelyInstance$de51918(Unknown Source:1702)
at com.optimizely.Optimizely.startOptimizelyWithAPIToken(Unknown Source:368)
at com.locationlabs.finder.android.core.util.OptimizelyWrapper.(Unknown Source:22)
at com.locationlabs.finder.android.core.module.OptimizelyModule.provideOptimizelyWrapper(Unknown Source:26)
at com.locationlabs.finder.android.core.module.OptimizelyModule_ProvideOptimizelyWrapperFactory.get(Unknown Source:1018)
at dagger.internal.ScopedProvider.get(Unknown Source:46)
at com.locationlabs.finder.android.core.AndroidLocatorApplication_MembersInjector.injectMembers(Unknown Source:1031)
at com.locationlabs.finder.android.core.component.DaggerApplicationComponent.inject(Unknown Source:40)
at com.locationlabs.finder.android.core.AndroidLocatorApplication.setupGraph(Unknown Source:2061)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1014)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4821)
at android.app.ActivityThread.access$1600(ActivityThread.java:157)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1417)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5551)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
jujux789 06-25-16
 

Re: Android crash on initialization

We're seeing the same issue with 1.4.2. This crash happens quite frequently.

Level 1