Closed
Bug 345159
Opened 20 years ago
Closed 20 years ago
Print/Preview crash with null root content [@ nsINode::IsInDoc] from [@ nsPrintEngine::MapContentToWebShells]
Categories
(Core :: Printing: Output, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
Details
(Keywords: crash, testcase)
Crash Data
Attachments
(4 files, 1 obsolete file)
|
446 bytes,
text/html
|
Details | |
|
4.10 KB,
text/plain
|
Details | |
|
587 bytes,
text/html
|
Details | |
|
4.86 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
Print/Preview crash with null root content [@ nsINode::IsInDoc] from [@ nsPrintEngine::MapContentToWebShells]
STEPS TO REPRODUCE
1. load the attached testcase
2. click on the button
3. select File->Print Preview => CRASH
PLATFORMS AND BUILDS TESTED
Bug occurs with SeaMonkey trunk debug build on Linux
| Assignee | ||
Comment 1•20 years ago
|
||
| Assignee | ||
Comment 2•20 years ago
|
||
document.removeChild(document.getElementsByTagName("*")[0])
This line remove the root content.
I have checked this page with IE.
What IE do is to save this page to local and print.
So a blank page will be printed.
So what we should do here?
The most easy way is to give out an error when there is no rootcontent.
| Assignee | ||
Comment 6•20 years ago
|
||
| Assignee | ||
Comment 7•20 years ago
|
||
This patch makes us avoid sub-documents that does not have root content (but
prints everything else). If the root document does not have content an error
dialog is displayed. I re-used the following message:
"Printing failed when starting the document."
(I don't think it's worth the bloat to have a specific message for this
rather extreme edge case).
Assignee: printing → mats.palmgren
Status: NEW → ASSIGNED
Attachment #230113 -
Flags: superreview?(bzbarsky)
Attachment #230113 -
Flags: review?(bzbarsky)
Comment 8•20 years ago
|
||
So.. Shouldn't we call CleanupOnFailure() instead of manually calling ShowPrintErrorDialog? I know the existing error handling is inconsistent; just not sure why... :(
| Assignee | ||
Comment 9•20 years ago
|
||
Using CleanupOnFailure()
Attachment #230113 -
Attachment is obsolete: true
Attachment #230418 -
Flags: superreview?(bzbarsky)
Attachment #230418 -
Flags: review?(bzbarsky)
Attachment #230113 -
Flags: superreview?(bzbarsky)
Attachment #230113 -
Flags: review?(bzbarsky)
Comment 10•20 years ago
|
||
Comment on attachment 230418 [details] [diff] [review]
Patch rev. 2
Looks great. r+sr=bzbarsky
Attachment #230418 -
Flags: superreview?(bzbarsky)
Attachment #230418 -
Flags: superreview+
Attachment #230418 -
Flags: review?(bzbarsky)
Attachment #230418 -
Flags: review+
| Assignee | ||
Comment 11•20 years ago
|
||
Checked in to trunk at 2006-07-25 09:05 PDT.
-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Although I get a "Printing failed when starting the document" error message when print previewing after clicking the button in https://bugzilla.mozilla.org/attachment.cgi?id=229787&action=view, neither it nor https://bugzilla.mozilla.org/attachment.cgi?id=230110&action=view crash any longer.
(I think the error is valid--content has been removed--but what a generic error message; I'll have to see if there's a bug filed to make it nicer.)
Verified FIXED using build 2006-07-27-09 of SeaMonkey trunk under Windows XP.
Status: RESOLVED → VERIFIED
Updated•15 years ago
|
Crash Signature: [@ nsINode::IsInDoc]
[@ nsPrintEngine::MapContentToWebShells]
You need to log in
before you can comment on or make changes to this bug.
Description
•