| Summary: | kword crashes when trying to open a file | ||
|---|---|---|---|
| Product: | [Unmaintained] kword | Reporter: | turbidostato <jmnavarrol> |
| Component: | general | Assignee: | Thomas Zander <zander> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Debian testing | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | the offending crashing file | ||
|
Description
turbidostato
2005-04-23 18:52:53 UTC
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 ) |