<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/107615/">http://git.reviewboard.kde.org/r/107615/</a>
</td>
</tr>
</table>
<br />
<p>Ship it!</p>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Sure thanks. For the record you can just commit such fixes without a request. It's quite obvious it's a bug</pre>
<br />
<p>- C.</p>
<br />
<p>On December 6th, 2012, 6:10 p.m., Friedrich W. H. Kossebau wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Calligra, Inge Wallin and C. Boemann.</div>
<div>By Friedrich W. H. Kossebau.</div>
<p style="color: grey;"><i>Updated Dec. 6, 2012, 6:10 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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?</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">No longer crashes in 2.6 on loading documents with a TOC</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>libs/kotext/opendocument/KoTextLoader.cpp <span style="color: grey">(68323f1)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/107615/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>