fix(crash): forward original exception instead of secondary handler f… - #6640
Merged
Conversation
…ailure
When starting ShowErrorActivity fails (e.g. a system_server-side NPE in
Task.getTaskWithAdjacent()), the outer catch block was forwarding that
secondary failure to the default handler, masking the actual crash the
app died from.
crash was:
❯ fix this crash
Exception java.lang.NullPointerException: Attempt to invoke virtual method 'com.android.server.wm.Task com.android.server.wm.Task.getTaskWithAdjacent()' on a null object reference
at android.os.Parcel.createExceptionOrNull (Parcel.java:3394)
at android.os.Parcel.createException (Parcel.java:3372)
at android.os.Parcel.readException (Parcel.java:3355)
at android.os.Parcel.readException (Parcel.java:3297)
at android.app.IActivityTaskManager$Stub$Proxy.startActivity (IActivityTaskManager.java:4645)
at android.app.Instrumentation.execStartActivity (Instrumentation.java:2030)
at android.app.ContextImpl.startActivity (ContextImpl.java:1246)
at android.app.ContextImpl.startActivity (ContextImpl.java:1217)
at android.content.ContextWrapper.startActivity (ContextWrapper.java:458)
at com.nextcloud.talk.errorhandling.ExceptionHandler.uncaughtException (ExceptionHandler.kt:55)
at java.lang.ThreadGroup.uncaughtException (ThreadGroup.java:1098)
at java.lang.ThreadGroup.uncaughtException (ThreadGroup.java:1093)
at java.lang.Thread.dispatchUncaughtException (Thread.java:3387)
Assisted-by: Claude Code:claude-sonnet-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Contributor
|
APK file: https://github.com/nextcloud/talk-android/actions/runs/33757850250/artifacts/9895170880 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ailure
When starting ShowErrorActivity fails (e.g. a system_server-side NPE in Task.getTaskWithAdjacent()), the outer catch block was forwarding that secondary failure to the default handler, masking the actual crash the app died from.
crash was:
❯ fix this crash
Exception java.lang.NullPointerException: Attempt to invoke virtual method 'com.android.server.wm.Task com.android.server.wm.Task.getTaskWithAdjacent()' on a null object reference
at android.os.Parcel.createExceptionOrNull (Parcel.java:3394)
at android.os.Parcel.createException (Parcel.java:3372)
at android.os.Parcel.readException (Parcel.java:3355)
at android.os.Parcel.readException (Parcel.java:3297)
at android.app.IActivityTaskManager$Stub$Proxy.startActivity (IActivityTaskManager.java:4645)
at android.app.Instrumentation.execStartActivity (Instrumentation.java:2030)
at android.app.ContextImpl.startActivity (ContextImpl.java:1246)
at android.app.ContextImpl.startActivity (ContextImpl.java:1217)
at android.content.ContextWrapper.startActivity (ContextWrapper.java:458)
at com.nextcloud.talk.errorhandling.ExceptionHandler.uncaughtException (ExceptionHandler.kt:55)
at java.lang.ThreadGroup.uncaughtException (ThreadGroup.java:1098)
at java.lang.ThreadGroup.uncaughtException (ThreadGroup.java:1093)
at java.lang.Thread.dispatchUncaughtException (Thread.java:3387)
Assisted-by: Claude Code:claude-sonnet-5
🖼️ Screenshots
🚧 TODO
🏁 Checklist
/backport to stable-xx.x🤖 AI (if applicable)