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: BaseMemoryCache, FuzzyKeyMemoryCache #229

Closed
jihonrado opened this issue Apr 4, 2013 · 2 comments
Closed
Labels

Comments

@jihonrado
Copy link

Hi,

It only occurred once and I can't reproduce it doing the same I did when it crashed, so I'm worried it could happen again.

The stack trace is in the following TWO images (sorry it's not in text format).

error

errorr

preceded by "FATAL EXCEPTION: AsyncTask #3"

I'm using the 1.8.3 version and my configuration is:

@SuppressLint("NewApi")
public static ImageLoaderConfiguration getImageLoaderConfiguration(Context context)
{
    ActivityManager m = (ActivityManager) context.getSystemService(Activity.ACTIVITY_SERVICE);

    int heapSize = m.getMemoryClass();
    int poolsize = heapSize >= 64? 3: heapSize >=48? 2:1;
    Logger.d("Using threadPoolSize = " + poolsize, "DEBUG");

    DisplayImageOptions imageOptions = new DisplayImageOptions.Builder()
            .bitmapConfig(Bitmap.Config.RGB_565)
            .imageScaleType(ImageScaleType.IN_SAMPLE_INT)
            .cacheOnDisc()
            .cacheInMemory()
            .build();

    Builder builder = new ImageLoaderConfiguration.Builder(context)
            .defaultDisplayImageOptions(imageOptions)
            .denyCacheImageMultipleSizesInMemory()
            .memoryCache(new WeakMemoryCache())
            .threadPoolSize(poolsize);

    if (SupportVersion.Honeycomb()) {
        builder.taskExecutorForCachedImages(AsyncTask.THREAD_POOL_EXECUTOR);
    }

    ImageLoaderConfiguration config = builder.build();

    return config;
}
@nostra13
Copy link
Owner

nostra13 commented Apr 4, 2013

Hi, thanks. it seems a bug. I will fix it in next version.

@Nelugo
Copy link

Nelugo commented Apr 5, 2013

Hi, I'm having this issue too. I'm reverting to the 1.8.2 version. This library is awesome, please fix it as soon as you can.

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

3 participants