[gtk2] java plugins crashes due to incorrect focus switching

RESOLVED DUPLICATE of bug 191072

Status

()

Core
XUL
--
critical
RESOLVED DUPLICATE of bug 191072
15 years ago
15 years ago

People

(Reporter: Robin Lu, Assigned: Robin Lu)

Tracking

({crash})

Trunk
x86
Linux
crash
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

7.25 KB, text/plain
Details
3.97 KB, patch
Details | Diff | Splinter Review
(Assignee)

Description

15 years ago
Currently, we use enter/leave notify to switch the focus between mozilla and
java plugins. However, we do not check if the enter/leave does happen between
mozilla and java plugins. When java plugin popes up/close a window and the
enter/leave notify happen between two java plugin windows, the focus changing
has done by java plugin itself and the extra switching done by us may cause
mozilla crash.

In the patch, I add some check to make sure the enter/leave is between mozilla
and plugin by checking if the notify detail is NONLINEAR.
(Assignee)

Comment 1

15 years ago
Created attachment 111461 [details] [diff] [review]
patch
(Assignee)

Comment 2

15 years ago
Created attachment 111462 [details]
java test case

1.use this test case as a java applete in a html page
2. click on the combo box on the right bottom of the plugin and choose 'line'.
Don't release the button
3. move mouse to the canvas, release the button and a line is drawn.
4. move the mouse out of the mozilla
result: the mozilla crashes and get an error message:
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 23339 error_code 8 request_code 42 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
aborting...
(Assignee)

Updated

15 years ago
Attachment #111461 - Flags: review?(blizzard)
(Assignee)

Comment 3

15 years ago
Comment on attachment 111461 [details] [diff] [review]
patch

it might not be a good idea. I will figure out a better way.
Attachment #111461 - Flags: review?(blizzard)

Comment 4

15 years ago
By the definitions on <http://bugzilla.mozilla.org/bug_status.html#severity> and
<http://bugzilla.mozilla.org/enter_bug.cgi?format=guided>, crashing and dataloss
bugs are of critical or possibly higher severity.  Only changing open bugs to
minimize unnecessary spam.  Keywords to trigger this would be crash, topcrash,
topcrash+, zt4newcrash, dataloss.
Severity: normal → critical
(Assignee)

Comment 5

15 years ago
Created attachment 112042 [details] [diff] [review]
patch

In this patch, when non-xembed plugin gets focus, I set gFocusWindow as the
nsWindow that contains the plugin. I remove the manual focus switch in
OnLeaveNotify. It is quite dangerous. Instead, I call gtk_window_show to let
the window get back the focus by itself in SetFocus() which is the actual time
we need to switch focus.
Attachment #111461 - Attachment is obsolete: true
(Assignee)

Updated

15 years ago
Blocks: 191072
No longer blocks: 92033
(Assignee)

Updated

15 years ago
No longer blocks: 191072
Depends on: 191072
(Assignee)

Updated

15 years ago
No longer depends on: 191072
(Assignee)

Updated

15 years ago
Depends on: 191072
(Assignee)

Comment 6

15 years ago

*** This bug has been marked as a duplicate of 191072 ***
Status: NEW → RESOLVED
Last Resolved: 15 years ago
No longer depends on: 191072
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.