Re: segfault in ruler code


Subject: Re: segfault in ruler code
From: sam th (sam@bur-jud-118-039.rh.uchicago.edu)
Date: Wed Mar 08 2000 - 16:37:00 CST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 8 Mar 2000, sam th wrote:

> I just updated my nondebug copy of abiword, compiled. It segfaults on
> startup consistently.
> the stack trace is :
>
> (gdb) bt
> #0 0x809354d in AP_UnixTopRuler::setView ()
> #1 0x809f120 in AP_TopRuler::setView ()
> #2 0x8091049 in AP_UnixFrame::_showDocument ()
> #3 0x8091aae in AP_UnixFrame::loadDocument ()
> #4 0x8090a74 in AP_UnixApp::parseCommandLine ()
> #5 0x8090760 in AP_UnixApp::main ()
> #6 0x808f11d in main ()
>
Further info on this bug ...

The crash is on line 133 of ap_UnixTopRuler.cpp
That line is

        DELETEP(m_pG);
        XAP_UnixApp * app = static_cast<XAP_UnixApp
*>(m_pFrame->getApp());
        XAP_UnixFontManager * fontManager = app->getFontManager();
133-> GR_UnixGraphics * pG = new GR_UnixGraphics(m_wTopRuler->window,
fontManager);
        m_pG = pG;
        UT_ASSERT(m_pG);

This is in the function

void AP_UnixTopRuler::setView(AV_View * pView)

Which is called from line 109 in ap_TopRuler.cpp

void AP_TopRuler::setView(AV_View* pView, UT_uint32 iZoom)
{
109-> this->setView(pView);

        UT_ASSERT(m_pG);
        m_pG->setZoomPercentage(iZoom);

        m_minColumnWidth = m_pG->convertDimension("0.5in");//TODO should
this dimension be hard coded.

}

The debug stack trace is:

(gdb) bt
#0 0x80bab8c in AP_UnixTopRuler::setView (this=0x82fa4b0,
pView=0x83063a0)
    at ap_UnixTopRuler.cpp:133
#1 0x80d3b44 in AP_TopRuler::setView (this=0x82fa4b0, pView=0x83063a0,
iZoom=100)
    at ap_TopRuler.cpp:109
#2 0x80b729e in AP_UnixFrame::_showDocument (this=0x8299cd8, iZoom=100)
    at ap_UnixFrame.cpp:208
#3 0x80b81db in AP_UnixFrame::loadDocument (this=0x8299cd8,
szFilename=0x0, ieft=0)
    at ap_UnixFrame.cpp:479
#4 0x80a10c8 in AP_UnixApp::parseCommandLine (this=0x82abf30) at
ap_UnixApp.cpp:943
#5 0x80a0bb4 in AP_UnixApp::main (szAppName=0x81bc748 "AbiWord Personal",
argc=1,
    argv=0xbffffad4) at ap_UnixApp.cpp:808
#6 0x8090ecb in main (argc=1, argv=0xbffffad4) at UnixMain.cpp:24

Hope this helps someone. Then again, maybe I'll figure out what's wrong.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE4xtYNt+kM0Mq9M/wRAqGZAKCKbT0hlhHIdSjGszfBgGEOvl8aOQCguhbW
wRlkgFutNdOmHQNDBVPmtd8=
=AoMn
-----END PGP SIGNATURE-----



This archive was generated by hypermail 2b25 : Wed Mar 08 2000 - 16:37:01 CST