KDE Bug Tracking System
Home
Report New Wish or Bug
Query Existing Reports
First
Last
Prev
Next
No search results available
Search page
Bug
127405
:
DOM tree viewer crashes when opened for the sec...
P
roduct
:
konqueror
Co
m
ponent
:
khtml
Status
:
RESOLVED
Resolution
:
FIXED
Target
:
---
Version
:
unspecified
Pr
i
ority
:
NOR
Severity
:
crash
V
otes
:
0
Description
:
Opened:
2006-05-16 00:51
Last Changed:
2006-05-17 14:17:41
Version: (using KDE KDE 3.5.2) Installed from: Gentoo Packages Compiler: gcc version 4.0.3 (Gentoo 4.0.3, pie-8.7.8) OS: Linux Open any webpage, and open the DOM tree viewer. Without closing it, try to open it again. If it didn't crash yet, do it again. (Third time should be enough). Stack trace: #6 0x43a4ec75 in QObject::disconnect () from /usr/qt/3/lib/libqt-mt.so.3 #7 0x43a19d0b in QGuardedPtrPrivate::reconnect () from /usr/qt/3/lib/libqt-mt.so.3 #8 0xb6d3d44e in PluginDomtreeviewer::slotShowDOMTree () from /usr/kde/3.5/lib/kde3/libdomtreeviewerplugin.so #9 0xb6d3d4da in PluginDomtreeviewer::qt_invoke () from /usr/kde/3.5/lib/kde3/libdomtreeviewerplugin.so #10 0x43a4da39 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3 #11 0x43a4ded4 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3 #12 0xb7a51fc9 in KAction::activated () from /usr/kde/3.5/lib/libkdeui.so.4 #13 0xb7a8b5e2 in KAction::slotActivated () from /usr/kde/3.5/lib/libkdeui.so.4 #14 0xb7a8b57c in KAction::slotButtonClicked () from /usr/kde/3.5/lib/libkdeui.so.4 #15 0xb7aaa104 in KAction::qt_invoke () from /usr/kde/3.5/lib/libkdeui.so.4 #16 0x43a4da39 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3 #17 0xb7a93087 in KToolBarButton::buttonClicked () from /usr/kde/3.5/lib/libkdeui.so.4 #18 0xb7a93245 in KToolBarButton::mouseReleaseEvent () from /usr/kde/3.5/lib/libkdeui.so.4 #19 0x43a87010 in QWidget::event () from /usr/qt/3/lib/libqt-mt.so.3 #20 0xb7aede01 in KToolBarButton::event () from /usr/kde/3.5/lib/libkdeui.so.4 #21 0x439ee86a in QApplication::internalNotify () from /usr/qt/3/lib/libqt-mt.so.3 #22 0x439ef7c8 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3 #23 0xb784ce82 in KApplication::notify () from /usr/kde/3.5/lib/libkdecore.so.4 #24 0x4398a639 in QETWidget::translateMouseEvent () from /usr/qt/3/lib/libqt-mt.so.3 #25 0x43989b30 in QApplication::x11ProcessEvent () from /usr/qt/3/lib/libqt-mt.so.3 #26 0x4399d8ba in QEventLoop::processEvents () from /usr/qt/3/lib/libqt-mt.so.3 #27 0x43a050c9 in QEventLoop::enterLoop () from /usr/qt/3/lib/libqt-mt.so.3 #28 0x43a04fb6 in QEventLoop::exec () from /usr/qt/3/lib/libqt-mt.so.3 #29 0x439ee1bf in QApplication::exec () from /usr/qt/3/lib/libqt-mt.so.3 #30 0x44af8c7f in kdemain () from /usr/kde/3.5/lib/libkdeinit_konqueror.so #31 0x4327287f in __libc_start_main () from /lib/libc.so.6 #32 0x08048691 in ?? ()
Comment
#1
David Faure 2006-05-17 14:17:39
SVN commit 541824 by dfaure: Found the reason why the QObject::destroyed() signal wasn't emitted when closing the window: missing if(part_manager) before disconnect(part_manager). So disconnect(0) was called and -everything- got disconnected from DOMTreeWindow. Nasty, heh? This also fixes the crash when "reopening the dialog when it's already up" BUG: 127405 CCMAIL: Christian Spiel <
e9800675@stud4.tuwien.ac.at
>, Leo Savernik <
l.savernik@aon.at
> M +13 -31 domtreewindow.cpp M +6 -8 domtreewindow.h M +2 -2 plugin_domtreeviewer.cpp M +1 -1 plugin_domtreeviewer.h --- branches/KDE/3.5/kdeaddons/konq-plugins/domtreeviewer/domtreewindow.cpp #541823:541824 @@ -57,7 +57,7 @@ DOMTreeWindow::DOMTreeWindow(PluginDomtreeviewer *plugin) : KMainWindow( 0, "DOMTreeWindow" ), - plugin(plugin), m_view(new DOMTreeView(this, "DOMTreeView", false)) + m_plugin(plugin), m_view(new DOMTreeView(this, "DOMTreeView", false)) { part_manager = 0; @@ -92,8 +92,6 @@ connect(view(), SIGNAL(htmlPartChanged(KHTMLPart *)), SLOT(slotHtmlPartChanged(KHTMLPart *))); - connect(this, SIGNAL(windowClosed()), SLOT(slotDestroyed())); - ManipulationCommand::connect(SIGNAL(error(int, const QString &)), this, SLOT(addMessage(int, const QString &))); @@ -104,7 +102,7 @@ DOMTreeWindow::~DOMTreeWindow() { - kdDebug(90180) << k_funcinfo << endl; + kdDebug(90180) << k_funcinfo << this << endl; delete m_commandHistory; delete msgdlg; delete _config; @@ -121,16 +119,16 @@ void DOMTreeWindow::setupActions() { - KStdAction::close(this, SLOT(slotClose()), actionCollection()); + KStdAction::close(this, SLOT(close()), actionCollection()); KStdAction::cut(this, SLOT(slotCut()), actionCollection())->setEnabled(false); KStdAction::copy(this, SLOT(slotCopy()), actionCollection())->setEnabled(false); KStdAction::paste(this, SLOT(slotPaste()), actionCollection())->setEnabled(false); m_commandHistory = new KCommandHistory(actionCollection()); - + KStdAction::find(this, SLOT(slotFind()), actionCollection()); - + KStdAction::redisplay(m_view, SLOT(refresh()), actionCollection()); // toggle manipulation dialog @@ -248,37 +246,20 @@ } } -void DOMTreeWindow::closeEvent(QCloseEvent *event) -{ - // HACK: call slot directly as destroyed() isn't - // emitted in QObject for some reason - plugin->slotDestroyed(); - event->accept(); -} - void DOMTreeWindow::addMessage(int msg_id, const QString &msg) { QDateTime t(QDateTime::currentDateTime()); QString fullmsg = t.toString(); fullmsg += ":"; - + if (msg_id != 0) fullmsg += " (" + QString::number(msg_id) + ") "; fullmsg += msg; - + if (msgdlg) msgdlg->addMessage(fullmsg); view()->setMessage(msg); kdWarning() << fullmsg << endl; } - -void DOMTreeWindow::slotClose() -{ - // HACK: call slot directly as destroyed() isn't - // emitted in QObject for some reason - plugin->slotDestroyed(); - deleteLater(); -} - void DOMTreeWindow::slotCut() { // TODO implement @@ -345,18 +326,19 @@ { // display the text on the caption setCaption(text); -} +} void DOMTreeWindow::slotHtmlPartChanged(KHTMLPart *p) { kdDebug(90180) << k_funcinfo << p << endl; - + if (p) { // set up manager connections - disconnect(part_manager); - + if ( part_manager ) + disconnect(part_manager); + part_manager = p->manager(); - + connect(part_manager, SIGNAL(activePartChanged(KParts::Part *)), SLOT(slotActivePartChanged(KParts::Part *))); connect(part_manager, SIGNAL(partRemoved(KParts::Part *)), --- branches/KDE/3.5/kdeaddons/konq-plugins/domtreeviewer/domtreewindow.h #541823:541824 @@ -113,7 +113,7 @@ * Returns the config object for this plugin. */ KConfig *config() const { return _config; } - + /** returns the attribute delete action */ KAction *deleteAttributeAction() const { return del_attr; } /** returns the node delete action */ @@ -126,19 +126,18 @@ * @param msg message text */ void addMessage(int id, const QString &msg); - + /** * Displays the message log window. */ void showMessageLog(); - + protected: /** * Overridden virtuals for Qt drag 'n drop (XDND) */ virtual void dragEnterEvent(QDragEnterEvent *event); virtual void dropEvent(QDropEvent *event); - virtual void closeEvent(QCloseEvent *event); protected: /** * This function is called when it is time for the app to save its @@ -155,7 +154,6 @@ private slots: - void slotClose(); void slotCut(); void slotCopy(); void slotPaste(); @@ -173,13 +171,13 @@ void slotActivePartChanged(KParts::Part *); void slotPartRemoved(KParts::Part *); void slotClosePart(); - + private: void setupAccel(); void setupActions(); private: - PluginDomtreeviewer *plugin; + PluginDomtreeviewer *m_plugin; DOMTreeView *m_view; MessageDialog *msgdlg; @@ -187,7 +185,7 @@ QPopupMenu *infopanel_ctx; QPopupMenu *domtree_ctx; KConfig *_config; - + KAction *del_tree, *del_attr; QGuardedPtr<KParts::PartManager> part_manager; --- branches/KDE/3.5/kdeaddons/konq-plugins/domtreeviewer/plugin_domtreeviewer.cpp #541823:541824 @@ -17,7 +17,7 @@ PluginDomtreeviewer::PluginDomtreeviewer( QObject* parent, const char* name, const QStringList & ) - : Plugin( parent, name ) + : Plugin( parent, name ), m_dialog( 0 ) { (void) new KAction( i18n("Show &DOM Tree"), "domtreeviewer", 0, @@ -33,7 +33,6 @@ void PluginDomtreeviewer::slotShowDOMTree() { - kdDebug(90180) << k_funcinfo << "m_dialog " << (void *)m_dialog << endl; if ( m_dialog ) { delete m_dialog; @@ -42,6 +41,7 @@ if (KHTMLPart *part = ::qt_cast<KHTMLPart *>(parent())) { m_dialog = new DOMTreeWindow(this); + connect( m_dialog, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); m_dialog->view()->setHtmlPart(part); m_dialog->show(); } --- branches/KDE/3.5/kdeaddons/konq-plugins/domtreeviewer/plugin_domtreeviewer.h #541823:541824 @@ -21,7 +21,7 @@ void slotShowDOMTree(); void slotDestroyed(); private: - QGuardedPtr<DOMTreeWindow> m_dialog; + DOMTreeWindow* m_dialog; }; #endif
P
latform
:
Gentoo Packages
O
S
:
Linux
K
eywords
:
U
RL
:
People
Reporter
:
Dima Ryazanov
Assigned To
:
Konqueror Developers
Related actions
View Bug Activity
Format For Printing
XML
Clone This Bug
Note
You need to
log in
before you can comment on or make changes to this bug.
Attachments
Add an attachment
(proposed patch, testcase, etc.)
Depends on
:
B
locks
:
Show dependency tree
-
Show dependency graph
First
Last
Prev
Next
No search results available
Search page
Actions
Reports
Requests
Reports
Bugs reported today
Bugs reported in the last 3 days
Bug reports with patches
Weekly Bug statistics
The most hated bugs
The most severe bugs
The most frequently reported bugs
The most wanted features
Junior Jobs
Report ownership counts and charts
My Account
New Account
Log In