Bug 144940

Summary: Crash on konqueror when having the printing dialog open in about:konqueror and changing to an html page
Product: [Applications] konqueror Reporter: Albert Astals Cid <aacid>
Component: khtml printingAssignee: Allan Sandfeld <kde>
Status: RESOLVED FIXED    
Severity: crash CC: dront78, finex
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Albert Astals Cid 2007-05-02 00:03:36 UTC
Version:           3.5.6 (using KDE 3.5.6, Kubuntu (feisty) 4:3.5.6-0ubuntu14)
Compiler:          Target: x86_64-linux-gnu
OS:                Linux (x86_64) release 2.6.20-15-generic

* Open a konqueror
 * Go to about:konqueror
 * Go to some webpage that takes time to load
 * Very QUICKLY type ctrl+p to get up the print dialog
 * konqueror crashes on page load

Valgrind info

==27889== Invalid read of size 4
==27889==    at 0x51DE102: QDialog::result() const (qdialog.h:66)
==27889==    by 0x8075E4A: QDialog::exec() (in /usr/lib/libqt-mt.so.3.3.7)
==27889==    by 0x108F8CAE: KPrinter::setup(QWidget*, QString const&, bool) (kprinter.cpp:234)
==27889==    by 0xFB901FA: KHTMLView::print(bool) (khtmlview.cpp:2749)
==27889==    by 0xFB91257: KHTMLView::print() (khtmlview.cpp:2735)
==27889==    by 0xFBED693: KHTMLPartBrowserExtension::print() (khtml_ext.cpp:382)
==27889==    by 0xFBEE252: KHTMLPartBrowserExtension::qt_invoke(int, QUObject*) (khtml_ext.moc:132)
==27889==    by 0x7ECFCE1: QObject::activate_signal(QConnectionList*, QUObject*) (in /usr/lib/libqt-mt.so.3.3.7)
==27889==    by 0x7ED087B: QObject::activate_signal(int) (in /usr/lib/libqt-mt.so.3.3.7)
==27889==    by 0x61F9671: KAction::activated() (kaction.moc:176)
==27889==    by 0x61F9D94: KAction::slotActivated() (kaction.cpp:1102)
==27889==    by 0x61FA358: KAction::qt_invoke(int, QUObject*) (kaction.moc:218)
==27889==  Address 0xD557CB8 is 200 bytes inside a block of size 240 free'd
==27889==    at 0x4C20390: operator delete(void*) (vg_replace_malloc.c:244)
==27889==    by 0x108EF313: KPrintDialog::~KPrintDialog() (kprintdialog.cpp:455)
==27889==    by 0x7F0A2C5: QWidget::~QWidget() (in /usr/lib/libqt-mt.so.3.3.7)
==27889==    by 0x52123A6: QFrame::~QFrame() (qframe.h:48)
==27889==    by 0x7FFECDE: QScrollView::~QScrollView() (in /usr/lib/libqt-mt.so.3.3.7)
==27889==    by 0xFB9970F: KHTMLView::~KHTMLView() (khtmlview.cpp:521)
==27889==    by 0x5475C0A: KParts::Part::~Part() (part.cpp:159)
==27889==    by 0x5475F10: KParts::ReadOnlyPart::~ReadOnlyPart() (part.cpp:314)
==27889==    by 0xFBCE79F: KHTMLPart::~KHTMLPart() (khtml_part.cpp:524)
==27889==    by 0xF6BAC38: KonqAboutPage::~KonqAboutPage() (konq_aboutpage.cc:421)
==27889==    by 0x4ECD6F9: KonqView::switchView(KonqViewFactory&) (konq_view.cc:253)
==27889==    by 0x4ECE102: KonqView::changeViewMode(QString const&, QString const&, bool) (konq_view.cc:356)

Or we could just ban print on the about:konqueror page as it makes no sense imho :D
Comment 1 fireboot 2008-02-16 18:26:37 UTC
Hi,

I'm running Gentoo, with KDE/Konqueror 3.5.8, and kernel 2.6.20-x86 and i can confirm this trouble.

Comment 2 FiNeX 2008-04-21 00:22:59 UTC
Cannot confirm on konqueror 4 trunk.
Comment 3 Albert Astals Cid 2008-04-21 20:10:46 UTC
You are not fast enough. I can confirm the crash on trunk
Comment 4 James Spahlinger 2008-04-25 10:06:34 UTC
Yeah this is reproducible in 4.0.3. Modified steps to make this *really* easy to reproduce:

* Open a konqueror
 * Go to about:konqueror 
 * Go to http://www.electricminds.org/venice/conf/posts.js.vs?cc=2&conf=16&top=22&p1=0&p2=-1 (this is a really really long web page, long enough that time won't be an issue).
 * Type CTRL + P (to open the print dialog).
 * Watch konq crash!
Comment 5 FiNeX 2008-05-05 10:56:39 UTC
Crashes even to me :-(
Comment 6 Frank Reininghaus 2008-10-15 23:08:48 UTC
*** Bug 170969 has been marked as a duplicate of this bug. ***
Comment 7 Frank Osterfeld 2008-10-19 22:53:54 UTC
SVN commit 873634 by osterfeld:

Don't crash when the khtmlview is deleted while a print dialog is open
BUG:144940


 M  +19 -6     khtmlview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=873634
Comment 8 Frank Osterfeld 2008-10-19 22:55:00 UTC
SVN commit 873635 by osterfeld:

backport: don't crash when the khtmlpart is deleted while a print dialog is open
CCBUG:144940


 M  +19 -6     khtmlview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=873635