Add a browser mochitest for the crash on printing when using container tab
Categories
(Core :: Printing: Output, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox-esr78 | --- | unaffected |
firefox79 | --- | unaffected |
firefox80 | --- | unaffected |
firefox81 | --- | unaffected |
firefox82 | --- | wontfix |
firefox83 | --- | verified |
firefox84 | --- | verified |
People
(Reporter: tcampbell, Assigned: hiro)
References
(Regression)
Details
(Keywords: crash, regression, reproducible, Whiteboard: [print2020_v83][old-ui+])
Crash Data
Attachments
(2 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
text/x-phabricator-request
|
Details |
STR:
- Go to a container tab (Multi-Account Containers extension)
- https://cdn.shopify.com/s/files/1/0014/5522/6943/files/Aplat-Mask-Printable-Pattern.pdf?v=1586202597
- Print (using new UI / preview)
- Press Print
Expected:
- Printed document
Actual:
- Content tab crash
nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy*, nsTSubstring<char> const&, nsTSubstring<char> const&, nsTSubstring<char> const&, bool, bool, bool, nsIArray*, bool, bool, bool, nsPIWindowWatcher::PrintKind, nsDocShellLoadState*, mozilla::dom::BrowsingContext**)
Windows 10 (2020.04), Firefox Nightly 82.
Comment 1•4 years ago
|
||
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=2969f3de028f013d30ea20bfccc13670ef8e195f&tochange=0c1847dee730f55b184459f5578c67ab45b611c1
Comment 2•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
Looks like crashes on any pages.
Assignee | ||
Comment 4•4 years ago
|
||
mUserContextIds don't match in this DIAGNOSTIC_ASSERTION.
And when a document having iframes (e.g. https://www.w3schools.com/html/html_iframe.asp) is print-previewed in a container tab, I get Assertion failure: attrs.EqualsIgnoringFPD(docAttrs) on debug builds. I tried mozregression, but I can't go back to the original source, probably there are no longer debug builds, anyways, it's been since 72 at least.
I think the debug assertion is caused by the same root cause that is that we don't copy over the mUserContextIds from the original BrowsingContext.
Comment 5•4 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #4)
I tried mozregression, but I can't go back to the original source, probably there are no longer debug builds, anyways, it's been since 72 at least.
Just confirming that you are saying bug 1636728 is not the regressor? (I'd try the old print preview but I'm on macOS.)
Assignee | ||
Comment 6•4 years ago
|
||
This crash is actually caused by bug 1636728, as in bug bug 1636728 is the regressor. That said, we haven't properly set mUserContextIds for printing documents, bug 1636728 just unwallpapered the long standing issue.
(Note that the crash happens on the old UI, but it's since bug 1636728)
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 7•4 years ago
|
||
Here is a browser mochitest to replicate the crash. Hopefully this should work as expected with a proper fix. :)
Comment 8•4 years ago
|
||
Bug 1661867 fixes this and includes a test, though probably the test should be landed anyhow.
Assignee | ||
Comment 9•4 years ago
|
||
Thank you, Emilio! I am going to land the test once after I confirmed it works fine with bug 1661867 .
Assignee | ||
Comment 10•4 years ago
|
||
I am going to reuse this bug for adding the test.
Assignee | ||
Comment 11•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 13•4 years ago
|
||
Comment 14•4 years ago
|
||
Can we back this out as the test it adds seems to fail?
Comment 15•4 years ago
|
||
Backed out changeset 0fc0697f44e7 (bug 1661984) for browser_print_in_container.js failures.
Backout link: https://hg.mozilla.org/integration/autoland/rev/f2d48bcf174d630f6d9922f302fa0ee1edff6ace
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=315972868&repo=autoland&lineNumber=20421
[task 2020-09-17T16:50:19.715Z] 16:50:19 INFO - TEST-START | toolkit/components/printing/tests/browser_print_in_container.js
[task 2020-09-17T16:50:19.715Z] 16:50:19 INFO - GECKO(5959) | [Child 6197: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 0x7f1ff9997400 == 2 [pid = 6197] [id = {23e93d3e-3a35-4409-b087-4ad93b065322}]
[task 2020-09-17T16:50:19.716Z] 16:50:19 INFO - GECKO(5959) | [Child 6197: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 7 (0x7f1ffb7dc260) [pid = 6197] [serial = 48] [outer = (nil)]
[task 2020-09-17T16:50:19.716Z] 16:50:19 INFO - GECKO(5959) | [Child 6197: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 8 (0x7f1ff9999c00) [pid = 6197] [serial = 49] [outer = 0x7f1ffb7dc260]
[task 2020-09-17T16:50:19.716Z] 16:50:19 INFO - GECKO(5959) | [Child 6252: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 6 (0x7f8cb4dae800) [pid = 6252] [serial = 6] [outer = (nil)] [url = about:printpreview]
[task 2020-09-17T16:50:19.723Z] 16:50:19 INFO - GECKO(5959) | [Child 6252: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 5 (0x7f8cb4d54800) [pid = 6252] [serial = 2] [outer = (nil)] [url = about:blank]
[task 2020-09-17T16:50:19.723Z] 16:50:19 INFO - GECKO(5959) | [Child 6252: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 4 (0x7f8cb4da8800) [pid = 6252] [serial = 5] [outer = (nil)] [url = about:blank]
[task 2020-09-17T16:50:19.723Z] 16:50:19 INFO - GECKO(5959) | [Parent 5959: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 0x7f64dba72400 == 24 [pid = 5959] [id = {fc5d5c92-3236-4dad-bede-4872edf06142}]
[task 2020-09-17T16:50:19.724Z] 16:50:19 INFO - GECKO(5959) | [Parent 5959: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 75 (0x7f64d93659a0) [pid = 5959] [serial = 81] [outer = (nil)]
[task 2020-09-17T16:50:19.724Z] 16:50:19 INFO - GECKO(5959) | [Parent 5959: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 0x7f64dc773000 == 25 [pid = 5959] [id = {f5e5f3b9-e840-47d0-a497-9b74e6ecee40}]
[task 2020-09-17T16:50:19.726Z] 16:50:19 INFO - GECKO(5959) | [Parent 5959: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 76 (0x7f64d9368a90) [pid = 5959] [serial = 82] [outer = (nil)]
[task 2020-09-17T16:50:19.728Z] 16:50:19 INFO - TEST-INFO | started process screentopng
[task 2020-09-17T16:50:19.990Z] 16:50:19 INFO - TEST-INFO | screentopng: exit 0
[task 2020-09-17T16:50:19.990Z] 16:50:19 INFO - Buffered messages logged at 16:50:19
[task 2020-09-17T16:50:19.990Z] 16:50:19 INFO - Entering test bound test
[task 2020-09-17T16:50:19.991Z] 16:50:19 INFO - Buffered messages finished
[task 2020-09-17T16:50:19.991Z] 16:50:19 INFO - TEST-UNEXPECTED-FAIL | toolkit/components/printing/tests/browser_print_in_container.js | There is one print dialog - Got +0, expected 1
[task 2020-09-17T16:50:19.991Z] 16:50:19 INFO - Stack trace:
[task 2020-09-17T16:50:19.991Z] 16:50:19 INFO - chrome://mochikit/content/browser-test.js:test_is:1332
[task 2020-09-17T16:50:19.991Z] 16:50:19 INFO - chrome://mochitests/content/browser/toolkit/components/printing/tests/head.js:assertDialogHidden:75
[task 2020-09-17T16:50:19.992Z] 16:50:19 INFO - chrome://mochitests/content/browser/toolkit/components/printing/tests/browser_print_in_container.js:test:26
[task 2020-09-17T16:50:19.992Z] 16:50:19 INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-09-17T16:50:19.992Z] 16:50:19 INFO - TEST-UNEXPECTED-FAIL | toolkit/components/printing/tests/browser_print_in_container.js | Uncaught exception - at chrome://mochitests/content/browser/toolkit/components/printing/tests/head.js:76 - TypeError: can't access property "_box", this.dialog is undefined
[task 2020-09-17T16:50:19.992Z] 16:50:19 INFO - Stack trace:
[task 2020-09-17T16:50:19.992Z] 16:50:19 INFO - assertDialogHidden@chrome://mochitests/content/browser/toolkit/components/printing/tests/head.js:76:5
[task 2020-09-17T16:50:19.992Z] 16:50:19 INFO - test@chrome://mochitests/content/browser/toolkit/components/printing/tests/browser_print_in_container.js:26:10
[task 2020-09-17T16:50:19.992Z] 16:50:19 INFO - Leaving test bound test
[task 2020-09-17T16:50:19.992Z] 16:50:19 INFO - GECKO(5959) | [Child 6252: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 3 (0x7f8cd1493180) [pid = 6252] [serial = 4] [outer = (nil)] [url = https://example.com/browser/toolkit/components/printing/tests/file_coop_header.html]
[task 2020-09-17T16:50:19.993Z] 16:50:19 INFO - GECKO(5959) | [Child 6252: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 2 (0x7f8cd1493520) [pid = 6252] [serial = 1] [outer = (nil)] [url = https://example.com/browser/toolkit/components/printing/tests/file_coop_header.html]
[task 2020-09-17T16:50:19.993Z] 16:50:19 INFO - GECKO(5959) | [Parent 5959, Main Thread] WARNING: NS_ENSURE_TRUE(presShell) failed: file /builds/worker/checkouts/gecko/dom/base/nsGlobalWindowOuter.cpp, line 4274
[task 2020-09-17T16:50:19.993Z] 16:50:19 INFO - GECKO(5959) | [Parent 5959, Main Thread] WARNING: NS_ENSURE_TRUE(presShell) failed: file /builds/worker/checkouts/gecko/dom/base/nsGlobalWindowOuter.cpp, line 4274
[task 2020-09-17T16:50:19.993Z] 16:50:19 INFO - GECKO(5959) | [Child 6197: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 9 (0x7f1ff99a0000) [pid = 6197] [serial = 50] [outer = 0x7f1ffb7dc260]
[task 2020-09-17T16:50:19.996Z] 16:50:19 INFO - GECKO(5959) | MEMORY STAT | vsize 3171MB | residentFast 428MB | heapAllocated 146MB
[task 2020-09-17T16:50:19.996Z] 16:50:19 INFO - TEST-OK | toolkit/components/printing/tests/browser_print_in_container.js | took 674ms
[task 2020-09-17T16:50:19.997Z] 16:50:19 INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-09-17T16:50:19.997Z] 16:50:19 INFO - TEST-UNEXPECTED-FAIL | toolkit/components/printing/tests/browser_print_in_container.js | Found an unexpected tab at the end of test run: https://example.com/browser/toolkit/components/printing/tests/simplifyArticleSample.html -
[task 2020-09-17T16:50:19.998Z] 16:50:19 INFO - GECKO(5959) | [Child 6252: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 0x7f8cb44af400 == 1 [pid = 6252] [id = {8475a24b-df6a-44a5-b4b5-cb692d0279b3}]
[task 2020-09-17T16:50:19.999Z] 16:50:19 INFO - GECKO(5959) | [Child 6252: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 3 (0x7f8cd1493180) [pid = 6252] [serial = 8] [outer = (nil)]
[task 2020-09-17T16:50:20.000Z] 16:50:20 INFO - GECKO(5959) | [Child 6252: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 4 (0x7f8cb44b0400) [pid = 6252] [serial = 9] [outer = 0x7f8cd1493180]
[task 2020-09-17T16:50:20.000Z] 16:50:20 INFO - checking window state
[task 2020-09-17T16:50:20.026Z] 16:50:20 INFO - GECKO(5959) | [Parent 5959, Main Thread] WARNING: 'aOwner->IsDiscarded()', file /builds/worker/workspace/obj-build/dist/include/mozilla/dom/SyncedContextInlines.h, line 36
[task 2020-09-17T16:50:20.026Z] 16:50:20 INFO - GECKO(5959) | [Parent 5959, Main Thread] WARNING: 'aOwner->IsDiscarded()', file /builds/worker/workspace/obj-build/dist/include/mozilla/dom/SyncedContextInlines.h, line 36
[task 2020-09-17T16:50:20.026Z] 16:50:20 INFO - GECKO(5959) | [Parent 5959, Main Thread] WARNING: 'aOwner->IsDiscarded()', file /builds/worker/workspace/obj-build/dist/include/mozilla/dom/SyncedContextInlines.h, line 36
[task 2020-09-17T16:50:20.026Z] 16:50:20 INFO - GECKO(5959) | [Parent 5959, Main Thread] WARNING: 'aOwner->IsDiscarded()', file /builds/worker/workspace/obj-build/dist/include/mozilla/dom/SyncedContextInlines.h, line 36
[task 2020-09-17T16:50:20.029Z] 16:50:20 INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "https://example.com/browser/toolkit/components/printing/tests/simplifyArticleSample.html" line: 0}]
Updated•4 years ago
|
Updated•4 years ago
|
Comment 16•4 years ago
|
||
Comment 17•4 years ago
|
||
Backed out for failing browser-chrome's browser_system_dialog_subdialog_hidden.js:
https://hg.mozilla.org/integration/autoland/rev/51e1fef0ad1933cc5e3df644f0ddd6816f5fae8e
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=316101797&repo=autoland
[task 2020-09-18T18:07:59.170Z] 18:07:59 INFO - TEST-PASS | toolkit/components/printing/tests/browser_system_dialog_subdialog_hidden.js | The dialog is hidden -
[task 2020-09-18T18:07:59.171Z] 18:07:59 INFO - Buffered messages finished
[task 2020-09-18T18:07:59.171Z] 18:07:59 INFO - TEST-UNEXPECTED-FAIL | toolkit/components/printing/tests/browser_system_dialog_subdialog_hidden.js | Uncaught exception - Wait for dialog to close - timed out after 50 tries.
[task 2020-09-18T18:07:59.172Z] 18:07:59 INFO - Leaving test bound testModalPrintDialog
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 18•4 years ago
|
||
Comment 19•4 years ago
|
||
bugherder |
Comment 20•4 years ago
|
||
I'm able to reliably reproduce this crash in the latest Nightly 83.0.a1 (2020-10-12) on macOS:
STR with Fission enabled:
- Open a new non-Fission window.
- Go to https://developers.google.com/youtube/youtube_player_demo. Note this page has a cross-origin iframe.
- Once page loads hit Cmd+P
Example crash report: https://crash-stats.mozilla.org/report/index/c59ee04a-cf41-4d0d-8def-4d7e20201012
I cannot reproduce this in a Fission window. Seems like the same crash but different STR (not a container this time).
Hiro: Shall we reopen or file a new bug?
Comment 21•4 years ago
|
||
Actually, printing anything from a non-Fission window with Fission enabled crashes.
Comment 22•4 years ago
|
||
(In reply to Sean Voisen (:svoisen) from comment #21)
Actually, printing anything from a non-Fission window with Fission enabled crashes.
This was filed as bug 1670821.
Updated•4 years ago
|
Comment 23•4 years ago
|
||
This issue is verified fixed using Firefox 84.0a1 (BuildId:20201026092834) and Firefox 83.0b4 (BuildId:20201025174155 - By manually enabling the container tabs feature) on Windows 10 64bit, macOS 10.15 & Ubuntu 20.04
Updated•4 years ago
|
Description
•