Closed
Bug 124285
Opened 23 years ago
Closed 21 years ago
Mozilla crashes when form element loses focus.
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: bae, Assigned: bae)
References
Details
(Keywords: crash, embed, topembed-, Whiteboard: [eapp])
Attachments
(6 files)
Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:0.9.8+) Gecko/20020205
Please take look to the attached testcase.
Steps to reproduce:
1. Give the text area 'Description:' focus by clicking in the text area.
2. Type some garbage into 'Description:'
textarea.
3) Tab out, giving 'Committed:' button the focus.
4) Click 'OK' to the message box prompt.
Actual results are:
When you close this alert window then note that the lines like "WEBSHELL+ = nn"
repeatedly appears in the console. When the number for the webshells amounts to
the some limit (for my case it is approximately 250) then mozilla crashes by the
Segmentation Fault.
Assignee | ||
Comment 1•23 years ago
|
||
Comment 2•23 years ago
|
||
wfm with testcase and win2k build 20020207..
Assignee | ||
Comment 3•23 years ago
|
||
As I see it is Solaris specific problem.
This turned out to be another blocker for Siebel to release their application.
The crash (just follow the test case) consistantly happened at:
@1 (l@7) signal SEGV (no mapping at the fault address) in
nsEventStateManager::PreHandleEvent at line 414 in file
"nsEventStateManager.cpp"
The function/method is nsEventStateManager::PreHandleEvent(),and line 414 code
is:
...
gLastFocusedContent->GetDocument(*getter_AddRefs(doc));
The crash call stack is:
nsWidget::DispatchEvent(this = 0x21bbd0, aEvent = 0xffbed3ec, aStatus =
nsEventStatus_eIgnore)
nsWebShellWindow::HandleEvent(aEvent = 0xffbed3ec)
GlobalWindowImpl::Focus(this = 0x211bf0)
nsWindow::SetFocus(this = 0x252d48, aRaise = 1)
nsWindow::DispatchSetFocusEvent(this = 0x252d48)
nsWidget::DispatchFocus(this = 0x252d48, aEvent = STRUCT)
nsWidget::DispatchWindowEvent(this = 0x252d48, event = 0xffbecedc)
nsWidget::DispatchEvent(this = 0x252d48, aEvent = 0xffbecedc, aStatus =
nsEventStatus_eIgnore)
HandleEvent(aEvent = 0xffbecedc)
nsViewManager::DispatchEvent(this = 0x2510a0, aEvent = 0xffbecedc,
aStatus = 0xffbeccc8)
nsView::HandleEvent(this = 0x252ce0, event = 0xffbecedc, aEventFlags =
28U, aStatus = 0xffbeccc8, aForceHandle = 1, aHandled = 1)
PresShell::HandleEvent(this = 0x250528, aView = 0x252ce0, aEvent =
0xffbecedc, aEventStatus = 0xffbeccc8, aForceHandle = 1, aHandled = 1)
PresShell::HandleEventInternal(this = 0x250528, aEvent = 0xffbecedc,
aView = 0x252ce0, aFlags = 1U, aStatus = 0xffbeccc8)
nsEventStateManager::PreHandleEvent(this = 0x45cc08, aPresContext =
0x24e5d8, aEvent = 0xffbecedc, aTargetFrame = 0x5770e8, aStatus =
0xffbeccc8, aView = 0x252ce0)
Severity: critical → blocker
Priority: -- → P1
Major corporations depend on eapp bugs, and need them to be fixed before they
can recommend Mozilla-based products to their customers. Adding nsbeta1+ keyword
and making sure the bugs get re-evaluated if they are targeted beyond 1.0.
Keywords: nsbeta1+
Comment 8•23 years ago
|
||
I run into this too.
Comment 10•23 years ago
|
||
eapp was incorrectly used to change this to nsbeta1+. Resetting to nsbeta1 to
nominate. This is an important issue and deserves to be nsbeta1+ by the ADT.
This issue blocks support of Siebel's appliaction by Sun's branded NS6.2
Comment 11•23 years ago
|
||
cc bryner
Comment 12•23 years ago
|
||
The crash was also reproduced on Linux with mozilla094, and the call stack is
the same:
Program received signal SIGSEGV, Segmentation fault.
0x410048bc in nsEventStateManager::PreHandleEvent (this=0x841edd8,
aPresContext=0x82c04e0,
aEvent=0xbfffeb20, aTargetFrame=0x8505ae0, aStatus=0xbfffea4c,
aView=0x82aeb08)
at nsEventStateManager.cpp:413
413 gLastFocusedContent->GetDocument(*getter_AddRefs(doc));
(gdb) where
#0 0x410048bc in nsEventStateManager::PreHandleEvent (this=0x841edd8,
aPresContext=0x82c04e0, aEvent=0xbfffeb20, aTargetFrame=0x8505ae0,
aStatus=0xbfffea4c,
aView=0x82aeb08) at nsEventStateManager.cpp:413
#1 0x41ba83af in ?? ()
#2 0x41ba7fa8 in ?? ()
#3 0x41e1b145 in ?? ()
#4 0x41e2794f in ?? ()
#5 0x41e1a734 in ?? ()
#6 0x40cc3df8 in nsWidget::DispatchEvent (this=0x82c0ab8, aEvent=0xbfffeb20,
aStatus=@0xbfffeae8) at nsWidget.cpp:1387
#7 0x40cc3a3c in nsWidget::DispatchWindowEvent (this=0x82c0ab8,
event=0xbfffeb20)
at nsWidget.cpp:1278
#8 0x40cc3ae4 in nsWidget::DispatchFocus (this=0x82c0ab8, aEvent=@0xbfffeb20)
at nsWidget.cpp:1300
#9 0x40ccabbe in nsWindow::DispatchSetFocusEvent (this=0x82c0ab8) at
nsWindow.cpp:1311
#10 0x40ccaaee in nsWindow::SetFocus (this=0x82c0ab8, aRaise=1) at
nsWindow.cpp:1266
Comment 13•23 years ago
|
||
This is probably a gtk focus bug. I'll take it.
Assignee: joki → bryner
Target Milestone: --- → mozilla1.0
Updated•23 years ago
|
Status: NEW → ASSIGNED
Comment 14•23 years ago
|
||
I'm not able to reproduce this on build 2002021412, on Linux. I see the onblur
fire, then the onchange fire, and that's all.
Comment 15•23 years ago
|
||
marking nsbeta1+, possibly only on Solaris, or more common there?
Comment 16•23 years ago
|
||
Another testcase, change the onchange event to onmouseout event.
To reproduce the problem: Load the testcase, click the textarea, then move the
pointer out of the textarea. The onblur keeps fire, then segment fault.
Can you reproduce it on Linux, bryner?
Comment 17•23 years ago
|
||
No, I'm still not seeing this bug.
Comment 18•23 years ago
|
||
bryner: this problem is specific to the 0.9.4 branch, and it's very critical
that we get a fix for this on the 0.9.4 branch. can you investigate? it
appears to be GTK specific as you mentioned.
Comment 19•23 years ago
|
||
Repro Steps:
1) Give the textbox 'Description:' focus by clicking in the text area. Make
sure to leave the mouse cursor within the text area.
2) Type some garbage into 'Description:'
3) Tab out, giving 'Committed:' checkbox the focus.
4) Hit Enter at message box prompts.
Result: Several message boxes are displayed informing the user which events
have fired. After a few prompts, the browser terminates.
Expected: Message boxes are displayed. After user hits Enter at message box
prompts, normal functionality returns AND 'Committed' check box has focus.
Hitting the Space Bar checks/unchecks 'Committed' check box.
Comment 20•23 years ago
|
||
Good news - this is fixed by the patch on bug 120209. When that is checked into
the trunk, we can also check in the fix on the branch. Which branch(es),
exactly, does it need to go on?
Comment 21•23 years ago
|
||
Brian,
Thanks for locating the fix. I am going to apply the patch of 120209 in Siebel
tomorrow. If it works there too, it will be checked into Sun's Netscape6.2.1
branch by Sun.
Comment 22•23 years ago
|
||
That fix not fixes another testcase:
<html>
<head><title>Too many webshells</title></head>
<body>
<form>
<textarea name='s_1_1_42_0' onblur='alert("TextArea lose focus");'>
</textarea>
</form>
</body>
</html>
Give focus to textarea and then move mouse pointer out of mozilla window.
Alert window will pop up. Dismiss it and next alert will pop up etc....
May be this issue have different cause, I'm not sure.
I think that we shouldn't fire dom events (namely, onblur and onfocus),
when the whole app loses focus.
(Tested on Solaris 2.8 with patch from 120209 applied).
Comment 23•23 years ago
|
||
I was able to fix this by the same way as in bug 120209, but
for NS_DEACTIVATE event (checking if suppress focus is already TRUE)
Brian, does it sounds reasonable for you?
Comment 24•23 years ago
|
||
Why is this nominated for 094? What is driving? A bugscape bug?
Comment 25•23 years ago
|
||
How close are we to a fix for this one.
Adding Buckland.
Comment 26•23 years ago
|
||
we appear to be pretty close... the fix for bug 120209 is definitely needed.
there may be another patch required as well.
Depends on: 120209
Comment 27•23 years ago
|
||
We have to fire onblur when the window is deactivated and onfocus when the
window gets activated. This is a fundamental requirement of the DOM events.
Comment 28•23 years ago
|
||
except for dependent windows like alerts (just documenting our converation in bug)
Comment 29•23 years ago
|
||
The patch works -- almost. The browser no longer crashes.
But using the 'Orginial Siebel Repro Case' attached test case, when the checkbox
'Committed' changes from checked or unchecked the OnChange() event is fired. It
should only fire once the control loses focus.
Comment 30•23 years ago
|
||
Bill, does that last problem only happen on unix? If not, it's probably
completely unrelated and should be filed as a separate bug.
Comment 31•23 years ago
|
||
Is this related to or the same as:
http://bugzilla.mozilla.org/show_bug.cgi?id=101834?
Comment 32•23 years ago
|
||
Further playing around with patched build resulted in:
###!!! ASSERTION: Attempt to decrement focus controller's suppression when no
suppression active!
: 'PR_FALSE', file nsFocusController.cpp, line 416
###!!! Break: at file nsFocusController.cpp, line 416
Comment 33•23 years ago
|
||
Brian -
Tried repro case on Win2K NS 6.2.1 w/ JRE 1.4 and experienced the same behavior.
So the patch does work! :-)
Sorry for the confusion and thanks for everyone's help.
Comment 34•23 years ago
|
||
Brian -
Tried repro case on Win2K NS 6.2.1 w/ JRE 1.4 and experienced the same behavior.
So the patch does work! :-)
Sorry for the confusion and thanks for everyone's help.
Comment 35•23 years ago
|
||
Does this repro on 094?
Comment 36•23 years ago
|
||
yes, but only under one of the XP_UNIX builds.
Comment 38•23 years ago
|
||
Can we close out this bug then? Any objections?
Comment 39•23 years ago
|
||
Wait a minute! What about scenario from comment #22?
It's still not fixed and you can't get rid of those alert
windows.
Also, could point me where DOM Events spec says that we must
fire onfocus when upon activation and onblur upon deactivation?
I can't find it in the doc.
Comment 40•23 years ago
|
||
Marking this as duplicate of 120209, since the fix of 120209 dose fix the
problem in Siebel, for whom this bug was filed.
*** This bug has been marked as a duplicate of 120209 ***
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Comment 41•23 years ago
|
||
In Siebel's QA test, this crash still happened, and after some investigation, we
found out that the fix in 120209 only fix part of the problem.
Reopen the bug.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Comment 42•23 years ago
|
||
Attaching a work around to prevent crashing for now.
Comment 43•23 years ago
|
||
Re-attach the same work around, but taking out the debug print.
Comment 44•23 years ago
|
||
Marking it opembed-, embed
Comment 45•23 years ago
|
||
Please update this bug with an [adt1] - [adt3] impact rating (or take it off the
list if it doesn't even rate adt3.) Thanks!
Comment 46•23 years ago
|
||
Comment on attachment 75605 [details] [diff] [review]
same work around without debug print
please fix the indenting to be consistent here (looks like maybe you used tabs
instead of spaces), and remove the unneeded braces.
With those changes, r=bryner.
Attachment #75605 -
Flags: review+
Comment 47•23 years ago
|
||
reassinging to joe chou, since he has a fix.
Comment 48•23 years ago
|
||
Actually that was a work around from Andrew Brygin. Re-assign to Andrew.
Also the remaining issue (some extra event got generated) is not that critical,
changing to p3.
Assignee: joe.chou → bae
Severity: blocker → normal
Priority: P1 → P3
Comment 49•23 years ago
|
||
yet, Andrew, I think you should check in your patch to mozilla 1.0, since the
patch does prevent the browser from crashing. At the least, it is a defensive
change, and the risk of breakage is none.
Updated•23 years ago
|
QA Contact: madhur → rakeshmishra
Comment 50•23 years ago
|
||
removing myself from cc:
Comment 51•22 years ago
|
||
what is the situation with this bug? I could not crash with the testcases in
1.0.1/win2k/20020815 or 1.1b/win2k/20020815
Updated•22 years ago
|
QA Contact: rakeshmishra → trix
Updated•22 years ago
|
Target Milestone: mozilla1.0 → ---
Comment 52•22 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
Comment 53•22 years ago
|
||
WFM Mozilla 1.3
Comment 54•21 years ago
|
||
The code in the proposed patch was added in 1.440 of nsEventStateManager.cpp:
revision 1.440
date: 2003/05/12 07:11:11; author: bryner%netscape.com; state: Exp; lines:
+229 -185
Fixes for a number of focus problems:
Bug 201996 (caret blinking in field, but can't type)
Bug 200735 (window is raised when opening link in a new tab)
Bug 203117 (unable to scroll view source window with keyboard)
Bug 194104 (focus is in last tab when opening new window with tabgroup)
See bug 201996 comment 18
-> WORKSFORME
Status: NEW → RESOLVED
Closed: 23 years ago → 21 years ago
Resolution: --- → WORKSFORME
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•