###!!! ASSERTION: a start offset is beyond the end of the text fragment!: 'aStartOffset == 0', file /home/timeless/mozilla/content/base/src/nsXMLContentSerializer.cpp, line 111

VERIFIED DUPLICATE of bug 119335

Status

()

VERIFIED DUPLICATE of bug 119335
17 years ago
17 years ago

People

(Reporter: timeless, Assigned: hjtoi-bugzilla)

Tracking

({assertion})

Trunk
x86
Linux
assertion
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

17 years ago
freebsd cvs build from last weekend
selecting top/bottom of sidebar contents (seamonkey-ports tree)

#2  0x282d35c9 in nsDebug::Assertion (aStr=0x296553a0 "a start offset is beyond the end of the text fragment!",
    aExpr=0x29655379 "aStartOffset == 0", aFile=0x296551c0 "/home/timeless/mozilla/content/base/src/nsXMLContentSerializer.cpp", aLine=111)
    at /home/timeless/mozilla/xpcom/base/nsDebug.cpp:290
#3  0x2947e81f in nsXMLContentSerializer::AppendTextData (this=0x8ef5d00, aNode=0x8accb1c, aStartOffset=27, aEndOffset=-1, aStr=@0xbfbfd9fc,
    aTranslateEntities=1, aIncrColumn=0) at /home/timeless/mozilla/content/base/src/nsXMLContentSerializer.cpp:111
#4  0x294829d1 in nsHTMLContentSerializer::AppendText (this=0x8ef5d00, aText=0x8accb1c, aStartOffset=27, aEndOffset=-1, aStr=@0xbfbfe660)
    at /home/timeless/mozilla/content/base/src/nsHTMLContentSerializer.cpp:161
#5  0x293ec6d9 in nsDocumentEncoder::SerializeNodeStart (this=0x89dd600, aNode=0x8accb1c, aStartOffset=27, aEndOffset=-1, aStr=@0xbfbfe660)
    at /home/timeless/mozilla/content/base/src/nsDocumentEncoder.cpp:317
#6  0x293edefa in nsDocumentEncoder::SerializeRangeNodes (this=0x89dd600, aRange=0x8c6c6c0, aNode=0x8accb1c, aString=@0xbfbfe660, aDepth=3)
    at /home/timeless/mozilla/content/base/src/nsDocumentEncoder.cpp:688
#7  0x293ee64b in nsDocumentEncoder::SerializeRangeNodes (this=0x89dd600, aRange=0x8c6c6c0, aNode=0x8bd112c, aString=@0xbfbfe660, aDepth=2)
    at /home/timeless/mozilla/content/base/src/nsDocumentEncoder.cpp:753
#8  0x293ee64b in nsDocumentEncoder::SerializeRangeNodes (this=0x89dd600, aRange=0x8c6c6c0, aNode=0x8bd1028, aString=@0xbfbfe660, aDepth=1)
    at /home/timeless/mozilla/content/base/src/nsDocumentEncoder.cpp:753
#9  0x293ee64b in nsDocumentEncoder::SerializeRangeNodes (this=0x89dd600, aRange=0x8c6c6c0, aNode=0x8af9868, aString=@0xbfbfe660, aDepth=0)
    at /home/timeless/mozilla/content/base/src/nsDocumentEncoder.cpp:753
#10 0x293ef0e7 in nsDocumentEncoder::SerializeRangeToString (this=0x89dd600, aRange=0x8c6c6c0, aOutputString=@0xbfbfe660)
    at /home/timeless/mozilla/content/base/src/nsDocumentEncoder.cpp:874
#11 0x293ef876 in nsDocumentEncoder::EncodeToString (this=0x89dd600, aOutputString=@0xbfbfe660)
    at /home/timeless/mozilla/content/base/src/nsDocumentEncoder.cpp:922
#12 0x293f1aa3 in nsHTMLCopyEncoder::EncodeToStringWithContext (this=0x89dd600, aEncodedString=@0xbfbfe660, aContextString=@0xbfbfe5cc,
    aInfoString=@0xbfbfe538) at /home/timeless/mozilla/content/base/src/nsDocumentEncoder.cpp:1217
#13 0x29cdd75a in nsCopySupport::HTMLCopy (aSel=0x8882e00, aDoc=0x8c2b000, aClipboardID=0)
    at /home/timeless/mozilla/layout/base/src/nsCopySupport.cpp:111
#14 0x29cd8564 in nsAutoCopyService::NotifySelectionChanged (this=0x82e7a60, aDoc=0x8c2b004, aSel=0x8882e00, aReason=4)
    at /home/timeless/mozilla/layout/base/src/nsAutoCopy.cpp:155
#15 0x2946ee45 in nsTypedSelection::NotifySelectionListeners (this=0x8882e00) at /home/timeless/mozilla/content/base/src/nsSelection.cpp:7499
#16 0x2945cf93 in nsSelection::NotifySelectionListeners (this=0x8a9ba00, aType=1)
    at /home/timeless/mozilla/content/base/src/nsSelection.cpp:3052
#17 0x2945c276 in nsSelection::SetMouseDownState (this=0x8a9ba00, aState=0) at /home/timeless/mozilla/content/base/src/nsSelection.cpp:2771
#18 0x29b1f40f in nsFrame::HandleRelease (this=0x8bf60e8, aPresContext=0x856d000, aEvent=0xbfbff1c8, aEventStatus=0xbfbff01c)
    at /home/timeless/mozilla/layout/html/base/src/nsFrame.cpp:1506
#19 0x29b1b328 in nsFrame::HandleEvent (this=0x8bf60e8, aPresContext=0x856d000, aEvent=0xbfbff1c8, aEventStatus=0xbfbff01c)
    at /home/timeless/mozilla/layout/html/base/src/nsFrame.cpp:728
#20 0x29b0bdf4 in nsBlockFrame::HandleEvent (this=0x8bf60e8, aPresContext=0x856d000, aEvent=0xbfbff1c8, aEventStatus=0xbfbff01c)
    at /home/timeless/mozilla/layout/html/base/src/nsBlockFrame.cpp:5768
#21 0x29b8510e in PresShell::HandleEventInternal (this=0x856d400, aEvent=0xbfbff1c8, aView=0x8ace700, aFlags=1, aStatus=0xbfbff01c)
    at /home/timeless/mozilla/layout/html/base/src/nsPresShell.cpp:6001
#22 0x29b849dd in PresShell::HandleEvent (this=0x856d400, aView=0x8ace700, aEvent=0xbfbff1c8, aEventStatus=0xbfbff01c, aForceHandle=1,
    aHandled=@0xbfbfefd8) at /home/timeless/mozilla/layout/html/base/src/nsPresShell.cpp:5909
#23 0x29f08523 in nsView::HandleEvent (this=0x8ace700, event=0xbfbff1c8, aEventFlags=0, aStatus=0xbfbff01c, aForceHandle=1,
    aHandled=@0xbfbfefd8) at /home/timeless/mozilla/view/src/nsView.cpp:374
#24 0x29f17a0d in nsViewManager::DispatchEvent (this=0x8a9b700, aEvent=0xbfbff1c8, aStatus=0xbfbff01c)
    at /home/timeless/mozilla/view/src/nsViewManager.cpp:1907
#25 0x29f078da in HandleEvent (aEvent=0xbfbff1c8) at /home/timeless/mozilla/view/src/nsView.cpp:80
#26 0x289ec725 in nsWidget::DispatchEvent (this=0x8ea9c00, aEvent=0xbfbff1c8, aStatus=@0xbfbff10c)
    at /home/timeless/mozilla/widget/src/gtk/nsWidget.cpp:1409
#27 0x289ec2c5 in nsWidget::DispatchWindowEvent (this=0x8ea9c00, event=0xbfbff1c8) at /home/timeless/mozilla/widget/src/gtk/nsWidget.cpp:1300
#28 0x289ec823 in nsWidget::DispatchMouseEvent (this=0x8ea9c00, aEvent=@0xbfbff1c8) at /home/timeless/mozilla/widget/src/gtk/nsWidget.cpp:1436
#29 0x289ede61 in nsWidget::OnButtonReleaseSignal (this=0x8ea9c00, aGdkButtonEvent=0x82f0018)
    at /home/timeless/mozilla/widget/src/gtk/nsWidget.cpp:1987
#30 0x289f495a in nsWindow::HandleGDKEvent (this=0x8ea9c00, event=0x82f0018) at /home/timeless/mozilla/widget/src/gtk/nsWindow.cpp:1627

#3  0x2947e81f in nsXMLContentSerializer::AppendTextData (this=0x8ef5d00, aNode=0x8accb1c, aStartOffset=27, aEndOffset=-1, aStr=@0xbfbfd9fc,
    aTranslateEntities=1, aIncrColumn=0) at /home/timeless/mozilla/content/base/src/nsXMLContentSerializer.cpp:111
111                        "a start offset is beyond the end of the text fragment!");
(gdb) list
106       if (frag) {
107         PRInt32 length = ((aEndOffset == -1) ? frag->GetLength() : aEndOffset) - aStartOffset;
108
109         if (length <= 0) {
110           NS_ASSERTION(aStartOffset == 0,
111                        "a start offset is beyond the end of the text fragment!");
112           return NS_OK;  // XXX Zero is a legal value, maybe non-zero values should
113                          //     be an error.
114         }
115
(gdb) p aStartOffset
$1 = 27
(gdb) p aEndOffset
$2 = -1
(gdb) p* frag
$3 = {{m2b = 0x8accb20, m1b = 0x8accb20 "planetoid Darwin 5.1 Depend"}, {mAllBits = 217, mState = {mInHeap = -1, mIs2b = 0, mIsBidi = 0,
      mLength = 27}}}
(gdb) p length
$4 = 0
I do not see this on Windows or Mac, only on Linux. I'll change the OS to Linux
because it is more common than FreeBSD.

Btw, you do not need to do this in the sidebar, it is enough to open the URL as
normal and then select some text.
OS: FreeBSD → Linux

Comment 2

17 years ago
I sometimes see this on Windows.
I have to wonder: why do we use XMLContentSerializer when you select (and copy)
HTML content?
Heikki:
http://lxr.mozilla.org/seamonkey/source/content/base/src/nsHTMLContentSerializer.h#49.

See also bug 119335. Seems some of the string stuff in the
nsXMLContentSerializer is bad.

*** This bug has been marked as a duplicate of 119335 ***
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → DUPLICATE
(Reporter)

Comment 6

17 years ago
vrfy dupe
Status: RESOLVED → VERIFIED
(Reporter)

Updated

17 years ago
Keywords: assertion
You need to log in before you can comment on or make changes to this bug.