Closed Bug 1554495 Opened 5 years ago Closed 5 years ago

native pdf viewer crashes randomly

Categories

(Core :: Graphics: WebRender, defect, P3)

67 Branch
x86_64
Windows 10
defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox-esr68 --- disabled
firefox68 --- wontfix
firefox69 --- affected
firefox70 --- affected

People

(Reporter: milostodorovic, Unassigned, NeedInfo)

References

Details

Attachments

(2 files)

Attached image pdf viewer (deleted) —

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0

Steps to reproduce:

Issue occurs either when scrolling the document or just keeping it open. It can happen few minutes after opening the doc, or couple of hours later, I can't seem to find a way to reproduce it consistently.

Actual results:

It seems that rendering portion of the pdf viewer crashes for some reason(as shown in the SS), chapter selection menu on the left is the only portion of the UI that's intact. Once a tab with a pdf document crashes all other tabs that have pdf files open will crash at the same moment. Issue is resolved by reloading the affected tabs.

When this happens do you see any errors or warnings in the web or browser console?

Flags: needinfo?(bdahl) → needinfo?(milostodorovic)

My apologies for the late reply, following line shows up after the crash in all affected tabs(errors, warnings, logs, info and debug output is enabled):

Warning: Invalid absolute docBaseUrl: "file:///<pdf file>". pdf.worker.js:1176:13

Other than that I'm getting 3-5 cookie requests blocked as soon as I open any pdf file, though they seem to fire from the pdf file itself, in case its related:

Request to access cookie or storage on “file:///<pdf file>” was blocked because we are blocking all third-party storage access requests and content blocking is enabled. <pdf file>:451:35

Flags: needinfo?(milostodorovic)
Flags: needinfo?(bdahl)
Priority: -- → P3

After you've encountered the issue as seen on the screenshot, please open about:support, click on "Copy text to clipboard", paste it into a text file and upload it here (Attach File). Thanks!

Attached file ffdmp.txt (deleted) —

It seems the bug occurs much less often on newer versions(I've also switched to dev channel in the mean time).

Thanks!

Compositing: WebRender
Description: NVIDIA GeForce GTX 1060 3GB
Vendor ID: 0x10de
Device ID: 0x1c02
Driver Version: 26.21.14.3086
Driver Date: 5-22-2019
Failure Log
(#0): GP+[GFX1-]: Failed to lock ExternalImage for extId:188978569490
(#6): GP+[GFX1-]: Failed to lock ExternalImage for extId:188978704150
(#7): GP+[GFX1-]: Failed to lock ExternalImage for extId:188978704150
(#8): GP+[GFX1-]: Failed to lock ExternalImage for extId:188978704150
(#9): GP+[GFX1-]: Failed to lock ExternalImage for extId:188978704150
(#10): GP+[GFX1-]: Failed to lock ExternalImage for extId:188978704150
(#11): GP+[GFX1-]: Failed to lock ExternalImage for extId:188978704150
(#12): GP+[GFX1-]: Failed to lock ExternalImage for extId:425201787772
(#13): GP+[GFX1-]: Failed to lock ExternalImage for extId:425201787772
(#14): GP+[GFX1-]: Failed to lock ExternalImage for extId:425201787772
(#15): GP+[GFX1-]: Failed to lock ExternalImage for extId:425201787772
(#16): GP+[GFX1-]: Failed to lock ExternalImage for extId:425201787772
(#17): GP+[GFX1-]: Failed to lock ExternalImage for extId:425201787772
(#18): CP+[GFX1-]: (gfxWindowsPlatform) Detected device reset: 1
(#19): CP+[GFX1-]: (gfxWindowsPlatform) scheduled device update.
(#20): CP+[GFX1-]: A content-only TDR is detected.
Component: PDF Viewer → Graphics: WebRender
OS: Unspecified → Windows 10
Priority: P3 → --
Product: Firefox → Core
Hardware: Unspecified → x86_64

The priority flag is not set for this bug.
:jbonisteel, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jbonisteel)
Blocks: wr-70
Flags: needinfo?(jbonisteel)
Priority: -- → P3

Nical, can you see if you can reproduce this?

Flags: needinfo?(nical.bugzilla)

Does the issue occur with any pdf document, or some specifically? If it's the latter could you provide a document that causes the issue?

pdfjs implements most of its rendering using canvas 2d. From the log it looks like something is happening with the canvas (probably D2D related) which fails to render and the texture host isn't sent to the compositor thread. WebRender eventually gets a handle to a texture that was never registered to the renderer thread which is where the "Failed to lock ExternalImage for extId" errors are coming from.

Flags: needinfo?(milostodorovic)

This occurs with all pdf documents that are left open long enough, I suspect it happens less often on non OCRd scans but I don't have enough samples to make that claim yet.

Flags: needinfo?(milostodorovic)

Can we try to artificially cause the problem and see if we handle it properly? e.g. cause a tdr and see if we handle it when pdf.js is open. Do you remember the name of the tool that causes device resets?

I guess we could also try to get more information about what's going wrong on the canvas side.

Flags: needinfo?(sotaro.ikeda.g)

(In reply to Jeff Muizelaar [:jrmuizel] from comment #13)

Do you remember the name of the tool that causes device resets?

TDR could be caused by the following command as administrator.

  • dxcap -forcetdr

But I do not know how to re-produce "content-only TDR".

Flags: needinfo?(sotaro.ikeda.g)

With "dxcap -forcetdr", pdf viewer rendering became black, though I did not see the crash.
The black pdf problem also happened during disabling WebRender.

Blocks: wr-71
No longer blocks: wr-70

milostodorovic are you still seeing this?

Flags: needinfo?(milostodorovic)

Nope, I've had bunch of PDF files open in the background for couple of days now, no crashes. This was over couple of versions of 71, I'm on 71.0b6 atm.

Flags: needinfo?(milostodorovic)

Thanks, marking as Fixed.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Flags: needinfo?(nical.bugzilla)

Hello, I'm having troubles again with the pdf viewer of firefox. When I try to download a pdf blob it doesn't save and I have the warning:

Warning: Invalid absolute docBaseUrl: "blob:http://localhost...

In other navigators all it is ok. Thanks a lot.

(In reply to Santiago from comment #19)

Hello, I'm having troubles again with the pdf viewer of firefox. When I try to download a pdf blob it doesn't save and I have the warning:

Warning: Invalid absolute docBaseUrl: "blob:http://localhost...

In other navigators all it is ok. Thanks a lot.

Can you file a new bug for this, ideally with some way to reproduce this issue? Commenting on a closed bug is unlikely to get much attention.

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

Attachment

General

Creator:
Created:
Updated:
Size: