Closed Bug 1003169 Opened 10 years ago Closed 3 years ago

The entire Dock freezes after minimizing a window with a tab-modal alert

Categories

(Core :: Widget: Cocoa, defect)

x86_64
macOS
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox30 --- affected
firefox31 --- affected

People

(Reporter: cbadau, Assigned: smichaud)

Details

Attachments

(1 file)

Attached file sample.htm (deleted) —
Reproducible on the latest Nightly (BuildID: 20140428030203) 
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:31.0) Gecko/20100101 Firefox/31.0
Reproducible on the latest Aurora (BuildID: 20140428004000)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:30.0) Gecko/20100101
Firefox/30.0


Steps to reproduce: 
1. Drag the "sample" html -> an alert comes up (the alert comes up while dragging). 
2. Minimize the window (without dismiss the alert). 
3. Try to open again the minimized window (from the Dock bar). 
 

Actual results: The entire Dock bar is frozen. No actions can be performed from here (the minimized window can't be opened)

Expected results: The minimized window is correctly opened. The Dock bar works as expected. 

Notes: This issue is not a regression.
Camelia, you should win some kind of prize -- this is the worst and strangest bug I've seen in a long time :-)

I'll be working on it.
Assignee: nobody → smichaud
Severity: normal → major
Summary: The dock bar freezes after minimizing a window with an alert → The dock bar freezes after minimizing a window with a tab-modal alert
Component: General → Widget: Cocoa
Product: Firefox → Core
Summary: The dock bar freezes after minimizing a window with a tab-modal alert → The entire Dock freezes after minimizing a window with a tab-modal alert
I see this back to Firefox 4.0.1 (which is as far back as I tested).  So no, this isn't a regression.
Actually you don't need to force-quit Firefox to regain access to the Dock.  Instead do the following:

1) Cmd-Tab until Firefox is selected.
2) In Firefox's Window menu, select the minimized window.
This bug has an even worse variant on Windows (tested on Windows 7):

1. Drag the "sample" html -> an alert comes up (the alert comes up while dragging).
2. Notice that the cursor has changed into the "forbidden operation" symbol.

As best I can tell, at this point you need to use the Task Manager to force quit firefox.exe.

Camelia, have you tested on Linux?
Flags: needinfo?(camelia.badau)
Qawanted for tests on Linux.
Keywords: qawanted
(In reply to Steven Michaud from comment #5)
> This bug has an even worse variant on Windows (tested on Windows 7):
> 
> 1. Drag the "sample" html -> an alert comes up (the alert comes up while
> dragging).
> 2. Notice that the cursor has changed into the "forbidden operation" symbol.
> 
> As best I can tell, at this point you need to use the Task Manager to force
> quit firefox.exe.
> 
> Camelia, have you tested on Linux?

I can't reproduce this on Windows 7 with latest Aurora and latest Nightly. The cursor is changed into the "forbidden operation" symbol but only until the tab-modal alert appears. No freeze occurs. 


I verified the bug on Ubuntu 13.10 32bit using latest Aurora (buildID: 20140428004000), Nightly 31.0a1 (buildID: 20140428030203) and latest Nightly 32.0a1 (buildID: 20140429030201) and it works fine (no freeze after minimizing a window with a tab-modal alert).
Flags: needinfo?(camelia.badau)
Keywords: qawanted
Thanks for your tests, Camelia.  I don't know why your results on Windows 7 are different from mine, but I'll put it aside for the time being.
This is an Apple bug:  It also happens with Safari.

Though interestingly it doesn't happen with Chrome or Opera.

For those browsers that have the bug (like Firefox and Safari), the dragged link doesn't go back when the alert appears as you're dragging it -- it only goes back after you've dismissed the alert.  For browsers that don't have the bug, the dragged link goes back as soon as you release the mouse (even with the alert displayed).

I'll look to see if there's anything we can do to make our behavior like Chrome's and Opera's, and thereby work around Apple's bug.
Here's a more detailed description of the Apple bug (which seems to be a bug in the Dock application):

When the Dock is working normally, clicking on an app's Dock icon causes the Dock to send the app a kAEReopenApplication ('rapp') Apple Event.  Among other things this causes the app to be focused (whether or not the app actually handles this Apple Event).

When the bug is "in play" this doesn't happen -- for *any* app whose Dock icon you click.  So clicking on an app's Dock icon no longer focuses the app.
For what it's worth (since I spent a long time figuring it out):

Apple events don't come through the Window Server.  Instead they come through a special Mach port (a version 1 CFRunLoopSource).  Then they (somehow) get posted to the standard (Carbon) event queue, managed by the HIToolbox framework.

Marking this as Resolved > Worksforme since it's no longer reproducible on the latest versions of Firefox Nightly 96.0a1 (2021-11-08), beta 95.0b4 or release 94.0.1 on MacOS 11.6.
If anyone can still reproduce the issue either re-open it or file a new one.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: