Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on opening the app window after sending it to background #179

Closed
ashutoshgngwr opened this issue May 26, 2020 · 0 comments
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ashutoshgngwr
Copy link
Member

Describe the bug

Happening due to the recent change in Service launch logic. Moving the service launch to onResume put us in crosshair of a bug in Android 9.

Original bug reports

  1. https://issuetracker.google.com/issues/110237673
  2. https://issuetracker.google.com/issues/113122354

To Reproduce

The bug is intermittent. Sometimes it crashes the app. Sometimes everything works as expected.

  1. Open Noice
  2. Press 'Home' button on the navigation bar
  3. Bring Noice to foreground again
  4. Crash

Expected behavior

No crash

Screenshots

N/A

Others

  • Device: Samsung Galaxy Note 8
  • Android Version: Pie

Crashlog

From the Play Store

java.lang.RuntimeException: 
  at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4016)
  at android.app.ActivityThread.handleResumeActivity (ActivityThread.java:4048)
  at android.app.servertransaction.ResumeActivityItem.execute (ResumeActivityItem.java:51)
  at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:145)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:70)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1950)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:214)
  at android.app.ActivityThread.main (ActivityThread.java:7073)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:965)
Caused by: java.lang.IllegalStateException: 
  at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1666)
  at android.app.ContextImpl.startService (ContextImpl.java:1611)
  at android.content.ContextWrapper.startService (ContextWrapper.java:677)
  at com.github.ashutoshgngwr.noice.MainActivity.onResume (MainActivity.java:10)
  at android.app.Instrumentation.callActivityOnResume (Instrumentation.java:1412)
  at android.app.Activity.performResume (Activity.java:7572)
  at android.app.ActivityThread.performResumeActivity (ActivityThread.java:4008)
  at android.app.ActivityThread.handleResumeActivity (ActivityThread.java:4048)
  at android.app.servertransaction.ResumeActivityItem.execute (ResumeActivityItem.java:51)
  at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:145)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:70)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1950)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:214)
  at android.app.ActivityThread.main (ActivityThread.java:7073)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:965)
@ashutoshgngwr ashutoshgngwr added the bug Something isn't working label May 26, 2020
@ashutoshgngwr ashutoshgngwr added this to the 0.7.1 milestone May 26, 2020
@ashutoshgngwr ashutoshgngwr self-assigned this May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant