Summary: | Inline table + Style manager crashes kword | ||
---|---|---|---|
Product: | [Unmaintained] kword | Reporter: | lasse |
Component: | tables | Assignee: | Thomas Zander <zander> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | faure, nicolasg |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | With this file, trying to add a table kword fails |
Description
lasse
2002-08-11 07:21:00 UTC
This bug is verified in KOFFICE_1_2_BRANCH. It does not matter what kind of text precedes the table or the tables styl= e.=20 Nor do the columns or the font size have a bearing on this bug. It also doe= s=20 not matter if the table is inline or not. What appears to trigger the bug i= s=20 when the table is long enough to span two pages. I tested this in both=20 Landscape and Portrait orientation. In both cases the bug is triggered when= =20 the table is long enough to spill over onto the next page. Here is the=20 Konsole output I captured (Koffice compiled with --enable-debug=3Dfull). In= =20 this case the table was 36 rows long and inline: kotext: KoStyleManager::updateGUI m_currentStyle=3D0x85aa350 New Style Temp= late=20 (8) //Created new style here kotext: KoStyleManager::renameStyle 8 to New Style Template (8) kotext: KoStyleManager::renameStyle before Standard kotext: KoStyleManager::renameStyle after Standard kotext: KoStyleManager::switchStyle noSignals=3Dtrue kotext: KoStyleManager::switchStyle noSignals=3Dtrue kotext: KoStyleManager::updateGUI updating combo to Standard kotext: found at 0 kotext: update style Standard (0) kword: 0x83dbde8 KWAnchor::finalize 00 paragx=3D0 paragy=3D34067 kword (tables): KWTableFrameSet::moveBy(00) kword (formatting): KWTextFrameSet::frameResized 0x83ed638 [281724.09=20 269.5x22] invalidateLayout=3Dfalse kword (tables): KWTableFrameSet::recalcRows (00) kword (tables): KWTableFrameSet::recalcRows done kword (formatting): KWTextFrameSet::frameResized 0x83ec9f8 [297.51724.09= =20 269.5x22] invalidateLayout=3Dfalse kword: KWAnchor::resize 11678x22151 kword: KWAnchor::resize invalidating parag 2 kword (tables): KWTableFrameSet::recalcRows (10) kword (tables): moving 1746.09 by -2; to 1744.09 kword (tables): moving 1768.09 by -2; to 1766.09 kword (tables): moving 1790.09 by -2; to 1788.09 kword (tables): moving 1812.09 by -2; to 1810.09 <SNIP -- lines omitted> kword (formatting): KWTextFrameSet::frameResized 0x83f24f8 [281744.09=20 269.5x22] invalidateLayout=3Dfalse kword (tables): KWTableFrameSet::recalcRows (01) kword (tables): KWTableFrameSet::recalcRows done kword (formatting): KWTextFrameSet::frameResized 0x83efcb8 [297.51744.09= =20 269.5x22] invalidateLayout=3Dfalse kword: KWAnchor::resize 11678x25161 kword: KWAnchor::resize invalidating parag 2 kword (tables): KWTableFrameSet::recalcRows (11) kword (tables): moving 1766.09 by -2; to 1764.09 kword (tables): moving 1788.09 by -2; to 1786.09 kword (tables): moving 1810.09 by -2; to 1808.09 <SNIP -- This pattern is repeated until I killed Kword> I then ran Kword in gdb and killed it with ALT-CTRL-ESC and got a truly lar= ge=20 backtrace. Here is a portion of it: (gdb) where #0 0x415da344 in write () from /lib/libc.so.6 #1 0x4144165c in __DTOR_END__ () from /lib/libpthread.so.0 #2 0x41395fd1 in _X11TransSocketWrite () from /usr/X11R6/lib/libX11.so.6 #3 0x41396c9d in _X11TransWrite () from /usr/X11R6/lib/libX11.so.6 #4 0x4137a09e in _XFlushInt () from /usr/X11R6/lib/libX11.so.6 #5 0x41379f9c in _XFlush () from /usr/X11R6/lib/libX11.so.6 #6 0x40673499 in XRenderChangePicture () from /usr/X11R6/lib/libXrender.so= .1 #7 0x40b1954b in QPainter::end (this=3D0xbfffd6f0) at=20 kernel/qpainter_x11.cpp:1251 #8 0x40bad943 in QPainter::~QPainter (this=3D0xbfffd6f0 __in_chrg=3D2) at= =20 kernel/qpainter.cpp:534 #9 0x4183a8e6 in KWCanvas::repaintChanged (this=3D0x8268be0 fs=3D0x81baf6= 0=20 resetChanged=3Dtrue) at kwcanvas.cc:172 #10 0x4186c6e7 in KWDocument::slotRepaintChanged (this=3D0x8105638=20 frameset=3D0x81baf60) at kwdoc.cc:3535 #11 0x4186b29c in KWDocument::slotRepaintVariable (this=3D0x8105638) at=20 kwdoc.cc:3350 #12 0x4186b1f6 in KWDocument::recalcVariables (this=3D0x8105638 type=3D4) = at=20 kwdoc.cc:3317 #13 0x4186924f in KWDocument::appendPage (this=3D0x8105638) at kwdoc.cc:2803 #14 0x418be1ba in KWTableFrameSet::recalcRows (this=3D0x8316718 _col=3D0= =20 _row=3D19) at kwtableframeset.cc:524 #15 0x418b315f in KWTextFrameSet::frameResized (this=3D0x8360dd8=20 theFrame=3D0x83657f0 invalidateLayout=3Dfalse) at kwtextframeset.cc:2171 #16 0x418b2a26 in KWTextFrameSet::slotAfterFormatting (this=3D0x8360dd8=20 bottom=3D320 lastFormatted=3D0x0 abort=3D0xbfffde5f) at kwtextframeset.cc:2089 #17 0x418bb487 in KWTextFrameSet::qt_invoke (this=3D0x8360dd8 _id=3D3=20 _o=3D0xbfffddd8) at kwtextframeset.moc:147 #18 0x40bab2d2 in QObject::activate_signal (this=3D0x8361d88 clist=3D0x836= 1648=20 o=3D0xbfffddd8) at kernel/qobject.cpp:2080 #19 0x41ae0720 in KoTextObject::afterFormatting (this=3D0x8361d88 t0=3D320= =20 t1=3D0x0 t2=3D0xbfffde5f) at kotextobject.moc:208 #20 0x41add4c9 in KoTextObject::formatMore (this=3D0x8361d88 count=3D2=20 emitAfterFormatting=3Dtrue) at kotextobject.cc:1668 #21 0x41ad9b8f in KoTextObject::applyStyleChange (this=3D0x8361d88=20 changedStyle=3D0x8186888 paragLayoutChanged=3D1 formatChanged=3D0) ---Type <return> to continue or q <return> to quit--- at kotextobject.cc:892 #22 0x418b4d9f in KWTextFrameSet::applyStyleChange (this=3D0x8360dd8=20 changedStyle=3D0x8186888 paragLayoutChanged=3D1 formatChanged=3D0) at kwtextframeset.cc:2511 KDE Version 1.2.94 (KDE 3.1.93 (CVS >= 20031111), compiled sources) Operating System FreeBSD (i386) release 4.9-RELEASE Compiler gcc version 2.95.4 20020320 [FreeBSD] This bug persists and still causes multiple pages to be generated. To reproduce: 1) hit enter about 5 times. 2) insert a table that has a leat 36 rows. The table will run onto the next page. 3) When this happens, kword will begin creating hundreds of additional pages. Did as J E Drews with cvs head from 20040105. It stops at 300 pages for me. Kword behaves nice (responcive) but the rendering of the tablecells is wrong /non existant. Cheers Jo *** Bug 48017 has been marked as a duplicate of this bug. *** While the multipage table feature is not wonderful or even good it does not crash anymore. Created attachment 14995 [details]
With this file, trying to add a table kword fails
The issue is not solved, with kword 1.4.2 it occurs at least whith this file.
SVN commit 516592 by dfaure: The infinite-loop-prevention didn't work when the paragraph was the last one of the document, due to lastFormatted==0. CCMAIL: rafael.ontivero@gmail.com, 46343@bugs.kde.org M +3 -2 KWTextFrameSet.cpp --- trunk/koffice/kword/KWTextFrameSet.cpp #516591:516592 @@ -2342,8 +2342,9 @@ // "difference" doesn't apply if we're pasting multiple paragraphs. // We want to compare the height of one paragraph, not all the missing height. - int paragHeight = lastFormatted ? lastFormatted->rect().height() : 0; - kdDebug(32002) << "height we will get in the new page:" << heightWeWillGet << " parag height:" << paragHeight << endl; + KoTextParag* parag = lastFormatted ? lastFormatted : textDocument()->lastParag(); + int paragHeight = parag->rect().height(); + kdDebug(32002) << "height we will get in the new page:" << heightWeWillGet << " parag " << parag << " height:" << paragHeight << endl; if ( heightWeWillGet < paragHeight && !m_groupmanager ) { kdDebug(32002) << "not enough height on the new page, not worth it" << endl; |