Bug 74844 - Crash when creating a new tab in konqueror while viewing an svg document
Summary: Crash when creating a new tab in konqueror while viewing an svg document
Status: RESOLVED FIXED
Alias: None
Product: ksvg
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Nikolas Zimmermann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-10 16:58 UTC by Hamish Rodda
Modified: 2004-02-13 15:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hamish Rodda 2004-02-10 16:58:46 UTC
Version:            (using KDE KDE 3.2.0)
Installed from:    Compiled From Sources
Compiler:          gcc 3.3 
OS:          Linux

When viewing any plain .svg file (not embedded), konqueror crashes when pressing ctrl+shift+n (new tab), with the following backtrace:

[New Thread 1102806176 (LWP 19408)]
0x413843ee in __waitpid_nocancel () from /lib/tls/libpthread.so.0
#0  0x413843ee in __waitpid_nocancel () from /lib/tls/libpthread.so.0
#1  0x4078216e in KCrash::defaultCrashHandler(int) ()
   from /opt/kde/lib/libkdecore.so.4
#2  <signal handler called>
#3  0x42d7f0b5 in KSVG::SVGDocumentImpl::rootElement() const ()
   from /opt/kde/lib/libksvg.so.0
#4  0x41d375d7 in KonqView::switchView(KonqViewFactory&) ()
   from /opt/kde/lib/libkdeinit_konqueror.so
#5  0x41d37b0b in KonqView::changeViewMode(QString const&, QString const&, bool) () from /opt/kde/lib/libkdeinit_konqueror.so
#6  0x41d70b51 in KonqMainWindow::openView(QString, KURL const&, KonqView*, KonqOpenURLRequest) () from /opt/kde/lib/libkdeinit_konqueror.so
#7  0x41d6edce in KonqMainWindow::openURL(KonqView*, KURL const&, QString const&, KonqOpenURLRequest, bool) () from /opt/kde/lib/libkdeinit_konqueror.so
#8  0x41d7e077 in KonqMainWindow::slotAddTab() ()
   from /opt/kde/lib/libkdeinit_konqueror.so
#9  0x41d93471 in KonqMainWindow::qt_invoke(int, QUObject*) ()
   from /opt/kde/lib/libkdeinit_konqueror.so
#10 0x40bfd5ce in QObject::activate_signal(QConnectionList*, QUObject*) (
    this=0x830bc88, clist=0x830bf80, o=0xbfffe5b0) at kernel/qobject.cpp:2333
#11 0x40bfd426 in QObject::activate_signal(int) (this=0x830bc88, signal=4)
    at kernel/qobject.cpp:2302
#12 0x40fcd107 in QButton::clicked() (this=0x830bc88)
    at .moc/debug-shared-mt/moc_qbutton.cpp:152
#13 0x40ca8fe1 in QButton::mouseReleaseEvent(QMouseEvent*) (this=0x830bc88, 
    e=0xbfffea00) at widgets/qbutton.cpp:820
#14 0x40c3f9dd in QWidget::event(QEvent*) (this=0x830bc88, e=0xbfffea00)
    at kernel/qwidget.cpp:4426
#15 0x40b8d0bb in QApplication::internalNotify(QObject*, QEvent*) (
    this=0xbffff1e0, receiver=0x830bc88, e=0xbfffea00)
    at kernel/qapplication.cpp:2582
#16 0x40b8c832 in QApplication::notify(QObject*, QEvent*) (this=0xbffff1e0, 
    receiver=0x830bc88, e=0xbfffea00) at kernel/qapplication.cpp:2368
#17 0x406e0964 in KApplication::notify(QObject*, QEvent*) ()
   from /opt/kde/lib/libkdecore.so.4
#18 0x40b16bf4 in QApplication::sendSpontaneousEvent(QObject*, QEvent*) (
    receiver=0x830bc88, event=0xbfffea00) at qapplication.h:495
#19 0x40b0f7b2 in QETWidget::translateMouseEvent(_XEvent const*) (
    this=0x830bc88, event=0xbfffed60) at kernel/qapplication_x11.cpp:4351
#20 0x40b0d1c2 in QApplication::x11ProcessEvent(_XEvent*) (this=0xbffff1e0, 
    event=0xbfffed60) at kernel/qapplication_x11.cpp:3529
#21 0x40b29a11 in QEventLoop::processEvents(unsigned) (this=0x808bd50, flags=4)
    at kernel/qeventloop_x11.cpp:192
#22 0x40ba65dd in QEventLoop::enterLoop() (this=0x808bd50)
    at kernel/qeventloop.cpp:198
#23 0x40ba64f6 in QEventLoop::exec() (this=0x808bd50)
    at kernel/qeventloop.cpp:145
#24 0x40b8d25d in QApplication::exec() (this=0xbffff1e0)
    at kernel/qapplication.cpp:2705
#25 0x41d231bd in kdemain () from /opt/kde/lib/libkdeinit_konqueror.so
#26 0x0804d039 in launch(int, char const*, char const*, char const*, int, char const*, bool, char const*, bool, char const*) ()
#27 0x0804e711 in handle_launcher_request(int) ()
#28 0x0804ed2a in handle_requests(int) ()
#29 0x0804fe8c in main ()

Cheers,
Hamish.
Comment 1 Adrian Page 2004-02-13 15:01:00 UTC
CVS commit by page: 

Prevent null pointer dereference crash. Could occur when viewing an svg file and creating a new tab in konqueror.

CCMAIL: 74844-done@bugs.kde.org


  M +1 -1      ksvg_plugin.cpp   1.112


--- kdegraphics/ksvg/plugin/ksvg_plugin.cpp  #1.111:1.112
@@ -149,5 +149,5 @@ KSVGPlugin::~KSVGPlugin()
         kdDebug(26003) << "KSVGPlugin::~KSVGPlugin" << endl;
 
-        if(ksvgd->doc->rootElement())
+        if(ksvgd->doc && ksvgd->doc->rootElement())
                 ksvgd->doc->rootElement()->pauseAnimations();