Version: (using KDE KDE 3.3.2) Installed from: Debian testing/unstable Packages Kword 1.3.5. It crashes when trying to open a kwd file generated with that same version. Trying to open it with kword 1.3.4 or with 1.3.5 on a different computers gives the same results. Error returned is: ASSERT: "fs" in ../../kword/kwdoc.cc (2054) KCrash: Application 'kword' crashing... I unzip the kwd file and there are no signs of the kwd file being corrupted.
Created attachment 10767 [details] the offending crashing file This file is the one that makes kword 1.3.5 crash.
CVS commit by faure: Don't crash when a file has a footnote referring to a non-existing frame BUG: 104431 M +2 -0 kwdoc.cc 1.744 --- koffice/kword/kwdoc.cc #1.743:1.744 @@ -2313,4 +2313,6 @@ bool KWDocument::processFootNoteRequests KWFrameSet * fs = frameSetByName( fsname ); Q_ASSERT( fs ); + if ( !fs ) // #104431 + continue; Q_ASSERT( fs->type() == FT_TEXT ); Q_ASSERT( fs->frameSetInfo() == KWFrameSet::FI_FOOTNOTE );
Sorry, your patch doesn't work. While now you can open the file, kword crashes if you modify the document and try to save it again. Kword crashes too if you try to select all (Ctrl-A) to copy the text to a new document. It seems that kword managed to malform the document in a way it cannot cope with.
SVN commit 409282 by lueppken: Adding a nullpointer-check to fix bug #104431. BUG: 104431 M +2 -1 trunk/koffice/kword/kwvariable.cc --- trunk/koffice/kword/kwvariable.cc #409281:409282 @@ -349,7 +349,8 @@ footnoteElem.setAttribute( "notetype", m_noteType == FootNote ? "footnote" : "endnote" ); footnoteElem.setAttribute( "numberingtype", m_numberingType == Auto ? "auto" : "manual" ); Q_ASSERT( m_frameset ); - footnoteElem.setAttribute( "frameset", m_frameset->getName() ); + if( m_frameset ) + footnoteElem.setAttribute( "frameset", m_frameset->getName() ); } void KWFootNoteVariable::load( QDomElement &elem )