Closed Bug 1838389 Opened 1 years ago Closed 1 year ago

NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference

Categories

(Fenix :: Crash Reporting, defect, P2)

Firefox 116
All
Android
defect

Tracking

(firefox115 unaffected, firefox116 verified, firefox117 verified, firefox118 verified)

VERIFIED FIXED
118 Branch
Tracking Status
firefox115 --- unaffected
firefox116 --- verified
firefox117 --- verified
firefox118 --- verified

People

(Reporter: rsainani, Assigned: royang)

References

Details

(Keywords: crash, regression, Whiteboard: [fxdroid])

Attachments

(3 files)

Sentry crash report.

Starting 116, there have been increasing number of crashes in the CrashReporter. There are different android os versions and locales, seems like an issue in the CrashReporter.

The severity field is not set for this bug.
:royang, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(royang)

Looks like these crashes occurred around the same time when Nightly was crashing on start https://bugzilla.mozilla.org/show_bug.cgi?id=1837869.
This is probably because of large number of users trying to report the crash.

That said, we should still figure out which string is null when crash reporter trying to send the crash report.

Flags: needinfo?(royang)
Severity: -- → S2
Priority: -- → P3

Marking this bug as a regression in 116.

We have not crash reports from Fenix Release. Why does this crash only affect Nightly and Beta? Does the crash reporter do something different in Nightly and Beta?

Stack track from Sentry:

https://mozilla.sentry.io/issues/4263268818/?query=is%3Aunresolved+Object.toString&referrer=issue-stream&statsPeriod=14d&stream_index=0

java.lang.String in valueOf at line 3657
java.lang.StringBuilder in append at line 132
java.lang.Throwable in printEnclosedStackTrace at line 717
java.lang.Throwable in printStackTrace at line 682
java.lang.Throwable in printStackTrace at line 743
mozilla.components.support.base.ext.ThrowableKt in getStacktraceAsString$default at line 19
mozilla.components.lib.crash.service.MozillaSocorroService in sendCrashData at line 607
mozilla.components.lib.crash.service.MozillaSocorroService in sendReport$lib_crash_release at line 285
mozilla.components.lib.crash.service.MozillaSocorroService in report at line 5
mozilla.components.lib.crash.CrashReporter$submitReport$2 in invokeSuspend at line 70
kotlin.coroutines.jvm.internal.BaseContinuationImpl in resumeWith at line 9
kotlinx.coroutines.DispatchedTask in run at line 112
kotlinx.coroutines.internal.LimitedDispatcher$Worker in run at line 4
kotlinx.coroutines.scheduling.TaskImpl in run at line 3
kotlinx.coroutines.scheduling.CoroutineScheduler$Worker in run at line 96

Summary: CrashReporter Crashes while reporting a crash report → NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference
Version: unspecified → Firefox 116
Whiteboard: [fxdroid]
Assignee: nobody → royang
Status: NEW → RESOLVED
Closed: 1 year ago
Flags: qe-verify+
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
Target Milestone: 117 Branch → 118 Branch
Flags: qe-verify+

The patch landed in nightly and beta is affected.
:royang, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox117 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(royang)
Flags: needinfo?(royang)
See Also: → 1847372

FYI: I verified the presence of the bug in Beta and the resolution of the issue on Nightly, using the STR from bug 1847372 to trigger this crash.

Since this issue endangers the quality of crash reporting, I recommend an uplift.

On the other hand, if the resulting stack traces are still annotated with "[@ EMPTY: no frame data available ]" as seen at https://bugzilla.mozilla.org/show_bug.cgi?id=1847372#c4, the automatic aggregation is not as helpful as it could be. Someone who finds the crash report in about:crashes can still share the Socorro link, so there is at least some non-zero value in these reports though.

See Also: → 1847429

Comment on attachment 9346587 [details] [review]
[mozilla-mobile/firefox-android] Bug 1838389 - Catch NullPointerException while printStackTrace (#3063)

Beta/Release Uplift Approval Request

  • User impact if declined: Crash when trying to report crashes
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is only to catch a crash that happens during crash reporting.
  • String changes made/needed:
  • Is Android affected?: Yes
Attachment #9346587 - Flags: approval-mozilla-beta?

Comment on attachment 9346587 [details] [review]
[mozilla-mobile/firefox-android] Bug 1838389 - Catch NullPointerException while printStackTrace (#3063)

Beta/Release Uplift Approval Request

  • User impact if declined: Crash when trying to report crashes
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is only to catch a crash that happens during crash reporting.
  • String changes made/needed:
  • Is Android affected?: Yes
Attachment #9346587 - Flags: approval-mozilla-release?
Attachment #9346587 - Flags: approval-mozilla-release?
Attachment #9346587 - Flags: approval-mozilla-beta?
Attachment #9348226 - Flags: approval-mozilla-release?
Comment on attachment 9348225 [details] [review] [mozilla-mobile/firefox-android] Bug 1838389 - Catch NullPointerException while printStackTrace (backport #3063) (#3187) Approved for Mobile 117.0b6
Attachment #9348225 - Flags: approval-mozilla-beta+

Verified on the latest Fenix Nightly 118.0a1 from 8/10 with the following devices:

  • Google Pixel 6 (Android 14),
  • Oppo Find X3 Lite (Android 11), and
  • Sony Xperia Z5 Premium (Android 7.1.1).

I've typed about:crashparent into a tab, to trigger a crash, and to test if a crash happens during crash reporting.
A crash did happend during crash reporting, but with a different signature than from this ticket, therefor I've filed a new bug: 1848134.

Roger, it there a different scenario that I could test in order to verify this ticket?
Thank you!

Flags: needinfo?(royang)

:miralobontiu, Yes that looks like a different issue. Thanks for filing the new bug.

Flags: needinfo?(royang)
Flags: qe-verify+
Comment on attachment 9348226 [details] [review] [mozilla-mobile/firefox-android] Bug 1838389 - Catch NullPointerException while printStackTrace (backport #3063) (#3188) Approved for Mobile 116.3.0
Attachment #9348226 - Flags: approval-mozilla-release? → approval-mozilla-release+

Verified as fixed on Firefox RC 116.3.0
Devices used: Huawei Mate 20 Lite(Android 10), Google Pixel 6 (Android 14), Samsung Galaxy Tab S3 (Android 9), Lenovo Yoga Tab 11 (Android 12) .

Status: RESOLVED → VERIFIED
Flags: qe-verify+
See Also: → 1849015
See Also: → 1846306
Duplicate of this bug: 1849015
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: