Closed Bug 442442 Opened 16 years ago Closed 16 years ago

Browser hangs when it displays a JavaScript alert while OS print dialog is open

Categories

(Core :: Widget: Cocoa, defect)

PowerPC
macOS
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 436473

People

(Reporter: mark, Assigned: smichaud)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0

When attempting to print a page that uses the Javascript "window.print()" function, the printer dialog will appear and then a second later, an alert that says, "The document cannot change while printing or in preview".  Cannot cancel either dialog as Firefox has become unresponsive at this point and must Force Quit.  Worse, I can't restore the session as it goes right back to the same condition.  This does not happen with Firefox 2.x.

Reproducible: Always

Steps to Reproduce:
1. Go to URL above
2. Click the "Print" button on the page's menu (left side, last item)
3.
Actual Results:  
Browser becomes shows printer dialog and alert saying "The document cannot change while printing or in preview", the becomes unresponsive.

Expected Results:  
Allowed me to print the page.
This bug is a hang, not a crash.

It's quite easy to reproduce, but you do have to wait 15-20 seconds
after step 2 for the "The document cannot change while printing ... "
alert to appear.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Probably a Cocoa widgets bug.
Assignee: nobody → joshmoz
Component: General → Widget: Cocoa
Product: Firefox → Core
QA Contact: general → cocoa
Summary: Javascript printing: Browser crashes with "The document cannot change while printing or in preview" → Browser hangs when it displays a JavaScript alert while OS print dialog is open
Here's a stack trace made in gdb (on a build with debug symbols) after
this bug's hang.

Like bug 436473, this bug's hang appears to be caused by the browser
putting up a browser-modal dialog (the "The document cannot change
while printing ... " alert) while an OS-modal dialog (the Print
dialog) is still open.

Though this bug contains interesting and useful information (not least
because it's a lot easier to reproduce than bug 436473), I'm going to
mark this bug as a duplicate.  Both bugs share the same underlying
cause.
Assignee: joshmoz → smichaud
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Bug 426701 has useful information and a reduced testcase (attachment 341668 [details]).
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: