Segfault opening footer.abw


Subject: Segfault opening footer.abw
From: Matt Brubeck (mbrubeck@hmc.edu)
Date: Sun Nov 12 2000 - 04:05:27 CST


I get a segfault when I try to open test/wp/footer.abw. This happens
under Windows and Linux.

fl_BlockLayout::getNewLine() is trying to get a Container from a
HdrFtrSectionLayout. The relevant functions in fl_HdrFtrSectionLayout
simply assert and return NULL whenever they are called. The code doesn't
check for this, and tries to use the NULL pointer.

I tried to fix it, but don't know the code well enough (yet). I filed
bug #1053: http://www.abisource.com/bugzilla/show_bug.cgi?id=1053

Here is the output and backtrace. Have fun!

**** (1) Assert ****
**** (1) UT_SHOULD_NOT_HAPPEN at fl_SectionLayout.cpp:1441 ****
**** (1) Continue ? (y/n) [y] :

**** (2) Assert ****
**** (2) UT_SHOULD_NOT_HAPPEN at fl_SectionLayout.cpp:1455 ****
**** (2) Continue ? (y/n) [y] :

Program received signal SIGSEGV, Segmentation fault.
UT_Vector::insertItemAt (this=0x28, p=0x104e78c0, ndx=0) at
ut_vector.cpp:109
109 if (ndx > m_iCount + 1)

#0 UT_Vector::insertItemAt (this=0x28, p=0x104e78c0, ndx=0)
    at ut_vector.cpp:109
#1 0x101a0c64 in fp_Container::insertLine (this=0x0, pNewLine=0x104e78c0)
    at fp_Column.cpp:151
#2 0x10186d48 in fl_BlockLayout::getNewLine (this=0x104e7698)
    at fl_BlockLayout.cpp:1166
#3 0x1018617c in fl_BlockLayout::_insertFakeTextRun (this=0x104e7698)
    at fl_BlockLayout.cpp:896
#4 0x101868b0 in fl_BlockLayout::format (this=0x104e7698)
    at fl_BlockLayout.cpp:1052
#5 0x10196448 in fl_DocListener::populate (this=0x104b3cc0,
    sfh=0x104e7698, pcr=0x104b4120) at fl_DocListener.cpp:97
#6 0x101ca3bc in pt_PieceTable::_tellAndMaybeAddListener
    (this=0x104a2ef0, pListener=0x104b3cc0, listenerId=0, bAdd=1
    '\001') at pt_PT_Listener.cpp:77
#7 0x101ca234 in pt_PieceTable::addListener (this=0x104a2ef0,
    pListener=0x104b3cc0, listenerId=0) at pt_PT_Listener.cpp:53
#8 0x101b8894 in PD_Document::addListener (this=0x104a2628,
    pListener=0x104b3cc0, pListenerId=0x104b3750) at pd_Document.cpp:423
#9 0x1019289c in FL_DocLayout::FL_DocLayout (this=0x104b3740,
    doc=0x104a2628, pG=0x104b5cf8) at fl_DocLayout.cpp:84
#10 0x1009d918 in AP_UnixFrame::_showDocument (this=0x10443f08, iZoom=100)
    at ap_UnixFrame.cpp:103
#11 0x1009f714 in AP_UnixFrame::loadDocument (this=0x10443f08,
    szFilename=0x7ffffdbc "test/wp/footer.abw", ieft=0) at
    ap_UnixFrame.cpp:518



This archive was generated by hypermail 2b25 : Sun Nov 12 2000 - 04:05:35 CST