Bug 72775 - CRASH: printing message in draftfolder
Summary: CRASH: printing message in draftfolder
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml renderer (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 73169 73273 73325 74728 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-01-16 19:52 UTC by John van Spaandonk
Modified: 2004-03-03 00:38 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
part of my ~/.xsession_errors that shows the problem (38.04 KB, text/plain)
2004-01-16 19:54 UTC, John van Spaandonk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John van Spaandonk 2004-01-16 19:52:49 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.3.x compiled by Mandrake, I use RPMs
OS:          Linux

I select a message in the draft folder.
It does not matter wether I double click on it to
open it or not
I select print from kmail's toolbar.
print dialog pops up.
kmail crashes
consistently.

See attached part of my ~/.xsession_errors that
actually reports that kmail crashes because of an
assertion error.

John
Comment 1 John van Spaandonk 2004-01-16 19:54:00 UTC
Created attachment 4198 [details]
part of my ~/.xsession_errors that shows the problem

You can see that an assertion is triggered.
Comment 2 Thiago Macieira 2004-01-16 19:57:31 UTC
kmail: render_block.cpp:426: void khtml::RenderBlock::layoutBlock(bool): Assertion `false' failed.

Would you mind updating? I believe this code has been recently changed.
Comment 3 John van Spaandonk 2004-01-16 20:03:50 UTC
Subject: Re:  CRASH: printing message in draftfolder

On Friday 16 January 2004 19:57, Thiago Macieira wrote:
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
> You are a voter for the bug, or are watching someone who is.
>
> http://bugs.kde.org/show_bug.cgi?id=72775
> thiagom@mail.com changed:
>
>            What    |Removed                     |Added
> ---------------------------------------------------------------------------
>- AssignedTo|kmail-devel@kde.org         |konq-bugs@kde.org
> Component|general                     |khtml renderer
>             Product|kmail                       |konqueror
>
>
>
> ------- Additional Comments From thiagom@mail.com  2004-01-16 19:57 -------
> kmail: render_block.cpp:426: void khtml::RenderBlock::layoutBlock(bool):
> Assertion `false' failed.
>
> Would you mind updating? I believe this code has been recently changed.

I don't mind updating at all.

But I have to wait a few days before Mandrake builds new RPMs. For some
reason they do not build the network part as often as the base part of
KDE.
So probably I can only test this again after 3.2 is frozen...

Comment 4 Stephan Kulow 2004-01-16 20:44:27 UTC
that's very strange actually. But as a matter of fact, it's the same crash

*** This bug has been marked as a duplicate of 65715 ***
Comment 5 Ingo Klöcker 2004-01-23 00:20:22 UTC
*** Bug 73273 has been marked as a duplicate of this bug. ***
Comment 6 Stephan Kulow 2004-01-23 14:50:18 UTC
*** Bug 73325 has been marked as a duplicate of this bug. ***
Comment 7 Stephan Kulow 2004-01-25 11:14:11 UTC
the assert got nothing to do with the other one
Comment 8 Stephan Kulow 2004-01-25 11:14:46 UTC
*** Bug 73169 has been marked as a duplicate of this bug. ***
Comment 9 Dirk Mueller 2004-01-25 17:49:06 UTC
Subject: kdelibs/khtml

CVS commit by mueller: 

* rendering/render_canvas.cpp (layout): don't recurse when printing (#72775).
CCMAIL: 72775-done@bugs.kde.org


  M +2 -0      ChangeLog   1.183
  M +18 -16    rendering/render_canvas.cpp   1.145


--- kdelibs/khtml/ChangeLog  #1.182:1.183
@@ -1,4 +1,6 @@
 2004-01-25  Dirk Mueller  <mueller@kde.org>
 
+        * rendering/render_canvas.cpp (layout): don't recurse when printing (#72775).
+
         * rendering/render_image.cpp (setPixmap): handle cases when
         we're not inserted in the tree yet, but the image is already loaded

--- kdelibs/khtml/rendering/render_canvas.cpp  #1.144:1.145
@@ -141,4 +142,7 @@ void RenderCanvas::layout()
     qt.start();
 #endif
+    KHTMLView::ScrollBarMode vsmode = m_view->vScrollBarMode();
+    KHTMLView::ScrollBarMode hsmode = m_view->hScrollBarMode();
+
     if (!m_printingMode) {
         QSize s = m_view->viewportSize(m_view->contentsWidth(),
@@ -146,12 +150,4 @@ void RenderCanvas::layout()
         m_viewportWidth = m_width = s.width();
         m_viewportHeight = m_height = s.height();
-    }
-    else {
-        m_width = m_rootWidth;
-        m_height = m_rootHeight;
-    }
-    
-    KHTMLView::ScrollBarMode vsmode = m_view->vScrollBarMode();
-    KHTMLView::ScrollBarMode hsmode = m_view->hScrollBarMode();
     
     if (m_view->verticalScrollBar()->isVisible())
@@ -164,5 +160,9 @@ void RenderCanvas::layout()
     else
         m_view->setHScrollBarMode(KHTMLView::AlwaysOff);
-
+    }
+    else {
+        m_width = m_rootWidth;
+        m_height = m_rootHeight;
+    }
 
     RenderBlock::layout();
@@ -191,6 +191,8 @@ void RenderCanvas::layout()
     layer()->resize( kMax( docW,int( m_width ) ), kMax( docH,m_height ) );
 
-    m_view->setVScrollBarMode(vsmode);
+    if ( !m_printingMode ) {
     m_view->setHScrollBarMode(hsmode);
+        m_view->setVScrollBarMode(vsmode);
+    }
 
     setLayouted();


Comment 10 Jan simonson 2004-02-07 22:44:36 UTC
My kmail 3.2.0 (the release) also crashes consistently when I hit print in the print requestor. This is a linux Fedora 1 with kernel 2.6.1 and Qt 2.3.2 all compiled from source. As far as I can tell all other KDE programs prnt ok. I use CUPS 1.1.19-13 from RPM.
Comment 11 Greg Walker 2004-02-08 13:37:11 UTC
Hi All,

I too have this probelm with Kmail 1.6 & KDE 3.2 compiled from source. Printing any e-mail, HTML or plain text triggers this Assert (from .xsession-errors)

kmail: render_block.cpp:426: void khtml::RenderBlock::layoutBlock(bool): Assertion `false' failed.

QT version 3.2.1 (Source)
CUPS 1.1.14-1 (Debian binary)


Comment 12 Ingo Klöcker 2004-02-09 18:49:48 UTC
*** Bug 74728 has been marked as a duplicate of this bug. ***
Comment 13 Damir Perisa 2004-03-03 00:38:36 UTC
is there a patch or something around i can use? 

i tried the cvs-commit from Comment #9 but it will not work as patchfile ... can anyone make a patchfile from it, please?

thank you in advance, this bug is really anoying, because so, you cannot print out of kmail in any way