Review Request: remove partially disabled debug output for text ranges which can result in crashes

Commit Hook null at kde.org
Fri Dec 7 11:17:56 GMT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107615/#review23121
-----------------------------------------------------------


This review has been submitted with commit f4fa0712df2b3d283e0429956e0366e7547440f3 by Friedrich W. H. Kossebau to branch calligra/2.6.

- Commit Hook


On Dec. 6, 2012, 6:10 p.m., Friedrich W. H. Kossebau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107615/
> -----------------------------------------------------------
> 
> (Updated Dec. 6, 2012, 6:10 p.m.)
> 
> 
> Review request for Calligra, Inge Wallin and C. Boemann.
> 
> 
> Description
> -------
> 
> Commit 246bedc29d61038d167161ce242ae37c8b8b712c added a debug statement to KoTextLoader::loadBody(...) which uses the result of KoTextDocument(cursor.block().document()).textRangeManager() without checking that it exists.
> Not good e.g. in case that loadBody(...) is called before someone has set the textRangeManager, which e.g. can happen when a document with a TOC is loaded, as can be seen by this backtrace:
> 
> #5  0x00007f626bdcda58 in QHash<KoTextRange*, QHashDummyValue>::size (this=0x10) at /usr/include/QtCore/qhash.h:295
> #6  0x00007f626bdcd578 in QSet<KoTextRange*>::size (this=0x10) at /usr/include/QtCore/qset.h:75
> #7  0x00007f626bdccea4 in QSet<KoTextRange*>::toList (this=0x10) at /usr/include/QtCore/qset.h:299
> #8  0x00007f626bdcca41 in QSet<KoTextRange*>::values (this=0x10) at /usr/include/QtCore/qset.h:232
> #9  0x00007f626bdcc377 in KoTextRangeManager::textRanges (this=0x0) at /home/kossebau/Daten/Projekte/Calligra/calligra/libs/kotext/KoTextRangeManager.cpp:106
> #10 0x00007f626be6655c in KoTextLoader::loadBody (this=0x7fffac72ef10, bodyElem=..., cursor=...) at /home/kossebau/Daten/Projekte/Calligra/calligra/libs/kotext/opendocument/KoTextLoader.cpp:853
> #11 0x00007f626be7560d in KoTextLoader::loadTableOfContents (this=0x7fffac72ef10, element=..., cursor=...) at /home/kossebau/Daten/Projekte/Calligra/calligra/libs/kotext/opendocument/KoTextLoader.cpp:2686
> #12 0x00007f626be65e4b in KoTextLoader::loadBody (this=0x7fffac72ef10, bodyElem=..., cursor=...) at /home/kossebau/Daten/Projekte/Calligra/calligra/libs/kotext/opendocument/KoTextLoader.cpp:801
> #13 0x00007f6259655190 in KWOdfLoader::load (this=0x7fffac72f2b0, odfStore=...) at /home/kossebau/Daten/Projekte/Calligra/calligra/words/part/KWOdfLoader.cpp:233
> #14 0x00007f625962e1a7 in KWDocument::loadOdf (this=0x283e650, odfStore=...) at /home/kossebau/Daten/Projekte/Calligra/calligra/words/part/KWDocument.cpp:604
> 
> This is in 2.6, I see that in the master branch using the textRangeManager has been disabled already. I would propose to remove the debug statement completely, is it really still needed in the official sources?
> 
> 
> Diffs
> -----
> 
>   libs/kotext/opendocument/KoTextLoader.cpp 68323f1 
> 
> Diff: http://git.reviewboard.kde.org/r/107615/diff/
> 
> 
> Testing
> -------
> 
> No longer crashes in 2.6 on loading documents with a TOC
> 
> 
> Thanks,
> 
> Friedrich W. H. Kossebau
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20121207/58d050b8/attachment.htm>


More information about the calligra-devel mailing list