question

benoit-lacelle avatar image
benoit-lacelle asked

NPE in Amazon Ads AsyncTask

Hello, My users regularly encounter the following crash: 0 java.lang.NullPointerException 1 at com.amazon.device.ads.c.handleResponse(SourceFile:400) 2 at com.amazon.device.ads.h.finalizeFetchAd(SourceFile:273) 3 at com.amazon.device.ads.j.onPostExecute(SourceFile:383) 4 at android.os.AsyncTask.finish(AsyncTask.java:631) 5 at android.os.AsyncTask.access$600(AsyncTask.java:177) 6 at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644) 7 at android.os.Handler.dispatchMessage(Handler.java:99) 8 at android.os.Looper.loop(Looper.java:137) 9 at android.app.ActivityThread.main(ActivityThread.java:5293) 10 at java.lang.reflect.Method.invokeNative(Native Method) 11 at java.lang.reflect.Method.invoke(Method.java:511) 12 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) 13 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) 14 at dalvik.system.NativeStart.main(Native Method) Could you fix this issue, and try to prevent your library from crashing the host application with aggressive exception handling? It is really disappointing to see my application crashing because of an embedded ad library. Thanks
mobile ads
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Noted. Forwarding to the concerned team. I will get back to you shortly. Thanks for the reporting the issue.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Benoit, Couple of followup questions. Can you send the answers through ContactUs ( https://developer.amazon.com/help/contactus.html)? Please mention this this thread url ( https://forums.developer.amazon.com/forums/thread.jspa?threadID=1471&tstart=0) in the ContactUs you are going to raise. 1. How did you get the stack trace of the exception? From the crash report? I could not see this exception in the crash report of the app associated with your dev portal account. 2. What is the app name? 3. Can you provide the code related to the ad integration?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi, Thank you for your patience. We've released Mobile Ads Android SDK v. 5.1.153 into production. It addresses these issues and can be downloaded at the Developer Portal: https://developer.amazon.com/sdk/mobileads.html
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.