Re: Win32 Crash on Backspace


Subject: Re: Win32 Crash on Backspace
From: Joaquín Cuenca Abela (cuenca@pacaterie.u-psud.fr)
Date: Sat Jul 07 2001 - 03:54:33 CDT


On 06 Jul 2001 23:05:31 -0500, Michael D. Pritchett wrote:
> Memory leaks for Win32 are evaporating. I am seeing a few complaints at
> pp_Property.cpp(450) for the MSVC stuff. This is much better than
> it was previously, and I thank all that have worked on reducing those
> pesky memory bugs to date.
>
> Just a quick note on the crash. The lastest Win32 build crashes at
> pf_Fragments.cpp at Line 194 with an assertion failure claiming
> !areFragsDirty() when I type a character and then backspace.

interesting... so after all, we were using this method without having
all the frags clean

Just change

UT_ASSERT(!areFragsDirty())

by

if (areFragsDirty())
    cleanFragsConst();

PS: Can we erase "void cleanFragsConst() const" and the utility method
that is just above this one, make pf_Fragments::m_vecFrags,
pf_Fragments::m_pLastFragClean & pf_Frag::m_docPos mutable and turn
"void pf_Fragments::cleanFrags(pf_Frag*)" & "void
pf_Frags::setPos(PT_DocPosition)" into const method's, please (all these
variables are only there to cache values, so imo a change in these
variables don't change the logical state of the related objects)?

If you do that, just 's/cleanFragsConst/cleanFrags/g;' at
text/ptbl/xp/*.cpp

Cheers,

--
Joaquín Cuenca Abela
cuenca@celium.net



This archive was generated by hypermail 2b25 : Sat Jul 07 2001 - 03:54:13 CDT