Closed
Bug 543788
Opened 15 years ago
Closed 15 years ago
[OOPP] CallUpdateWindow hang when switching tabs with a plugin loaded
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(blocking2.0 alpha2+, status1.9.2 .4-fixed)
RESOLVED
FIXED
People
(Reporter: kbrosnan, Assigned: benjamin)
References
Details
(Whiteboard: [OOPPTestday][fixed-lorentz])
Attachments
(4 files)
3.66 KB,
text/plain
|
Details | |
1.86 KB,
patch
|
jimm
:
review+
bent.mozilla
:
review-
|
Details | Diff | Splinter Review |
1.10 KB,
patch
|
bent.mozilla
:
review+
|
Details | Diff | Splinter Review |
1.20 KB,
patch
|
jimm
:
review+
|
Details | Diff | Splinter Review |
Load our friend the 36 MB pdf http://acroeng.adobe.com/Test_Files/filesize/Large_Files/0445_MT.pdf
Open a new tab
Switch between the pdf and other tabs, shortly your mouse clicks should be ignored.
Focusing the tab with the pdf and closing it unblocks the mouse. Closing the tab in the background never releases the mouse input. Killing mozilla-runtime.exe allows for the use of the mouse again.
Updated•15 years ago
|
Whiteboard: [OOPPTestday]
Comment 1•15 years ago
|
||
Nominating for blocking alpha1.
In today's testday, there has been many instances of this bug where the loaded plugin (acrobat, flash) is creating the mouse click on tabs to be ignored. I have found one repro myself:
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a1pre) Gecko/20100202 Minefield/3.7a1pre (.NET CLR 3.5.30729)
Repro:
1) load 2 tabs, one with a youtube flash video playing
2) click back and forth between tabs
3) Eventually, notice you are unable to click on the 2nd tab anymore.
Expected:
- tab switching via mouse clicks should always work when plugins are running.
blocking2.0: --- → ?
Assignee | ||
Comment 3•15 years ago
|
||
Yeah, me too. ->jim the focus-master!
Assignee: nobody → jmathies
blocking2.0: ? → alpha1
Updated•15 years ago
|
Summary: [OOPP] mouse interactions are ignored while loading a large pdf → [OOPP] mouse interactions are ignored while loading a large pdf or visiting a site with flash
Reporter | ||
Comment 4•15 years ago
|
||
While having the mouse input blocked I am also seeing links from external programs not loading and form submission not processing till the blocking is cleared.
Comment 5•15 years ago
|
||
(In reply to comment #4)
> While having the mouse input blocked I am also seeing links from external
> programs not loading and form submission not processing till the blocking is
> cleared.
bug 543479
Comment 6•15 years ago
|
||
Its not just flash. the same thing happens with silverlight video loaded. Need to force-kill process to resume browsing.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a1pre) Gecko/20100205 Minefield/3.7a1pre (.NET CLR 3.5.30729)
Silverlight Plug-In
File: npctrl.dll
Version: 3.0.50106.0
3.0.50106.0
Summary: [OOPP] mouse interactions are ignored while loading a large pdf or visiting a site with flash → [OOPP] mouse interactions are ignored while loading a large pdf or visiting a site with flash or silverlight
blocking2.0: alpha1 → alpha2
Comment 7•15 years ago
|
||
Updated•15 years ago
|
Summary: [OOPP] mouse interactions are ignored while loading a large pdf or visiting a site with flash or silverlight → [OOPP] CallUpdateWindow hang when switching tabs with a plugin loaded
(In reply to comment #7)
> Created an attachment (id=425717) [details]
> CallUpdateWindow hang stack
This could be fine, depending on the child process' stack.
Assignee | ||
Comment 10•15 years ago
|
||
I have this in recording: it appears that the child isn't responding correctly to the messages, but I'm still investigating.
Assignee: jmathies → benjamin
Assignee | ||
Comment 11•15 years ago
|
||
What appears to be happening is an infinite loop:
Browser process is in the main event loop, no real trickery, and pretty much every message is in nsWindow::OnPaint -> PPluginInstanceParent::CallUpdateWindow.
At least for me, the child is processing the IPDL message perfectly correctly and calling ::UpdateWindow.
When the browser process unwinds it paints again. There are no deferred messages, or at least DeferredMessageHook and ProcessOrDeferMessage are never entered.
Can a debugger, or Spy++, know whether the plugin process is posting any WM_PAINT messages (directly or indirectly) and get stacks from that location?
Assignee | ||
Comment 12•15 years ago
|
||
I caught one case where we deferred WM_NCPAINT and then WM_ERASEBKGND... I wonder if that can loop. I'm going to add some printfs which don't affect focus, since reproducing it with focus changes to the debugger is really hard.
Assignee | ||
Comment 13•15 years ago
|
||
[time:1265669649151000][PPluginInstanceParent] Sending Msg_UpdateWindow()
[time:1265669649156000][PPluginInstanceChild] Received Msg_UpdateWindow()
0[760590]: bool __thiscall mozilla::plugins::PluginInstanceChild::AnswerUpdateWi
ndow(void)
[time:1265669649157000][PPluginInstanceChild] Sending reply Reply_UpdateWindow()
[time:1265669649157000][PPluginInstanceParent] Received reply Reply_UpdateWindow
()
[time:1265669649163000][PPluginInstanceParent] Sending Msg_UpdateWindow()
etc... Really, no deferred messages at all, no races. Still no clue.
Assignee | ||
Comment 14•15 years ago
|
||
What I think is happening: because we don't set WS_CLIPCHILDREN, windows asks us to paint the plugin container window. This is an unusual code path to begin with, and bug 542337 "worked around" this issue by having WM_PAINT for the container window cause us to issue an ::UpdateWindow for the plugin window. This is unnecessary, because Windows should be tracking the invalidate region for the plugin window separately and issuing WM_PAINT as needed. So far, this is just an unnecessary synchronous paint.
Then I think the windowed plugin is causing some invalidate on the container window while it is painting (within AnswerUpdateWindow)... this dispatches an asynchronous WM_PAINT message. Then after AnswerUpdateWindow returns, we call ::ValidateWindow, but the WM_PAINT message has already been dispatched, so we iloop.
I haven't been able to create a test for this situation, which is kinda scary, but at least this seems to fix the bug and paint correctly.
Attachment #425981 -
Flags: review?(jmathies)
Updated•15 years ago
|
Attachment #425981 -
Flags: review?(jmathies)
Attachment #425981 -
Flags: review?(bent.mozilla)
Attachment #425981 -
Flags: review+
Comment 15•15 years ago
|
||
This sounds very similar to what I encountered, so I'll describe it here.
Went to:
http://treasurydirect.gov/govt/charts/charts_debt.htm
Opened a 2nd tab.
Clicked on dropdown to right in awesomebar to pick a recent site. Clicked away from awesomebar, then clicked again. 2nd time, the dropdown was completely unresponsive, as was clicking on tabs, until I closed the flash page.
Only reason I'm mentioning is that the unresponsive awesomebar seems new.
Comment 16•15 years ago
|
||
Oh, and I opened link to verify while I was typing this. I then hit commit. The tab switched to the loading spinner, which didn't move, until I used ctrl-pageup to move back to the flash tab, at which point it submitted fine.
Switching back, navigation hung once more until I suspended it again.
Assignee | ||
Comment 18•15 years ago
|
||
Attachment #426308 -
Flags: review?(bent.mozilla)
Updated•15 years ago
|
Attachment #425981 -
Flags: review?(bent.mozilla) → review-
Comment on attachment 426308 [details] [diff] [review]
Ignore an empty update rect from WM_PAINT, rev. 2
> if (mWindowType == eWindowType_plugin) {
>+ RECT updateRect;
>+ if (GetUpdateRect(mWnd, &updateRect, FALSE)
GetUpdateRect can return a boolean indicating whether or not the update rect is empty, so I'd make this:
if (mWindowType == eWindowType_plugin &&
GetUpdateRect(mWnd, NULL, FALSE)) {
...
Attachment #426308 -
Flags: review?(bent.mozilla) → review-
Assignee | ||
Comment 20•15 years ago
|
||
Comment on attachment 426308 [details] [diff] [review]
Ignore an empty update rect from WM_PAINT, rev. 2
bent, in the test I did, GetUpdateRect returned TRUE with a 0,0,0,0 rect, so I had to do it this way.
Attachment #426308 -
Flags: review- → review?
Comment on attachment 426308 [details] [diff] [review]
Ignore an empty update rect from WM_PAINT, rev. 2
Oh wow. MSDN loses.
Attachment #426308 -
Flags: review? → review+
Assignee | ||
Comment 22•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 23•15 years ago
|
||
Comment 24•15 years ago
|
||
Using the latest hourly build which contains this fix, and the 2ns follow up push, I can still lock up the browser following the steps provided by the OP in comment #0
Win7 X-64
cset: http://hg.mozilla.org/mozilla-central/rev/cc3751898ccc
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a2pre) Gecko/20100211 Minefield/3.7a2pre ID:20100211150154
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 25•15 years ago
|
||
I'm thinking my bug 544173 might be a dupe of this. I guess I'll find out once this finally gets fixed.
Comment 26•15 years ago
|
||
Confirmed not fixed. The bug stops if you continue with ctrl+tab. Then also clicking on tabs works again for a while.
Comment 27•15 years ago
|
||
(In reply to comment #26)
> Confirmed not fixed. The bug stops if you continue with ctrl+tab. Then also
> clicking on tabs works again for a while.
The call update window hang was an app freeze issue, at least for me when I experienced it. I've been seeing what Ria describes, which isn't a true hang - It's a tab switching problem. For example, when I experience it, I can still see the little tab height highlight draw on the tab I click, even though it doesn't come forward. This might be bug 545239, or it might be something else. But I believe the call update window lockup is fixed. Can anyone else confirm that?
Comment 28•15 years ago
|
||
another observation on this, when i break out in a debugger, the stacks look fine. neither process is frozen on a call to setfocus, or call update window.
Assignee | ||
Comment 29•15 years ago
|
||
I screwed up this fix, I can reproduce in debug and can fix it with an extra ValidateWindow call. I'm trying to construct a testcase now... I was able to reliably reproduce this by:
* opening the PDF file and therefore acrobat
* create a new tab, load about:config
* right-click on about:config to get a popup menu
Assignee | ||
Comment 30•15 years ago
|
||
Attachment #426690 -
Flags: review?(jmathies)
Updated•15 years ago
|
Attachment #426690 -
Flags: review?(jmathies) → review+
Assignee | ||
Comment 31•15 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 33•15 years ago
|
||
http://hg.mozilla.org/projects/firefox-lorentz/rev/360cba5cf39c
http://hg.mozilla.org/projects/firefox-lorentz/rev/11fa3864f2d9
Whiteboard: [OOPPTestday] → [OOPPTestday][fixed-lorentz]
Comment 34•15 years ago
|
||
Blanket approval for Lorentz merge to mozilla-1.9.2
a=beltzner for 1.9.2.4 - please make sure to mark status1.9.2:.4-fixed
Assignee | ||
Comment 35•15 years ago
|
||
Merged into 1.9.2 at http://hg.mozilla.org/releases/mozilla-1.9.2/rev/84ba4d805430
status1.9.2:
--- → .4-fixed
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•