Skip to content

fix(crash): forward original exception instead of secondary handler f… - #6640

Merged
mahibi merged 1 commit into
masterfrom
bugix/noid/forwardOriginalCrash
Sep 3, 2026
Merged

fix(crash): forward original exception instead of secondary handler f…#6640
mahibi merged 1 commit into
masterfrom
bugix/noid/forwardOriginalCrash

Conversation

@mahibi

@mahibi mahibi commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

…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

🏚️ Before 🏡 After
B A

🚧 TODO

  • ...

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

…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>
@mahibi mahibi added this to the 25.0.0 milestone Sep 3, 2026
@mahibi mahibi self-assigned this Sep 3, 2026
@mahibi
mahibi merged commit a49e918 into master Sep 3, 2026
15 of 18 checks passed
@mahibi
mahibi deleted the bugix/noid/forwardOriginalCrash branch September 3, 2026 12:54
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

APK file: https://github.com/nextcloud/talk-android/actions/runs/33757850250/artifacts/9895170880
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant