Closed Bug 402912 Opened 17 years ago Closed 17 years ago

"###!!! ASSERTION: bad pref, min, max size" with XUL equalsize, flex

Categories

(Core :: XUL, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: neil)

References

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Attached file testcase
Loading the testcase triggers:

###!!! ASSERTION: bad pref, min, max size: '(boxSizes->min <= boxSizes->pref && boxSizes->pref <= boxSizes->max)', file /Users/jruderman/trunk/mozilla/layout/xul/base/src/nsSprocketLayout.cpp, line 1184
Whiteboard: DUPEME
Why "DUPEME"?  I searched Bugzilla for the assertion before filing the bug, and the only mentions were in the fixed bug 382899 and invalid bug 83368.
Because I didn't remember fixing bug 382899. D'oh!
Whiteboard: DUPEME
OK, so the problem appears to be here:
            if (childActualWidth > childLayoutWidth) {
               aChildComputedSize->size = childActualWidth;
               aChildBoxSize->min = childActualWidth;
               if (aChildBoxSize->pref < childActualWidth)
                  aChildBoxSize->pref = childActualWidth;
Note that this can increase the minimum width, and it will of course increase the preferred width to match, but it fails to increase the maximum width.
Attached patch Proposed patchSplinter Review
This fixes the assertion and seems to be the correct approach.
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #288734 - Flags: superreview?(roc)
Attachment #288734 - Flags: review?(enndeakin)
Attachment #288734 - Flags: superreview?(roc) → superreview+
Attachment #288734 - Flags: review?(enndeakin) → review+
Attachment #288734 - Flags: approval1.9?
Attachment #288734 - Flags: approval1.9? → approval1.9+
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Crashtest checked in.
Flags: in-testsuite+
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: