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 on activity start #375

Closed
stepango opened this issue Mar 23, 2015 · 2 comments
Closed

ConcurrentModificationException on activity start #375

stepango opened this issue Mar 23, 2015 · 2 comments
Labels
Milestone

Comments

@stepango
Copy link

Glide Version/Integration library (if any): Glide v3.5.2
Device/Android Version: Nexus 5 (5.0.1), Galaxy Note 2(4.4.4)
Issue details/Repro steps:
Execute code below, reproduction rate ~30%.
Glide load line:

Glide.with(getActivity())
                        .load(uri)
                        .asBitmap()
                        .transform(new BlurTransform(getActivity()))
                        .into(new SimpleTarget<Bitmap>() {
                            @Override
                            public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation) {
                                avatarWrapper.setBackground(
                                        new BitmapDrawable(getResources(), resource)
                                );

                                Glide.with(getActivity())
                                        .load(uri)
                                        .transform(new RoundedRectTransform(getActivity(), R.dimen.round_profile_avatar))
                                        .into(avatar);
                            }
                        });

Stack trace:

java.util.ConcurrentModificationException
            at java.util.WeakHashMap$HashIterator.next(WeakHashMap.java:165)
            at com.bumptech.glide.manager.ActivityFragmentLifecycle.onStart(ActivityFragmentLifecycle.java:47)
            at com.bumptech.glide.manager.SupportRequestManagerFragment.onStart(SupportRequestManagerFragment.java:54)
            at android.support.v4.app.Fragment.performStart(Fragment.java:1810)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:987)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1136)
            at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:739)
            at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1499)
            at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:456)
            at android.os.Handler.handleCallback(Handler.java:739)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5254)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
@stepango
Copy link
Author

@TWiStErRob ready

@sjudd
Copy link
Collaborator

sjudd commented Mar 24, 2015

@stepango Thanks for the report, it's ugly but you can fix this temporarily by just posting the load call inside of onResourceReady.

@sjudd sjudd added the bug label Mar 24, 2015
@sjudd sjudd added this to the 3.6.0 milestone Mar 24, 2015
@sjudd sjudd closed this as completed in e7e7620 Mar 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants