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 mms export #230

Closed
farfromrefug opened this issue Feb 4, 2025 · 1 comment · Fixed by #231
Closed

crash on mms export #230

farfromrefug opened this issue Feb 4, 2025 · 1 comment · Fixed by #231

Comments

@farfromrefug
Copy link
Contributor

I get a crash while trying to export my sms/mms. It happens at the end while exporting mms.

02-04 11:30:14.696 17391 17391 E AndroidRuntime: Process: com.github.tmo1.sms_ie, PID: 17391
02-04 11:30:14.696 17391 17391 E AndroidRuntime: java.lang.NullPointerException: address.getString(addressIndex) must not be null
02-04 11:30:14.696 17391 17391 E AndroidRuntime: 	at C0.f.b(SourceFile:41)
02-04 11:30:14.696 17391 17391 E AndroidRuntime: 	at H0.y.e(SourceFile:17)
02-04 11:30:14.696 17391 17391 E AndroidRuntime: 	at p1.b.c(SourceFile:9)
02-04 11:30:14.696 17391 17391 E AndroidRuntime: 	at D1.z.run(SourceFile:117)
02-04 11:30:14.696 17391 17391 E AndroidRuntime: 	at B.e.run(SourceFile:363)
02-04 11:30:14.696 17391 17391 E AndroidRuntime: 	at K1.j.run(SourceFile:3)
02-04 11:30:14.696 17391 17391 E AndroidRuntime: 	at K1.a.run(SourceFile:92)
02-04 11:30:14.696 17391 17391 E AndroidRuntime: 	Suppressed: I1.g: [c0{Cancelling}@df729ea, Dispatchers.Main]

My guess would be that it happens because of the fact that i actually first imported an old backup of mine and that i now am trying to export with newly added messages. Something must not be "filled" from the imported backup.

I cant create a sample to reproduce because i dont know which part of the data is corrupted i have more than 15000 messages :s
However the error seems pretty clear. I would gues the issue is here

appContext, displayNames, address.getString(addressIndex)


lookupDisplayName expect address to be not null. I ll test and create a PR

@tmo1
Copy link
Owner

tmo1 commented Feb 5, 2025

This is a variation of issue #38; the (contributed) fix for that issue (PR #39) added null checks to the callers of lookupDisplayName, but only to the SMS and call log export functions, and not to the MMS export function. Your PR seems to be a better solution: change the lookupDisplayName function signature to accept null values, and include a null check inside the function. I'll merge the PR, and then remove the now redundant null checks in the caller functions.

Thank you!

@tmo1 tmo1 closed this as completed in #231 Feb 5, 2025
tmo1 added a commit that referenced this issue Feb 5, 2025
Remove redundant null checks and update copyright years in light of
commit 3fcd13a.

Addresses: #38, #39, #230, #231
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants