Closed
Bug 90516
Opened 25 years ago
Closed 25 years ago
Crash (divide by zero) on nsSliderFrame.cpp
Categories
(Core :: XUL, defect, P1)
Tracking
()
mozilla0.9.3
People
(Reporter: tetsuroy, Assigned: dr)
References
()
Details
(Keywords: crash)
Attachments
(2 files)
|
8.10 KB,
text/plain
|
Details | |
|
1.03 KB,
patch
|
Details | Diff | Splinter Review |
I just had a crash by just leaving the mozilla (20010711 trunk debug)
for few minutes.
It crashed in //layout/xul/base/src/nsSliderFrame.cpp at line 387
mRatio = float(ourmaxpos)/float(maxpos + ourmaxpos);
Both maxpos and ourmaxpos are ZERO.
I'll attach the stack trace.
| Reporter | ||
Comment 1•25 years ago
|
||
Updated•25 years ago
|
Roy's comments on 83805 suggests that this bug may be related to 83805: I'm
dubious.
For bug 95016, if maxpos and ourmaxpos are ZEROs at line 379, assuming the pixel
to twip stuff didn't break and that no-one has been corrupting our local
variables, that would appear to imply that (at a minimum) maxpospx was 0 at line
361, which would mean it was set to 0 at line 357 by the
GetMaxPosition(scrollbar) call. On the face of the code, I don't see any
guarentee that GetMaxPosition(scrollbar) might not on occasion return zero, so I
think the code near line 379 needs to check for this to avoid divide by zero
errors. I'm not convinced that this is related to bug 83805, where it seems that
thumbBox was non-null at line 322 (and presumably 348) but had mysteriously
become null or dangling (the comments are unclear) by line 384. The only
possible common cause I can see would be if something was corrupting our local
stack variables, and sometimes it corrupts something in the maxpos calculation
while other times it hits the thumbBox pointer. On the other hand if thumbBox is
really becoming null (as opposed to just dangling) in 83805, it is hard to see
how this could happen other than by something corrupting local variables.
->XPToolkit/Widgets
Assignee: karnaze → trudelle
Component: Layout → XP Toolkit/Widgets
QA Contact: petersen → aegis
Summary: Crash on nsSliderFrame.cpp → Crash (divide by zero) on nsSliderFrame.cpp
Comment 5•25 years ago
|
||
Is this not just a duplicate of bug 83805? Do we know how to specifically
trigger this crash?
| Reporter | ||
Comment 6•25 years ago
|
||
John:
>Is this not just a duplicate of bug 83805?
Not sure. Maybe. But what I saw was divide by zero.
>Do we know how to specifically trigger this crash?
Unfortunately, I can't reproduce this. I logged this bug
for helping 83805 to shed some lights.
Comment 7•25 years ago
|
||
Roy, thanks. I wonder if talkback is partially lying about where the crash
is occuring (the topcrash on bug bug 83805), and the real cause is what you
hit in this case -- a divide by zero.
Eric -- is there a chance we can put some bulletproofing in for this? (Or,
is the fact that these variables are zero an indication that something
has gone drastically wrong, and bulletproofing won't be enough).
Assignee: trudelle → evaughan
Comment 8•25 years ago
|
||
evaughan is unavailable for comment. dr, can you check this out?
Assignee: evaughan → dr
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla0.9.3
| Assignee | ||
Comment 10•25 years ago
|
||
Errr, after making this patch, I just checked the state of the world, and a
more-or-less equivalent patch living in bug 83805 has been checked into the
branch. I'm assuming they're looking for a "real fix" on the trunk, but it seems
to me like the zero-check might /be/ the real fix.
I'm duping this. Seems like now is the right time.
*** This bug has been marked as a duplicate of 83805 ***
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Comment 11•25 years ago
|
||
May God have mercy on us all. The 212 bug spam-o-rama is Now!
QA Contact: aegis → jrgm
You need to log in
before you can comment on or make changes to this bug.
Description
•