getProperties() error ?

From: Marc Maurer <j.m.maurer_at_student.utwente.nl>
Date: Sat Jul 10 2004 - 23:09:18 CEST

I'm totally stuck here...

Martin or Tomas, could you help me out?

Testcase:

Start Abi, and set the number of columns to 2. Nothing more. Now, when I
do (somewhere in the code, doesn't really matter):

        const PP_AttrProp* pAP = NULL;
        PP_RevisionAttr* pRevisions = NULL;
        bool bShowRevisions = false;
        UT_uint32 iId =
static_cast<FV_View*>(pLayout->getDocLayout()->getAvView())->getRevisionLevel();
        bool bHiddenRevision = false;
        
        pLayout->getAttrProp(&pAP, pRevisions, bShowRevisions, iId,
bHiddenRevision);
        DELETEP(pRevisions); // we don't need it
        UT_return_if_fail(pAP);

        const XML_Char ** attribs = pAP->getAttributes();
        const XML_Char ** props = pAP->getProperties();
        props = pAP->getProperties();
        props = pAP->getProperties(); // and again
        props = pAP->getProperties(); // and again
        props = pAP->getProperties(); // and again
        props = pAP->getProperties(); // and again
        props = pAP->getProperties(); // and again
        props = pAP->getProperties(); // and again
        props = pAP->getProperties(); // and again

AbiWord always crashes. Valgrind complains the second time
pAP->getProperties() is called, complaining about:

pp_AttrProp::getProperties, line 452:

  pList[i] = pP->first();

==9603== Invalid read of size 4
==9603== at 0x83D1322: UT_Pair<char const*, PP_PropertyType
const*>::first() const (ut_pair.h:44)

Of course, this error is not only visible when "setting the number of
columns to 2"; any property-setting option will work.

Please, have you guys _any_ idea? This totally sucks, and I'm stuck with
it for days now :-/

  Marc
Received on Sat Jul 10 22:56:32 2004

This archive was generated by hypermail 2.1.8 : Sat Jul 10 2004 - 22:56:33 CEST