Closed Bug 1849015 Opened 3 years ago Closed 3 years ago

Crash on crash reporter

Categories

(Firefox for Android :: Crash Reporting, defect, P2)

Firefox 116
All
Android
defect

Tracking

()

RESOLVED DUPLICATE of bug 1838389

People

(Reporter: fabianroeling, Assigned: roger)

References

Details

(Whiteboard: [geckoview:m120?])

Attachments

(1 external file)

User Agent: Mozilla/5.0 (Android 10; Mobile; rv:109.0) Gecko/116.0 Firefox/116.0

Steps to reproduce:

Opened a bunch of bookmarks, got crash, reported from notification.

Actual results:

1cb54f1f-11f5-4fa7-9d97-b4bf58d29ac2
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Object.toString()' on a null object reference
at java.lang.String.valueOf(String.java:2924)
at java.lang.StringBuilder.append(StringBuilder.java:132)
at java.lang.Throwable.printEnclosedStackTrace(Throwable.java:709)
at java.lang.Throwable.printStackTrace(Throwable.java:674)
at java.lang.Throwable.printStackTrace(Throwable.java:735)
at mozilla.components.support.base.ext.ThrowableKt.getStacktraceAsString$default(Throwable.kt:19)
at mozilla.components.lib.crash.service.MozillaSocorroService.sendCrashData(MozillaSocorroService.kt:607)
at mozilla.components.lib.crash.service.MozillaSocorroService.sendReport$lib_crash_release(MozillaSocorroService.kt:285)
at mozilla.components.lib.crash.service.MozillaSocorroService.report(MozillaSocorroService.kt:5)
at mozilla.components.lib.crash.CrashReporter$submitReport$2.invokeSuspend(CrashReporter.kt:70)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:112)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:4)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:3)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:96)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@6aec4f8, Dispatchers.IO]

If someone's interested, here is the original bookmarks crash. But I can't reproduce it, so I'm not making another bug report.

300e77b6-00e5-458d-ae84-d1202c866a1b
java.lang.NullPointerException


java.lang.NullPointerException
at org.mozilla.fenix.library.bookmarks.BookmarkFragment.refreshBookmarks(BookmarkFragment.kt:103)
at org.mozilla.fenix.library.bookmarks.BookmarkFragment$refreshBookmarks$1.invokeSuspend(BookmarkFragment.kt:14)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:112)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7400)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@26f4bf6, Dispatchers.Main]

See Also: → 1839160
See Also: → 1838389
Severity: -- → S2
Priority: -- → P2
Whiteboard: [geckoview:m120?]

Hey Roger could you take a look please?

Flags: needinfo?(royang)

Sure, looks like there are two issues here. I'll take a look at the crash reporter crash first.

Flags: needinfo?(royang)
Assignee: nobody → royang

That's definitely the more important one, it seems to break all crash reporting and therefore blocks knowing about many other crashes. The other one I couldn't even reproduce with the exact same actions.

Looks like this issue is due to getStacktraceAsJsonString throwing NullPointerException even though throwable is not null. Very similar to the issue we ahve with printStackTrace. The only solution here is to catch it and continue with the crash submission.

A second look I noticed that this is the crash that we fixed already recently. It's not from the getStacktraceAsJsonString but from the getStacktraceAsString. Closing this as dup.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Duplicate of bug: 1838389
Resolution: --- → DUPLICATE

:fabianroeling, do we want to create another bug for the bookmark crash? Thanks

Flags: needinfo?(fabianroeling)

Not really useful without reproduction steps IMO. It happened exactly once. Could be a cosmic ray from all I know.

Flags: needinfo?(fabianroeling)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: