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 : ConcurrentModificationException #132

Closed
SuhasTS opened this issue Dec 11, 2020 · 3 comments
Closed

Crash : ConcurrentModificationException #132

SuhasTS opened this issue Dec 11, 2020 · 3 comments
Assignees
Labels
pending release Will be released in the next release

Comments

@SuhasTS
Copy link

SuhasTS commented Dec 11, 2020

We are using clevertap product config in our project. There were many crashes reported related to CTProductConfigController.java class.

Stack trace -

Fatal Exception: java.util.ConcurrentModificationException
       at java.util.HashMap$HashIterator.nextNode(HashMap.java:1441)
       at java.util.HashMap$EntryIterator.next(HashMap.java:1475)
       at java.util.HashMap$EntryIterator.next(HashMap.java:1473)
       at java.util.AbstractMap.toString(AbstractMap.java:554)
       at java.lang.String.valueOf(String.java:2924)
       at java.lang.StringBuilder.append(StringBuilder.java:132)
       at com.clevertap.android.sdk.product_config.CTProductConfigController$1.onPostExecute(CTProductConfigController.java:109)
       at com.clevertap.android.sdk.product_config.CTProductConfigController$1.onPostExecute(CTProductConfigController.java:78)
       at com.clevertap.android.sdk.TaskManager$1$1.run(TaskManager.java:74)
       at android.os.Handler.handleCallback(Handler.java:883)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:237)
       at android.app.ActivityThread.main(ActivityThread.java:7807)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1047)
@kratuldev
Copy link
Contributor

kratuldev commented Dec 14, 2020

Hi @SuhasTS Thanks for reporting this.

Are you calling Product Config fetch/activate from background thread also?

Can you please confirm ?

@kratuldev kratuldev self-assigned this Dec 14, 2020
@SuhasTS
Copy link
Author

SuhasTS commented Dec 14, 2020

We are calling fetch on callback of onInit() and activate on callback of onFetched(). Need to check on what threads these callbacks are fired.

@darshanclevertap darshanclevertap added the pending release Will be released in the next release label Feb 19, 2021
@kratuldev
Copy link
Contributor

@SuhasTS We have fixed this in our latest release v4.0.3.
Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending release Will be released in the next release
Projects
None yet
Development

No branches or pull requests

3 participants