mcxiaoke / android-volley

DEPRECATED
4.3k stars 1.56k forks source link

OutOfMemoryError at ByteArrayPool.getBuf() #106

Open bearprada opened 8 years ago

bearprada commented 8 years ago

I get a lot OOME since I use this library. is it possible to do some try-catch code inside this library?

java.lang.OutOfMemoryError
       at com.android.volley.toolbox.ByteArrayPool.getBuf(SourceFile:101)
       at com.android.volley.toolbox.PoolingByteArrayOutputStream.(SourceFile:53)
       at com.android.volley.toolbox.BasicNetwork.entityToBytes(SourceFile:244)
       at com.android.volley.toolbox.BasicNetwork.performRequest(SourceFile:130)
       at com.android.volley.NetworkDispatcher.run(SourceFile:114)
alexwang3322 commented 8 years ago

there has a constant named DEFAULT_POOL_SIZE in BasicNetwork, I think you should try to find a way to change its' value, make it more so you can handle in that request.

bearprada commented 8 years ago

yap, but it will get the same error when using more memory, right?