Closed Bug 534768 Opened 10 years ago Closed 10 years ago
Crash [@ ns
Bidi Pres Utils::Resolve]
366 bytes, text/html
337 bytes, text/html
9.43 KB, patch
|Details | Diff | Splinter Review|
10.74 KB, patch
|Details | Diff | Splinter Review|
11.29 KB, patch
|Details | Diff | Splinter Review|
Variations on bug 429865's crashtest still cause problems.
###!!! ASSERTION: prev sibling not in line list: 'Not Reached', file layout/generic/nsBlockFrame.cpp, line 4764 ###!!! ASSERTION: aFrame is not a descendent of aBlockFrame: 'parent', file layout/base/nsBidiPresUtils.cpp, line 285 ###!!! ASSERTION: Can't find frame in lines!: 'hasNext', file layout/base/nsBidiPresUtils.cpp, line 291 ###!!! ABORT: comparing iterators over different lists: 'mListLink == aOther.mListLink', file layout/base/../generic/nsLineBox.h, line 704
###!!! ASSERTION: Should have been cleared: 'mBreakSinks.IsEmpty()', file layout/generic/nsTextFrameThebes.cpp, line 649 ###!!! ASSERTION: invalid array index: 'i < Length()', file ../../dist/include/nsTArray.h, line 317 Crash [@ nsBidiPresUtils::Resolve] accessing 0x55555555 (with MallocScribble)
Looking at the first testcase, stripping out all the dynamic stuff, a text frame continuation stays on the firstletter frame's overflow list because of the code here http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsFirstLetterFrame.cpp#205 where we invent a linelayout from nothing, and SetDirtyNextLine gets called on that linelayout, nothing ever comes of the SetDirtyNextLine call because we forget about that linelayout right away. As a side note, can we assert that nothing is on overflow lists after a flush and/or when entering frame construction (anywhere else?)? I've seen a few Jesse bugs that would have probably been found much quicker if we asserted such.
When we invent a linelayout from nothing, we have to not wrap anything on the line. Yes, we could assert that nothing is on overflow lists, apart from the above issue which I'm not sure how to fix. But in the past we've tried to survive having content left on overflow lists. Probably we should try to survive it still.
The SetDirtyNextLine was just a symptom of the real problem, we weren't trying to wrap to another line, the first letter logic was causing the continuation to be created. I think what we need is to do the same thing as bug 491547 but in nsFirstLetterFrame::Reflow in the case where we create a next-in-flow for a child of a floating letter frame. Normally we'd create a continuation for the textframe child of a floating first letter frame if it might need one ahead of time in nsCSSFrameConstructor::CreateFloatingLetterFrame. But that doesn't correctly detect that this situation needs a continuation, and I don't think in general that it could easily be adapted to be able to handle other dynamic situations.
Hopefully this situation only happens on BIDI frames so that we can use nextBidi to insert the continuation where we need to without triggering a reflow command.
Assignee: nobody → tnikkel
Attachment #417662 - Flags: review?(roc)
Attachment #417662 - Flags: review?(smontagu)
Attachment #417662 - Flags: review?(roc) → review+
Simon, do you want to review this or are you fine with just roc reviewing?
Comment on attachment 417662 [details] [diff] [review] patch Apologies for the delay
Attachment #417662 - Flags: review?(smontagu) → review+
I remembered that I wanted to look into this more. Turns out you don't need any BIDI to trigger the condition of needing to create a continuation for a textframe inside a floating first-letter frame. A block with floating first-letter style that contains only a space followed by a character that is not punctuation, not a space, and not alphanumeric will do it. So the "should only get here with bidi frames" assertion will fire. We need to use the nextBidi listname when inserting the continuation so that we don't try to issue a another reflow from inside a reflow. So I propose removing the assertion and making it clear in a comment that the listname nextBidi is bogus but necessary.
Sounds good to me. Please do that and let's get this fixed!
Made those changes and landed http://hg.mozilla.org/mozilla-central/rev/aff1d6e46f2c
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a4
blocking1.9.1: --- → ?
blocking1.9.2: --- → ?
Can we get a crashtest, as well as branch patches worked up?
blocking1.9.1: ? → needed
blocking1.9.2: ? → needed
OS: Mac OS X → All
What do you mean by "get a crashtest"? For security bugs the procedure I've been using is to set "in-testsuite?", and then when the bug is opened the testcase can be landed. Is there a better way I should be handling it?
Enough changes that I liked a second set of eyes on this. The extra queryframe stuff is needed because nsIFrame and nsIFrameDebug (gone on m-c) make it ambiguous otherwise.
Attachment #434362 - Flags: review?(roc)
Attachment #434362 - Flags: review?(roc) → review+
Attachment #434363 - Flags: review?(roc) → review+
Attachment #434362 - Flags: approval126.96.36.199?
Attachment #434363 - Flags: approval188.8.131.52?
(In reply to comment #13) > What do you mean by "get a crashtest"? For security bugs the procedure I've > been using is to set "in-testsuite?", and then when the bug is opened the > testcase can be landed. Is there a better way I should be handling it? Not landing the test and using "in-testsuite?" is great, that's what we want for security bugs. However, we do like to have the test in hand, both so your reviewer can review it (does it have sufficient coverage, etc) and so QA can manually apply it to their trees and test with it.
Comment on attachment 434362 [details] [diff] [review] 1.9.2 patch Approved for 184.108.40.206, a=dveditz for release-drivers
Attachment #434362 - Flags: approval220.127.116.11? → approval18.104.22.168+
Comment on attachment 434363 [details] [diff] [review] 1.9.1 patch Approved for 22.214.171.124, a=dveditz for release-drivers
Attachment #434363 - Flags: approval126.96.36.199? → approval188.8.131.52+
In this case the test is just the two testcases in this bug imported into the tree as crashtests. So the reviewer can see them and QA can load them directly without needing to apply anything.
Verified for 1.9.2 using the two attached tests. Aborts and crashes (respectively) on 184.108.40.206 but has no problems with my build from today (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:220.127.116.11pre) Gecko/20100407 Lorentz/3.6.4pre (.NET CLR 3.5.30729)). Verified for 1.9.1 the same way with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:18.104.22.168pre) Gecko/20100407 Shiretoko/3.5.10pre (.NET CLR 3.5.30729).
Added crashtest http://hg.mozilla.org/mozilla-central/rev/dbd20f123483
Flags: in-testsuite? → in-testsuite+
Crash Signature: [@ nsBidiPresUtils::Resolve]
You need to log in before you can comment on or make changes to this bug.