Hang (caught by hang detector) with flash and alt key

RESOLVED FIXED

Status

()

Core
Plug-ins
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: bsmedberg, Assigned: jimm)

Tracking

Trunk
x86
Windows 7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(status1.9.2 .4-fixed)

Details

(Whiteboard: [fixed-lorentz])

Attachments

(1 attachment, 2 obsolete attachments)

fix
3.10 KB, patch
Ben Turner (not reading bugmail, use the needinfo flag!)
: review+
Details | Diff | Splinter Review
(Reporter)

Description

7 years ago
Hang, caught by the hang detector, with flash context menu and the alt key:

STR:

* load a youtube video, e.g. http://www.youtube.com/watch?v=d1X4r2nHSb0&feature=rec-rn-2r-3-HM
* right-click the video to show the flash context menu
* hit the alt key a few times

In release builds the hang detector kicks in and kills off the plugin process after 10 seconds. This may be related to the topcrash bug 536666 / bug 546035, I first tried these steps because of a comment in one of those crash reports.
(Reporter)

Comment 1

7 years ago
I have this in recording, haven't diagnosed yet.
(Reporter)

Comment 2

7 years ago
Child is processing Windows messages, ends up at:

>	_DefWindowProcA@16()	
 	6c1a88a1	
 	[Frames below may be incorrect and/or missing, no symbols loaded for npswf32.dll]	
 	_NtUserPostThreadMessage@16()	
 	OnShellHookLanguage()	
 	_ShellProc()	
 	000d02a0	
 	_InternalCallWinProc@20()	
 	_UserCallWinProcCheckWow@32()	
 	ffff027f	
 	_InternalCallWinProc@20()	
 	_UserCallWinProcCheckWow@32()	
 	_CallWindowProcAorW@24()	
 	_CallWindowProcW@20()	
 	mozilla::plugins::PluginInstanceChild::PluginWindowProc(hWnd=0x000d02a0, message=0x00000105, wParam=0x00000012, lParam=0xc0380001)	C++

message 0x105 is WM_SYSKEYUP

Parent is sending an unrelated RPC message (NPP_WriteReady). AFAICT we're not hooking whatever window receives WM_SYSKEYUP for deferred message processing, thus the deadlock.
Assignee: nobody → jmathies
(Reporter)

Comment 3

7 years ago
Turns out that the context menu isn't necessary, all you have to do is give the plugin focus (by tabbing to it or clicking on it) and then hit "alt" to get the hang.
(Reporter)

Comment 4

7 years ago
Jim, this is probably more important than the foxit crash.
Blocks: 539055
(Assignee)

Comment 5

7 years ago
So, flash hands wm_syskeyup to def wnd proc, which in turn generates a wm_syscommand message that gets sent to the top level window. That in current nightly builds is handed to def wnd proc as well, which generates all sorts of secondary events. With the child waiting on the return, the first ipc call from parent hangs.

I tried a couple things hoping for a quick fix - deferring wm_syscommand helped but since child is held waiting, we can still get deadlocks if ipc network is heavy. Also tried a combo replymessage call / deferred wm_syscommand, but I still managed get a hang on repeated key strokes. So there's still something going on here that's unknown, will dig into it more tomorrow morning.
Summary: Hang (caught by hang detector) with flash context menu and alt key → Hang (caught by hang detector) with flash and alt key
(Assignee)

Comment 6

7 years ago
Created attachment 431689 [details] [diff] [review]
fix

Handling this the same way we handle activate events did the trick. Also included is a little bit of cleanup in IPCWindowProcHandler. Also, I kept the two if statements separate because i wanted specific comments for each.
(Assignee)

Comment 7

7 years ago
Comment on attachment 431689 [details] [diff] [review]
fix

argh, two patches combined in one.
Attachment #431689 - Attachment is obsolete: true
(Assignee)

Comment 8

7 years ago
Created attachment 431690 [details] [diff] [review]
fix
(Assignee)

Comment 9

7 years ago
Created attachment 431711 [details] [diff] [review]
fix

some additional cleanup.
Attachment #431690 - Attachment is obsolete: true
Attachment #431711 - Flags: review?(bent.mozilla)
(Assignee)

Comment 10

7 years ago
WM_SYSCOMMAND:
http://msdn.microsoft.com/en-us/library/ms646360(VS.85).aspx
Comment on attachment 431711 [details] [diff] [review]
fix

Nit, fix the indentation here, should be 2 spaces.

+      GetPropW(mWnd, L"PluginInstanceParentProperty")) {
+      ReplyMessage(0);
Attachment #431711 - Flags: review?(bent.mozilla) → review+
(Assignee)

Comment 12

7 years ago
http://hg.mozilla.org/mozilla-central/rev/5295a7cfd05c
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Reporter)

Comment 13

7 years ago
http://hg.mozilla.org/projects/firefox-lorentz/rev/f791b2efb911
Whiteboard: [fixed-lorentz]
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
(Reporter)

Comment 15

7 years ago
Merged into 1.9.2 at http://hg.mozilla.org/releases/mozilla-1.9.2/rev/84ba4d805430
status1.9.2: --- → .4-fixed
You need to log in before you can comment on or make changes to this bug.