Android app crashes with DeadObjectException when showing progress dialog





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















My android app has crashed with following exception in a certain device running Android 8.0.



Crash occurs when the app tries to show a progress dialog.



Only this particular device has this problem. In other devices, progress dialog works fine.



java.lang.RuntimeException: 
at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4179)
at android.app.ActivityThread.handleResumeActivity (ActivityThread.java:4219)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3314)
at android.app.ActivityThread.-wrap12 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1891)
at android.os.Handler.dispatchMessage (Handler.java:108)
at android.os.Looper.loop (Looper.java:166)
at android.app.ActivityThread.main (ActivityThread.java:7425)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:245)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:921)
Caused by: java.lang.RuntimeException:
at android.view.ViewRootImpl.setView (ViewRootImpl.java:857)
at android.view.WindowManagerGlobal.addView (WindowManagerGlobal.java:372)
at android.view.WindowManagerImpl.addView (WindowManagerImpl.java:128)
at android.app.Dialog.show (Dialog.java:454)
at android.app.ProgressDialog.show (ProgressDialog.java:185)
at android.app.ProgressDialog.show (ProgressDialog.java:142)
at com.my.app.MainActivity.downloadInitialData (MainActivity.java:1132)
at com.my.app.MainActivity.onPostResume (MainActivity.java:285)
at android.app.Activity.performResume (Activity.java:7505)
at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4147)
Caused by: android.os.DeadObjectException:
at android.os.BinderProxy.transactNative (Native Method)
at android.os.BinderProxy.transact (Binder.java:751)
at android.view.IWindowSession$Stub$Proxy.addToDisplay (IWindowSession.java:791)
at android.view.ViewRootImpl.setView (ViewRootImpl.java:845)


Following is the line where I show the progress dialog which has caused the crash.



ProgressDialog.show(MainActivity.this, getString(R.string.loading), getString(R.string.please_wait), true);


Does anyone know what could be the reason for this crash?










share|improve this question

























  • @Lahiry Chandima please add some code to let us help you! Please click the link to the activity that causes error and paste that specific code on the question!

    – Gourav
    Jan 4 at 16:13











  • @Gourav added the statement which has caused the crash

    – Lahiru Chandima
    Jan 4 at 16:16











  • Please use "try { ProgressDialog.show(..); } catch (Exception e) { Log.e(TAG, "Exception: " + e.getMessage()); }" to show the error message. There are more than 2 RuntimeException inside "performResumeActivity()" method and if the Message is not written in the log, I think you should print it out.

    – emandt
    Jan 4 at 16:39











  • @emandt Unfortunately this does not re-create in my test device. This is a user reported crash which I received through Google Play.

    – Lahiru Chandima
    Jan 4 at 16:42


















0















My android app has crashed with following exception in a certain device running Android 8.0.



Crash occurs when the app tries to show a progress dialog.



Only this particular device has this problem. In other devices, progress dialog works fine.



java.lang.RuntimeException: 
at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4179)
at android.app.ActivityThread.handleResumeActivity (ActivityThread.java:4219)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3314)
at android.app.ActivityThread.-wrap12 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1891)
at android.os.Handler.dispatchMessage (Handler.java:108)
at android.os.Looper.loop (Looper.java:166)
at android.app.ActivityThread.main (ActivityThread.java:7425)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:245)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:921)
Caused by: java.lang.RuntimeException:
at android.view.ViewRootImpl.setView (ViewRootImpl.java:857)
at android.view.WindowManagerGlobal.addView (WindowManagerGlobal.java:372)
at android.view.WindowManagerImpl.addView (WindowManagerImpl.java:128)
at android.app.Dialog.show (Dialog.java:454)
at android.app.ProgressDialog.show (ProgressDialog.java:185)
at android.app.ProgressDialog.show (ProgressDialog.java:142)
at com.my.app.MainActivity.downloadInitialData (MainActivity.java:1132)
at com.my.app.MainActivity.onPostResume (MainActivity.java:285)
at android.app.Activity.performResume (Activity.java:7505)
at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4147)
Caused by: android.os.DeadObjectException:
at android.os.BinderProxy.transactNative (Native Method)
at android.os.BinderProxy.transact (Binder.java:751)
at android.view.IWindowSession$Stub$Proxy.addToDisplay (IWindowSession.java:791)
at android.view.ViewRootImpl.setView (ViewRootImpl.java:845)


Following is the line where I show the progress dialog which has caused the crash.



ProgressDialog.show(MainActivity.this, getString(R.string.loading), getString(R.string.please_wait), true);


Does anyone know what could be the reason for this crash?










share|improve this question

























  • @Lahiry Chandima please add some code to let us help you! Please click the link to the activity that causes error and paste that specific code on the question!

    – Gourav
    Jan 4 at 16:13











  • @Gourav added the statement which has caused the crash

    – Lahiru Chandima
    Jan 4 at 16:16











  • Please use "try { ProgressDialog.show(..); } catch (Exception e) { Log.e(TAG, "Exception: " + e.getMessage()); }" to show the error message. There are more than 2 RuntimeException inside "performResumeActivity()" method and if the Message is not written in the log, I think you should print it out.

    – emandt
    Jan 4 at 16:39











  • @emandt Unfortunately this does not re-create in my test device. This is a user reported crash which I received through Google Play.

    – Lahiru Chandima
    Jan 4 at 16:42














0












0








0








My android app has crashed with following exception in a certain device running Android 8.0.



Crash occurs when the app tries to show a progress dialog.



Only this particular device has this problem. In other devices, progress dialog works fine.



java.lang.RuntimeException: 
at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4179)
at android.app.ActivityThread.handleResumeActivity (ActivityThread.java:4219)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3314)
at android.app.ActivityThread.-wrap12 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1891)
at android.os.Handler.dispatchMessage (Handler.java:108)
at android.os.Looper.loop (Looper.java:166)
at android.app.ActivityThread.main (ActivityThread.java:7425)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:245)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:921)
Caused by: java.lang.RuntimeException:
at android.view.ViewRootImpl.setView (ViewRootImpl.java:857)
at android.view.WindowManagerGlobal.addView (WindowManagerGlobal.java:372)
at android.view.WindowManagerImpl.addView (WindowManagerImpl.java:128)
at android.app.Dialog.show (Dialog.java:454)
at android.app.ProgressDialog.show (ProgressDialog.java:185)
at android.app.ProgressDialog.show (ProgressDialog.java:142)
at com.my.app.MainActivity.downloadInitialData (MainActivity.java:1132)
at com.my.app.MainActivity.onPostResume (MainActivity.java:285)
at android.app.Activity.performResume (Activity.java:7505)
at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4147)
Caused by: android.os.DeadObjectException:
at android.os.BinderProxy.transactNative (Native Method)
at android.os.BinderProxy.transact (Binder.java:751)
at android.view.IWindowSession$Stub$Proxy.addToDisplay (IWindowSession.java:791)
at android.view.ViewRootImpl.setView (ViewRootImpl.java:845)


Following is the line where I show the progress dialog which has caused the crash.



ProgressDialog.show(MainActivity.this, getString(R.string.loading), getString(R.string.please_wait), true);


Does anyone know what could be the reason for this crash?










share|improve this question
















My android app has crashed with following exception in a certain device running Android 8.0.



Crash occurs when the app tries to show a progress dialog.



Only this particular device has this problem. In other devices, progress dialog works fine.



java.lang.RuntimeException: 
at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4179)
at android.app.ActivityThread.handleResumeActivity (ActivityThread.java:4219)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3314)
at android.app.ActivityThread.-wrap12 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1891)
at android.os.Handler.dispatchMessage (Handler.java:108)
at android.os.Looper.loop (Looper.java:166)
at android.app.ActivityThread.main (ActivityThread.java:7425)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:245)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:921)
Caused by: java.lang.RuntimeException:
at android.view.ViewRootImpl.setView (ViewRootImpl.java:857)
at android.view.WindowManagerGlobal.addView (WindowManagerGlobal.java:372)
at android.view.WindowManagerImpl.addView (WindowManagerImpl.java:128)
at android.app.Dialog.show (Dialog.java:454)
at android.app.ProgressDialog.show (ProgressDialog.java:185)
at android.app.ProgressDialog.show (ProgressDialog.java:142)
at com.my.app.MainActivity.downloadInitialData (MainActivity.java:1132)
at com.my.app.MainActivity.onPostResume (MainActivity.java:285)
at android.app.Activity.performResume (Activity.java:7505)
at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4147)
Caused by: android.os.DeadObjectException:
at android.os.BinderProxy.transactNative (Native Method)
at android.os.BinderProxy.transact (Binder.java:751)
at android.view.IWindowSession$Stub$Proxy.addToDisplay (IWindowSession.java:791)
at android.view.ViewRootImpl.setView (ViewRootImpl.java:845)


Following is the line where I show the progress dialog which has caused the crash.



ProgressDialog.show(MainActivity.this, getString(R.string.loading), getString(R.string.please_wait), true);


Does anyone know what could be the reason for this crash?







android






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 4 at 16:15







Lahiru Chandima

















asked Jan 4 at 16:10









Lahiru ChandimaLahiru Chandima

6,08894486




6,08894486













  • @Lahiry Chandima please add some code to let us help you! Please click the link to the activity that causes error and paste that specific code on the question!

    – Gourav
    Jan 4 at 16:13











  • @Gourav added the statement which has caused the crash

    – Lahiru Chandima
    Jan 4 at 16:16











  • Please use "try { ProgressDialog.show(..); } catch (Exception e) { Log.e(TAG, "Exception: " + e.getMessage()); }" to show the error message. There are more than 2 RuntimeException inside "performResumeActivity()" method and if the Message is not written in the log, I think you should print it out.

    – emandt
    Jan 4 at 16:39











  • @emandt Unfortunately this does not re-create in my test device. This is a user reported crash which I received through Google Play.

    – Lahiru Chandima
    Jan 4 at 16:42



















  • @Lahiry Chandima please add some code to let us help you! Please click the link to the activity that causes error and paste that specific code on the question!

    – Gourav
    Jan 4 at 16:13











  • @Gourav added the statement which has caused the crash

    – Lahiru Chandima
    Jan 4 at 16:16











  • Please use "try { ProgressDialog.show(..); } catch (Exception e) { Log.e(TAG, "Exception: " + e.getMessage()); }" to show the error message. There are more than 2 RuntimeException inside "performResumeActivity()" method and if the Message is not written in the log, I think you should print it out.

    – emandt
    Jan 4 at 16:39











  • @emandt Unfortunately this does not re-create in my test device. This is a user reported crash which I received through Google Play.

    – Lahiru Chandima
    Jan 4 at 16:42

















@Lahiry Chandima please add some code to let us help you! Please click the link to the activity that causes error and paste that specific code on the question!

– Gourav
Jan 4 at 16:13





@Lahiry Chandima please add some code to let us help you! Please click the link to the activity that causes error and paste that specific code on the question!

– Gourav
Jan 4 at 16:13













@Gourav added the statement which has caused the crash

– Lahiru Chandima
Jan 4 at 16:16





@Gourav added the statement which has caused the crash

– Lahiru Chandima
Jan 4 at 16:16













Please use "try { ProgressDialog.show(..); } catch (Exception e) { Log.e(TAG, "Exception: " + e.getMessage()); }" to show the error message. There are more than 2 RuntimeException inside "performResumeActivity()" method and if the Message is not written in the log, I think you should print it out.

– emandt
Jan 4 at 16:39





Please use "try { ProgressDialog.show(..); } catch (Exception e) { Log.e(TAG, "Exception: " + e.getMessage()); }" to show the error message. There are more than 2 RuntimeException inside "performResumeActivity()" method and if the Message is not written in the log, I think you should print it out.

– emandt
Jan 4 at 16:39













@emandt Unfortunately this does not re-create in my test device. This is a user reported crash which I received through Google Play.

– Lahiru Chandima
Jan 4 at 16:42





@emandt Unfortunately this does not re-create in my test device. This is a user reported crash which I received through Google Play.

– Lahiru Chandima
Jan 4 at 16: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%2f54042488%2fandroid-app-crashes-with-deadobjectexception-when-showing-progress-dialog%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%2f54042488%2fandroid-app-crashes-with-deadobjectexception-when-showing-progress-dialog%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

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas