Closed
Bug 112241
Opened 23 years ago
Closed 23 years ago
Mozilla locks up [and/or crahses] when select box is used (recursive onchange)
Categories
(Core :: Layout: Form Controls, defect, P1)
Core
Layout: Form Controls
Tracking
()
RESOLVED
FIXED
mozilla0.9.9
People
(Reporter: jason, Assigned: john)
References
()
Details
(Keywords: hang)
Attachments
(4 files, 2 obsolete files)
69.65 KB,
text/plain
|
Details | |
3.29 KB,
text/plain
|
Details | |
1.31 KB,
text/plain
|
Details | |
32.44 KB,
patch
|
kinmoz
:
review+
kinmoz
:
superreview+
|
Details | Diff | Splinter Review |
From Bugzilla Helper:Jason@elluzion.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.6) Gecko/20011120
BuildID: 2001112009
When attempting to select an item in the selct box on this page, Mozilla and all
instances of Mozilla (including mail) lock up and eventually Win2K labels them
"not responding" and closes them. This was tested several times. Works fine in IE.
Reproducible: Always
Steps to Reproduce:
1.go to
http://www.zdnet.com/yil/content/college/college2000/rank_university_100.html
2. try to use select-box
3.
Actual Results: Mozilla locks up
Expected Results: Normal select-box functionality.
Comment 1•23 years ago
|
||
confirming with win2k build 20011127..
we are looping
Assignee: pchen → rods
Severity: normal → critical
Status: UNCONFIRMED → NEW
Component: XP Apps → HTML Form Controls
Ever confirmed: true
Keywords: hang
QA Contact: sairuh → madhur
Comment 2•23 years ago
|
||
this is the first time i got a a "out of memory warning" since I installed
win2k with 512MB RAM while generating a stack :-(
Assignee | ||
Comment 4•23 years ago
|
||
From the stack trace, the problem appears to be:
1. select1.onChange calls a function
2. That function changes select1.text
3. Changing select1.text calls select1.onChange (this is bad behavior).
Status: NEW → ASSIGNED
on linux/2001112712 too.
watching the "size" grow in top was interersting, topped at about 520MB (:
Assignee | ||
Comment 7•23 years ago
|
||
I investigated some, the selection firing and updating is messy as hell and
that's where the confusion is coming in. I will clean that up with this patch.
At the least we need to split off event firing from the ever-mysterious
UpdateSelection(). That would fix this bug.
Even after that there are other hidden sillinesses with SetText()'s call to
UpdateSelection(), centering primarily on the fact that it calls
UpdateSelection() with new index=0. This means we will behave inconsistently
depending on whether the first item is the selected index or not (we won't
repaint or anything in that case--that may actually be the source of some other
weird option text bugs I have heard of). I think we should remove that param
from UpdateSelection() and put it into another method that does that check.
Assignee | ||
Comment 8•23 years ago
|
||
*** Bug 112233 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 9•23 years ago
|
||
OK, I'm making progress. I have figured out what's going on, and splitting the
Combobox::UpdateSelection() up a little and removing the aIndex parameter is a
good start for a fix here. I have made a good head start, making a redisplay
function to do just that, and removed two member variables in the bargain :)
Some of these changes are definitely out of scope for the bug, but will benefit
things overall. I am soooo tired of trying to figure out how all these damn
event firing and redisplay functions work every single time I run across a bug.
The names are nondescript, parameters get ignored, and some functions in
interfaces aren't even used.
This bug will last through the weekend though, I'm afraid.
I'll attach my preliminary analysis of the event-firing and redisplay-triggering
functions in Combobox and List. This patch, when done, will hopefully untangle
the mess.
Assignee | ||
Comment 10•23 years ago
|
||
Assignee | ||
Comment 11•23 years ago
|
||
Comment on attachment 59660 [details]
callers/called/descriptions for the major event- and redisplay-triggering functions in Combobox and List
Ugh, I *have* to get out of the habit of marking things patches.
Attachment #59660 -
Attachment is patch: false
Assignee | ||
Comment 12•23 years ago
|
||
The patch works pretty well, fixes this problem and several others, and makes
the whole notification scheme somewhat readable (though I am not sure if it's as
pretty as it can be yet). I will regression test the crap out of it, clean it
up, and attach it in the next couple of days and we'll be on the way out here.
Note to self: performance test this against setting option.text on 10000 options
sequentially.
Target Milestone: --- → mozilla0.9.7
![]() |
||
Comment 13•23 years ago
|
||
*** Bug 113689 has been marked as a duplicate of this bug. ***
![]() |
||
Comment 14•23 years ago
|
||
*** Bug 115156 has been marked as a duplicate of this bug. ***
![]() |
||
Updated•23 years ago
|
Summary: Mozilla locks up when select box is used → Mozilla locks up when select box is used (recursive onchange)
Assignee | ||
Comment 15•23 years ago
|
||
The patch is working and posted in bug 113866. Haven't found any regressions so
far. Still, too big to dump in 0.9.7 at the last minute. 0.9.8 for sure unless
something big comes and smacks the Moz codebase. Feel free to test the patch
over there!
Target Milestone: mozilla0.9.7 → mozilla0.9.8
Comment 16•23 years ago
|
||
Note also bug 77271:
"Need to filter recursive events to prevent crashes"
![]() |
||
Comment 17•23 years ago
|
||
*** Bug 115256 has been marked as a duplicate of this bug. ***
Comment 18•23 years ago
|
||
*** Bug 115325 has been marked as a duplicate of this bug. ***
Comment 19•23 years ago
|
||
*** Bug 115613 has been marked as a duplicate of this bug. ***
Comment 20•23 years ago
|
||
This bug is not solved in 0.9.7 as far as I see?
Work around in programming JavaScript is to use a
setTimeout("stuff which changes option.text",50)
This avoids the recursion to the onChange Event.
jo
Assignee | ||
Comment 21•23 years ago
|
||
*** Bug 118939 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 22•23 years ago
|
||
Working on this now. I'll make a smaller patch to fix just this for the time being.
Priority: -- → P1
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Assignee | ||
Comment 23•23 years ago
|
||
This fixes this bug as well as making the whole flow of select reflow and
onchange stuff a lot clearer and cleaner.
Assignee | ||
Comment 24•23 years ago
|
||
To speed review along, this is a description of the changes I made in the
patch.
Assignee | ||
Comment 25•23 years ago
|
||
Fixes minor bustage in patch: keyboard selection when dropdown is not dropped
down was not firing onChange
Attachment #65950 -
Attachment is obsolete: true
Comment 26•23 years ago
|
||
r=rods
Assignee | ||
Comment 27•23 years ago
|
||
Pressing return when the combobox was not dropped down was firing onChange even
though the selected index did not change. It has now been beaten on and
scrutinized against both rods's and my regression tests.
Attachment #65957 -
Attachment is obsolete: true
Comment 28•23 years ago
|
||
r=rods
Comment 29•23 years ago
|
||
I can't crash reproduce the recursive onChange() problem in my 01/24/02 Win32
debug build. Did bryner's fix for bug 120189 fix this problem already?
Comment 30•23 years ago
|
||
Comment on attachment 66008 [details] [diff] [review]
Patch 3
sr=kin@netscape.com
Lets just make sure your changes don't conflict with whatever it was that fixed
the original recursion problem.
Attachment #66008 -
Flags: superreview+
Attachment #66008 -
Flags: review+
Comment 31•23 years ago
|
||
*** Bug 112052 has been marked as a duplicate of this bug. ***
Comment 32•23 years ago
|
||
*** Bug 121023 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 33•23 years ago
|
||
Checked in and verified.
Assignee | ||
Comment 34•23 years ago
|
||
Resolved, even.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 35•23 years ago
|
||
And fixed problem in bug 115613, among others. Nice job! Verifying.
Status: RESOLVED → VERIFIED
Comment 36•23 years ago
|
||
I'm running version 2002020405 and the bug has reappeared. Version 2002012808
nightly build seemed to have been fixed.
Running the Macintosh version.
Can someone verify?
Comment 37•23 years ago
|
||
verified on Mac OS X with Mozilla 0.9.8 2002020411
Mozilla does not hang, but rather crashes. Can someone test on other platforms
and see whether it does just one of the two, or depends on platform (and then
update the summary acordingly)?
Changing URL to give simple test case.
Changing OS to Mac OS X. Can someone change to ALL if they can verify on other
platforms?
Reopening bug. The milestone of 0.9.9 is still set, and seems appropriate. I'll
nominate this for inclusion in bug 122050
-matt
Status: VERIFIED → REOPENED
OS: Windows 2000 → MacOS X
Resolution: FIXED → ---
Summary: Mozilla locks up when select box is used (recursive onchange) → Mozilla locks up [and/or crahses] when select box is used (recursive onchange)
Comment 38•23 years ago
|
||
Addition to my previous post,
I'm running Mac OS 9.2.2
Ray A.
Comment 39•23 years ago
|
||
I don't see an option for "Mac OS X and Mac OS 9.x" so I'm putting it to ALL
-matt
OS: MacOS X → All
![]() |
||
Comment 40•23 years ago
|
||
Hello... This was checked in Jan 28. 0.9.8 froze on Jan 16. The patch does not
have a=. This means that this patch did _not_ make 0.9.8 (hence the 0.9.9
milestone). Testing this with branch builds is completely pointless.
Ray, are you seeing this in the _trunk_ 2002020405 build?
Comment 41•23 years ago
|
||
my bad.
The trunk is fine.. (and I *love* the sheets support... now if only they'd be in
the tab instead of in the window)
-matt
Status: REOPENED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Comment 42•23 years ago
|
||
Boris,
yes you are right (humbled look on face). I didn't catch that it did not make
0.9.8.
Thanks.
Ray A.
![]() |
||
Comment 43•23 years ago
|
||
*** Bug 123935 has been marked as a duplicate of this bug. ***
Comment 44•23 years ago
|
||
*** Bug 125670 has been marked as a duplicate of this bug. ***
Updated•23 years ago
|
QA Contact: madhur → tpreston
You need to log in
before you can comment on or make changes to this bug.
Description
•