Closed Bug 1162813 Opened 9 years ago Closed 9 years ago

ASSERTION: Unexpected paragraph separator: 'Not Reached', file layout/base/nsBidi.cpp, line 549

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox40 --- affected
firefox45 --- fixed

People

(Reporter: jruderman, Assigned: smontagu)

References

Details

(4 keywords)

Attachments

(5 files)

Attached file testcase for Firefox
###!!! ASSERTION: Unexpected paragraph separator: 'Not Reached', file layout/base/nsBidi.cpp, line 557
Attached file stack
(In reply to Jesse Ruderman from comment #2)
> failed attempt to create a content testcase

It failed because we filter all characters with Bidi type Segment Separator or Block Separator in nsBidiPresUtils::ResolveParagraph. We probably need to do the same in the other callers of SetPara.
(But sooner or later we probably want to add support for multiple paragraphs in nsBidi anyway. I'll open another bug about that)
I see this assertion failure when scrolling through about:config in a debug build:

[45253] ###!!! ASSERTION: Unexpected paragraph separator: 'Not Reached', file layout/base/nsBidi.cpp, line 549
[45253] ###!!! ASSERTION: Unexpected paragraph separator: 'Not Reached', file layout/base/nsBidi.cpp, line 1151
[45253] ###!!! ASSERTION: Unexpected paragraph separator: 'Not Reached', file layout/base/nsBidi.cpp, line 549
[45253] ###!!! ASSERTION: Unexpected paragraph separator: 'Not Reached', file layout/base/nsBidi.cpp, line 549
Keywords: reproducible
Summary: "ASSERTION: Unexpected paragraph separator" → ASSERTION: Unexpected paragraph separator: 'Not Reached', file layout/base/nsBidi.cpp, line 549
Attached patch crashtestSplinter Review
Assignee: nobody → smontagu
Attachment #8695214 - Flags: review?(jfkthame)
Attached patch FixSplinter Review
What I suggested in comment 3.

FTR, multi-paragraph support is bug 1163923.
Attachment #8695216 - Flags: review?(jfkthame)
Attachment #8695214 - Flags: review?(jfkthame) → review+
Comment on attachment 8695216 [details] [diff] [review]
Fix

Review of attachment 8695216 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/base/nsBidiPresUtils.cpp
@@ +2009,5 @@
>    NS_ASSERTION((aPosResolve == nullptr) != (aPosResolveCount > 0), "Incorrect aPosResolve / aPosResolveCount arguments");
>  
>    int32_t runCount;
>  
>    nsAutoString textBuffer(aText, aLength);

Huh - it seems that in current trunk code (before your patch), this |textBuffer| string was completely unused. I wonder if the compiler was smart enough to optimize it away?

(Looks like that dates back to bug 624798, which replaced the old mBuffer member variable with this local, but then didn't use it for anything.)
Attachment #8695216 - Flags: review?(jfkthame) → review+
https://hg.mozilla.org/mozilla-central/rev/3fcd9e467788
https://hg.mozilla.org/mozilla-central/rev/d08afef8b42d
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: