Crash in [@ java.lang.NullPointerException: at org.mozilla.geckoview.GeckoSession.saveAsPdfByBrowsingContext(GeckoSession.java)]
Categories
(GeckoView :: PDF Viewer, defect)
Tracking
(firefox119 affected, firefox120 affected, firefox121 affected)
People
(Reporter: cpeterson, Unassigned)
References
Details
(Keywords: crash, Whiteboard: [fxdroid][foundation])
Crash Data
This crash started in 118. Is that when we enabled the PDF Viewer?
Crash report: https://crash-stats.mozilla.org/report/index/01bc2e29-8624-4164-b57c-f2cd50231027
Exception: java.lang.NullPointerException
Message: Attempt to invoke virtual method 'void org.mozilla.geckoview.GeckoSession$Window.printToPdf(org.mozilla.geckoview.GeckoResult)' on a null object reference
Frame Module Function Source
0 org.mozilla.geckoview.GeckoSession saveAsPdfByBrowsingContext GeckoSession.java:14
1 org.mozilla.geckoview.GeckoSession saveAsPdf GeckoSession.java:2
2 mozilla.components.browser.engine.gecko.GeckoEngineSession requestPdfToDownload GeckoEngineSession.kt:5
3 mozilla.components.browser.state.engine.middleware.EngineDelegateMiddleware$saveToPdf$1 invokeSuspend EngineDelegateMiddleware.kt:14
4 kotlin.coroutines.jvm.internal.BaseContinuationImpl resumeWith ContinuationImpl.kt:9
5 kotlinx.coroutines.DispatchedTask run DispatchedTask.kt:112
6 android.os.Handler handleCallback Handler.java:873
7 android.os.Handler dispatchMessage Handler.java:99
8 android.os.Looper loop Looper.java:214
9 android.app.ActivityThread main ActivityThread.java:7156
10 java.lang.reflect.Method invoke Method.java:-2 False
11 com.android.internal.os.RuntimeInit$MethodAndArgsCaller run RuntimeInit.java:494
12 com.android.internal.os.ZygoteInit main ZygoteInit.java:975
Comment 1•2 years ago
|
||
I have some more info, this is originating from the Fenix menu button to save a PDF.
It could be a regular page or PDF page that the users are attempting to save. I'll see if I can find a STR.
This area was also changed in 118 by:
- via bug 1809422 to help better ensure a Canonical Browsing Context was available on regular pages,
- via bug 1842685 for processing printing a PDF differently, so that PDF's with editable forms print. (Bug switched from using the PDF file saver to the PDF print pre-processing routine for saving a PDF. There is an open bug to optimize this flow at bug 1839456.)
Comment 2•2 years ago
|
||
Also, I see a few traces with didPrintPageContent
, so an alternate STR could also be related to printing pages or PDFs.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 3•2 years ago
|
||
Best lead so far that Calixte discovered is this.mWindow
could be null and that is causing the NullPointerException
.
Updated•1 year ago
|
Description
•