Closed Bug 470167 Opened 16 years ago Closed 16 years ago

"ASSERTION: Should be in an update while creating frames" with stylesheet appended many times

Categories

(Core :: Layout, defect, P2)

x86
macOS
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: jruderman, Assigned: smaug)

References

Details

(Keywords: assertion, testcase, verified1.9.1)

Attachments

(3 files)

Attached file testcase
This testcase triggers: ###!!! ASSERTION: Should be in an update while creating frames: 'mUpdateCount != 0', file layout/base/nsCSSFrameConstructor.cpp, line 8355 A related testcase (not attached) triggers: ###!!! ASSERTION: Should be in an update while destroying frames: 'mUpdateCount != 0', file layout/base/nsCSSFrameConstructor.cpp, line 9319 ###!!! ASSERTION: Odd update count: 'mUpdateCount == 1', file layout/base/nsCSSFrameConstructor.cpp, line 10144 Bug 464863 also triggers the "should be in an update" assertions, but its testcase is very different.
Attached file stack trace
Whoops. This is a regression from bug 431082. The --mUpdateCount disappeared from nsCSSFrameConstructor::EndUpdate, so we overflow the counter. Need to fix this. smaug, want to patch?
Blocks: 431082
Flags: blocking1.9.1?
Ugh, yes. Idiot me.
Assignee: nobody → Olli.Pettay
Attachment #353893 - Flags: superreview?(bzbarsky)
Attachment #353893 - Flags: review?(bzbarsky)
Attachment #353893 - Flags: superreview?(bzbarsky)
Attachment #353893 - Flags: superreview+
Attachment #353893 - Flags: review?(bzbarsky)
Attachment #353893 - Flags: review+
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
It's unfortunate that I had to overflow the counter to notice the bug. Are there points at which we can assert that the counter is 0, perhaps when the object that owns the counter is destroyed?
Hmm. Yeah, I think it should be reasonable to have such an assert in ~nsCSSFrameConstructor. Pushed http://hg.mozilla.org/mozilla-central/rev/018f2e97dedd to do that.
Flags: blocking1.9.1? → blocking1.9.1+
Priority: -- → P2
Comment on attachment 353893 [details] [diff] [review] put back --mUpdateCount a191=beltzner
Attachment #353893 - Flags: approval1.9.1? → approval1.9.1+
in-testsuite- (the testcase in comment 0 is slow, and the assertion added in comment 6 covers the bug better the testcase does).
Flags: in-testsuite-
pushed to 1.9.1 too: http://hg.mozilla.org/releases/mozilla-1.9.1/rev/fcfcf03ce04d verified FIXED (no assertions) using the attached test case on debug builds: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1pre) Gecko/20090608 Shiretoko/3.5pre ID:20090608122057 and Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090608 Minefield/3.6a1pre ID:20090608122028
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: