"ASSERTION: didn't subtract all that we added" with <select>, <div style="margin: 0 100%;">

RESOLVED FIXED

Status

()

Core
Layout
--
minor
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: Jesse Ruderman, Assigned: dholbert)

Tracking

(Blocks: 1 bug, {assertion, testcase})

Trunk
x86
All
assertion, testcase
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

11 years ago
Created attachment 283018 [details]
testcase

This testcase triggers a bunch of assertions, including one I haven't seen elsewhere recently:

###!!! ASSERTION: didn't subtract all that we added: 'space == 0 && ((l2t == FLEX_PCT_LARGE) ? (-0.001f < basis.f && basis.f < 0.001f) : (basis.c == 0 || basis.c == nscoord_MAX))', file /Users/jruderman/trunk/mozilla/layout/tables/BasicTableLayoutStrategy.cpp, line 1013

Note that this isn't the same assertion as in bug 398043.  That one is in BasicTableLayoutStrategy::ComputeColumnIntrinsicWidths; this one is in BasicTableLayoutStrategy::ComputeColumnWidths.
Created attachment 283036 [details] [diff] [review]
fix

Trivial fix.

Issue arises when "width" is nscoord_MAX in ComputeColumnWidths.  We'd been subtracting directly off of "width", and we need to use NSCoordSaturatingSubtract instead.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #283036 - Flags: superreview?
Attachment #283036 - Flags: review?
Attachment #283036 - Flags: approval1.9?
Attachment #283036 - Flags: superreview?(roc)
Attachment #283036 - Flags: superreview?
Attachment #283036 - Flags: review?(roc)
Attachment #283036 - Flags: review?
OS: Mac OS X → All
Attachment #283036 - Flags: superreview?(roc)
Attachment #283036 - Flags: superreview+
Attachment #283036 - Flags: review?(roc)
Attachment #283036 - Flags: review+
Attachment #283036 - Flags: approval1.9?
Attachment #283036 - Flags: approval1.9+
Fix checked in.

Checking in BasicTableLayoutStrategy.cpp;
/cvsroot/mozilla/layout/tables/BasicTableLayoutStrategy.cpp,v  <--  BasicTableLayoutStrategy.cpp
new revision: 3.260; previous revision: 3.259
done
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
This looks okay on Win XP using Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.9a9pre) Gecko/2007100204 Minefield/3.0a9pre. However, using the same build on mac paralyzes my entire system.  On one Intel test machine I had to shut down the machine to get out of the cycle. juanb had the same thing happen to him.
Don't think the hang is caused by this bug's fix... stephend tried this Mac build:

  Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.9a9pre) Gecko/2007100120 Minefield/3.0a9pre

(after the fix was checked in) and it didn't hang.
Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.9a9pre) Gecko/2007100204 Minefield/3.0a9pre -> paralyzes my entire system on mac.

Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.9a9pre) Gecko/2007100104 Minefield/3.0a9pre -> is working fine

so this patch caused a regression on mac.
did some more testings and this seems to be no regression, the hang is also reproducible in 2007100104 and Gran Paradiso Alpha 8 Builds when you use this testcase and click on the "bar" in this testcase.

Filed Bug 398336 for this problem.

(Reporter)

Comment 7

11 years ago
Crashtest checked in.
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.