java.lang.RuntimeException only on Nexus 4 smartphone












0















I released my app to google play and i'm actually with 700 daily active users, i'm trying to fix the crashes that appear but there is one very weird crash



 Fatal Exception: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.hardware.usb.action.USB_DEVICE_DETACHED flg=0x10 pkg=com.tomatedigital.instagramgiveawaywinner } in org.chromium.media.AudioManagerAndroid$5@a283c54
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:891)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5420)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.usb.UsbDevice.getInterfaceCount()' on a null object reference
at org.chromium.media.AudioManagerAndroid.hasUsbAudioCommInterface(AudioManagerAndroid.java:1224)
at org.chromium.media.AudioManagerAndroid.access$1200(AudioManagerAndroid.java:43)
at org.chromium.media.AudioManagerAndroid$5.onReceive(AudioManagerAndroid.java:1254)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:881)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5420)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)


This error appears to happen only on one specific hardware what is:



    Device
Brand: LGE
Model: Nexus 4
Orientation: Portrait
RAM free: 1.12 GB
Disk free: 690.85 MB
Operating System
Version: 6.0.1
Orientation: Portrait
Rooted: No


So over 700 daily users and over 2k weekly users but only this specific hardware is generating this error



My app doesn't have any straight usage of chromium or any media stuff, so i believe this error is happening during an ad video from admob



can someone help me to fix it, or at least catch the exception and show a friendly message to the user?










share|improve this question























  • Other than a try-catch around that specific code, could it be worth trying to find a nearby device lab so you can debug against that specific bit of hardware?

    – Michael Dodd
    Nov 15 '18 at 12:15











  • what specific code? none of these code is mine they are either from android sdk or admob library... as i said in the description i "guess" is from video reward but i dont know where is the call since the code is out of my control

    – Rafael Lima
    Nov 15 '18 at 12:37











  • Apologies, my head isn't screwed on properly today. USB_DEVICE_DETACHED seems like a very unusual broadcast to be receiving though, my guess would be via USB headphones or connected to a PC via MTP. Again, finding a local device lab or getting your hands on a N4 would be best, I don't think there's enough information in the question to definitively answer it here.

    – Michael Dodd
    Nov 15 '18 at 12:42
















0















I released my app to google play and i'm actually with 700 daily active users, i'm trying to fix the crashes that appear but there is one very weird crash



 Fatal Exception: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.hardware.usb.action.USB_DEVICE_DETACHED flg=0x10 pkg=com.tomatedigital.instagramgiveawaywinner } in org.chromium.media.AudioManagerAndroid$5@a283c54
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:891)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5420)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.usb.UsbDevice.getInterfaceCount()' on a null object reference
at org.chromium.media.AudioManagerAndroid.hasUsbAudioCommInterface(AudioManagerAndroid.java:1224)
at org.chromium.media.AudioManagerAndroid.access$1200(AudioManagerAndroid.java:43)
at org.chromium.media.AudioManagerAndroid$5.onReceive(AudioManagerAndroid.java:1254)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:881)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5420)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)


This error appears to happen only on one specific hardware what is:



    Device
Brand: LGE
Model: Nexus 4
Orientation: Portrait
RAM free: 1.12 GB
Disk free: 690.85 MB
Operating System
Version: 6.0.1
Orientation: Portrait
Rooted: No


So over 700 daily users and over 2k weekly users but only this specific hardware is generating this error



My app doesn't have any straight usage of chromium or any media stuff, so i believe this error is happening during an ad video from admob



can someone help me to fix it, or at least catch the exception and show a friendly message to the user?










share|improve this question























  • Other than a try-catch around that specific code, could it be worth trying to find a nearby device lab so you can debug against that specific bit of hardware?

    – Michael Dodd
    Nov 15 '18 at 12:15











  • what specific code? none of these code is mine they are either from android sdk or admob library... as i said in the description i "guess" is from video reward but i dont know where is the call since the code is out of my control

    – Rafael Lima
    Nov 15 '18 at 12:37











  • Apologies, my head isn't screwed on properly today. USB_DEVICE_DETACHED seems like a very unusual broadcast to be receiving though, my guess would be via USB headphones or connected to a PC via MTP. Again, finding a local device lab or getting your hands on a N4 would be best, I don't think there's enough information in the question to definitively answer it here.

    – Michael Dodd
    Nov 15 '18 at 12:42














0












0








0








I released my app to google play and i'm actually with 700 daily active users, i'm trying to fix the crashes that appear but there is one very weird crash



 Fatal Exception: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.hardware.usb.action.USB_DEVICE_DETACHED flg=0x10 pkg=com.tomatedigital.instagramgiveawaywinner } in org.chromium.media.AudioManagerAndroid$5@a283c54
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:891)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5420)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.usb.UsbDevice.getInterfaceCount()' on a null object reference
at org.chromium.media.AudioManagerAndroid.hasUsbAudioCommInterface(AudioManagerAndroid.java:1224)
at org.chromium.media.AudioManagerAndroid.access$1200(AudioManagerAndroid.java:43)
at org.chromium.media.AudioManagerAndroid$5.onReceive(AudioManagerAndroid.java:1254)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:881)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5420)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)


This error appears to happen only on one specific hardware what is:



    Device
Brand: LGE
Model: Nexus 4
Orientation: Portrait
RAM free: 1.12 GB
Disk free: 690.85 MB
Operating System
Version: 6.0.1
Orientation: Portrait
Rooted: No


So over 700 daily users and over 2k weekly users but only this specific hardware is generating this error



My app doesn't have any straight usage of chromium or any media stuff, so i believe this error is happening during an ad video from admob



can someone help me to fix it, or at least catch the exception and show a friendly message to the user?










share|improve this question














I released my app to google play and i'm actually with 700 daily active users, i'm trying to fix the crashes that appear but there is one very weird crash



 Fatal Exception: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.hardware.usb.action.USB_DEVICE_DETACHED flg=0x10 pkg=com.tomatedigital.instagramgiveawaywinner } in org.chromium.media.AudioManagerAndroid$5@a283c54
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:891)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5420)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.usb.UsbDevice.getInterfaceCount()' on a null object reference
at org.chromium.media.AudioManagerAndroid.hasUsbAudioCommInterface(AudioManagerAndroid.java:1224)
at org.chromium.media.AudioManagerAndroid.access$1200(AudioManagerAndroid.java:43)
at org.chromium.media.AudioManagerAndroid$5.onReceive(AudioManagerAndroid.java:1254)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:881)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5420)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)


This error appears to happen only on one specific hardware what is:



    Device
Brand: LGE
Model: Nexus 4
Orientation: Portrait
RAM free: 1.12 GB
Disk free: 690.85 MB
Operating System
Version: 6.0.1
Orientation: Portrait
Rooted: No


So over 700 daily users and over 2k weekly users but only this specific hardware is generating this error



My app doesn't have any straight usage of chromium or any media stuff, so i believe this error is happening during an ad video from admob



can someone help me to fix it, or at least catch the exception and show a friendly message to the user?







android nullpointerexception admob chromium nexus-4






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 15 '18 at 11:45









Rafael LimaRafael Lima

479417




479417













  • Other than a try-catch around that specific code, could it be worth trying to find a nearby device lab so you can debug against that specific bit of hardware?

    – Michael Dodd
    Nov 15 '18 at 12:15











  • what specific code? none of these code is mine they are either from android sdk or admob library... as i said in the description i "guess" is from video reward but i dont know where is the call since the code is out of my control

    – Rafael Lima
    Nov 15 '18 at 12:37











  • Apologies, my head isn't screwed on properly today. USB_DEVICE_DETACHED seems like a very unusual broadcast to be receiving though, my guess would be via USB headphones or connected to a PC via MTP. Again, finding a local device lab or getting your hands on a N4 would be best, I don't think there's enough information in the question to definitively answer it here.

    – Michael Dodd
    Nov 15 '18 at 12:42



















  • Other than a try-catch around that specific code, could it be worth trying to find a nearby device lab so you can debug against that specific bit of hardware?

    – Michael Dodd
    Nov 15 '18 at 12:15











  • what specific code? none of these code is mine they are either from android sdk or admob library... as i said in the description i "guess" is from video reward but i dont know where is the call since the code is out of my control

    – Rafael Lima
    Nov 15 '18 at 12:37











  • Apologies, my head isn't screwed on properly today. USB_DEVICE_DETACHED seems like a very unusual broadcast to be receiving though, my guess would be via USB headphones or connected to a PC via MTP. Again, finding a local device lab or getting your hands on a N4 would be best, I don't think there's enough information in the question to definitively answer it here.

    – Michael Dodd
    Nov 15 '18 at 12:42

















Other than a try-catch around that specific code, could it be worth trying to find a nearby device lab so you can debug against that specific bit of hardware?

– Michael Dodd
Nov 15 '18 at 12:15





Other than a try-catch around that specific code, could it be worth trying to find a nearby device lab so you can debug against that specific bit of hardware?

– Michael Dodd
Nov 15 '18 at 12:15













what specific code? none of these code is mine they are either from android sdk or admob library... as i said in the description i "guess" is from video reward but i dont know where is the call since the code is out of my control

– Rafael Lima
Nov 15 '18 at 12:37





what specific code? none of these code is mine they are either from android sdk or admob library... as i said in the description i "guess" is from video reward but i dont know where is the call since the code is out of my control

– Rafael Lima
Nov 15 '18 at 12:37













Apologies, my head isn't screwed on properly today. USB_DEVICE_DETACHED seems like a very unusual broadcast to be receiving though, my guess would be via USB headphones or connected to a PC via MTP. Again, finding a local device lab or getting your hands on a N4 would be best, I don't think there's enough information in the question to definitively answer it here.

– Michael Dodd
Nov 15 '18 at 12:42





Apologies, my head isn't screwed on properly today. USB_DEVICE_DETACHED seems like a very unusual broadcast to be receiving though, my guess would be via USB headphones or connected to a PC via MTP. Again, finding a local device lab or getting your hands on a N4 would be best, I don't think there's enough information in the question to definitively answer it here.

– Michael Dodd
Nov 15 '18 at 12:42












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53318769%2fjava-lang-runtimeexception-only-on-nexus-4-smartphone%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53318769%2fjava-lang-runtimeexception-only-on-nexus-4-smartphone%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Xamarin.iOS Cant Deploy on Iphone

Glorious Revolution

Dulmage-Mendelsohn matrix decomposition in Python