Fix crash receiving SMS when the local database insert fails#193
Merged
Conversation
thomasbuilds
force-pushed
the
fix/receive-sms-npe
branch
2 times, most recently
from
July 9, 2026 19:06
90da263 to
81987f3
Compare
RankoR
suggested changes
Jul 12, 2026
RankoR
left a comment
Contributor
There was a problem hiding this comment.
LGTM, but please add a test.
Commit 641e11b dropped the null guard around the received-message log statement while keeping the catch block that swallows database failures; commit 91c7eb7 had introduced the two together. If anything throws inside the transaction before the MessageData is constructed - such as a transient SQLiteException from the participant lookup - message stays null and the unconditional message.getMessageId() call throws an uncaught NullPointerException that kills the process, skipping the notification and pending-message processing even though the message was already written to telephony. Restore the guard so these failures degrade gracefully again.
thomasbuilds
force-pushed
the
fix/receive-sms-npe
branch
from
July 13, 2026 07:36
81987f3 to
696294a
Compare
RankoR
approved these changes
Jul 13, 2026
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.
Commit 641e11b dropped the null guard around the received-message log statement while keeping the catch block that swallows database failures; commit 91c7eb7 had introduced the two together. If anything throws inside the transaction before the MessageData is constructed - such as a transient SQLiteException from the participant lookup - message stays null and the unconditional message.getMessageId() call throws an uncaught NullPointerException that kills the process, skipping the notification and pending-message processing even though the message was already written to telephony.
Restore the guard so these failures degrade gracefully again.