NegativeArraySizeException in mopub-volley 1.1.0, bundled with mopub-android-sdk 3.13.0

android

#1

Getting some crash reports from users about NegativeArraySizeException.

java.lang.NegativeArraySizeException: -749
       at com.mopub.volley.toolbox.DiskBasedCache.streamToBytes(DiskBasedCache.java:322)
       at com.mopub.volley.toolbox.DiskBasedCache.get(DiskBasedCache.java:118)
       at com.mopub.volley.CacheDispatcher.run(CacheDispatcher.java:100)

I think it’s been fixed by other people in various Volley forks. I don’t keep up with Volley, so don’t know if it’s fixed in the official repo.

Example fix:


#2

Removing the word “occasional” from the title, because this is now apparently among my top 2 crashes in my app.


#3

Hi @talklittle,

Thank you for raising this issue and for linking to a viable fix.

I have added those details to the open NegativeArraySizeException ticket in our internal ticketing system.

Are you using the open source SDK or the Fabric Kit Library?


#4

Hi @JeffreyCarlson I am using the open-source MoPub SDK via Gradle dependency: https://github.com/mopub/mopub-android-sdk

(Sorry for late reply, I didn’t see your comment until now.)


#5

Hi @talklittle - Apologies for the late reply myself. I was hoping to have additional news but a fix has taken on a larger scope.

Our team is actively discussing the appropriate next steps for updating volley which involves support for Android M in addition to this fix.

Since you are using the open source version, one “right now” option is making a quick fork of https://github.com/mopub/mopub-volley and merging in the necessary changes from the https://github.com/mcxiaoke/android-volley library to resolve your crash.

We’ll follow up when this issue has been resolved officially by MoPub.

Also for future support needs, in addition to posting here, I recommend sending an email to support@mopub.com. That email feeds directly into the MoPub specific ticket queue and will provide an additional level of visibility to any issues you are experiencing.