bumptech / glide

An image loading and caching library for Android focused on smooth scrolling
https://bumptech.github.io/glide/
Other
34.59k stars 6.12k forks source link

ArrayIndexOutOfBoundsException in FactoryPools #2919

Open MFlisar opened 6 years ago

MFlisar commented 6 years ago

Glide Version: 4.6.1

Integration libraries: none

Device/Android Version: SM-N910C

Issue details / Repro steps / Use case background: I recently got the below crash report (only once so far). What I do and how I use glide is written here: https://github.com/bumptech/glide/issues/2881

Mainly I don't do anything special, but I use useUnlimitedSourceGeneratorsPool() for nested glide calls in my custom loader. Based on the stacktrace I don't know what more I should write here, let me know if you have an idea what could cause this crash and what could be some relevant code to add

Stack trace / LogCat:

java.lang.ArrayIndexOutOfBoundsException: length=150; index=150
    at android.support.v4.util.Pools$SimplePool.acquire(Pools.java:106)
    at com.bumptech.glide.util.pool.FactoryPools$FactoryPool.acquire(FactoryPools.java:157)
    at com.bumptech.glide.load.engine.Engine$DecodeJobFactory.build(Engine.java:427)
    at com.bumptech.glide.load.engine.Engine.load(Engine.java:209)
    at com.bumptech.glide.request.SingleRequest.onSizeReady(SingleRequest.java:451)
    at com.bumptech.glide.request.RequestFutureTarget.getSize(RequestFutureTarget.java:132)
    at com.bumptech.glide.request.SingleRequest.begin(SingleRequest.java:264)
    at com.bumptech.glide.manager.RequestTracker.runRequest(RequestTracker.java:42)
    at com.bumptech.glide.RequestManager.track(RequestManager.java:634)
    at com.bumptech.glide.RequestBuilder.into(RequestBuilder.java:618)
    at com.bumptech.glide.RequestBuilder.into(RequestBuilder.java:583)
    at com.bumptech.glide.RequestBuilder$1.run(RequestBuilder.java:743)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:158)
    at android.app.ActivityThread.main(ActivityThread.java:7225)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
sjudd commented 6 years ago

I don't have any immediate thoughts, let me know if you find a way to reproduce it.

markchous commented 6 years ago

I am seeing this stacktrace in my crash logs as well. I have not found a way to reproduce it. Any update?

faith-hb commented 4 years ago

i have the same problem

faith-hb commented 4 years ago

106725 java.lang.ArrayIndexOutOfBoundsException

length=150; index=150

com.bumptech.glide.util.pool.FactoryPools$FactoryPool.acquire(FactoryPools.java:144)