Bug 196387 - ' in URLs crashes konversation when opening them
Summary: ' in URLs crashes konversation when opening them
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks: 187307
  Show dependency treegraph
 
Reported: 2009-06-13 21:09 UTC by Christian (Fuchs)
Modified: 2009-06-15 23:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Better backtrace (11.00 KB, text/plain)
2009-06-14 16:15 UTC, Eike Hein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian (Fuchs) 2009-06-13 21:09:17 UTC
Version:           Version 1.2-alpha3+ #3409 (using KDE 4.2.4)
Compiler:          gcc 
OS:                Linux
Installed from:    Compiled From Sources

A user reported in #konversation that it crashes when opening URLs containing ' characters. 

[Saturday 13 June 2009] [21.01:13] <Nick> Dunno if this has been fixed in later revisions of Konversation, but when I click links with ' in them, Konversation crashes.
[Saturday 13 June 2009] [21.01:51] <Nick> http://www.test.com/test'test.test

I was able to reproduce the crash, unfortunately without an usable backtrace (will try to add one later on) 

This happened with todays konversation svn build on KDE 4.2.4 / QT 4.5.1, KDE is configured to use  firefox  to open URLs.
Comment 1 Eike Hein 2009-06-14 15:24:46 UTC
I can't reproduce this with Konversation SVN revision 981845 running either KDE 4.2.4 or a somewhat old trunk (i.e. KDE 4.3) checkout (SVN revision 975675), neither with Konqueror nor with Firefox, so a backtrace would be appreciated.
Comment 2 Christian (Fuchs) 2009-06-14 16:07:45 UTC
There you go: 


*******
*******

Anwendung: Konversation (konversation), Signal SIGSEGV
0x00007fa934059aa1 in nanosleep () from /lib/libc.so.6
[Current thread is 0 (LWP 21699)]

Thread 6 (Thread 0x4142b950 (LWP 21700)):
#0  0x00007fa93522cc2d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fa9232994cb in ?? () from /usr/lib64/libxine.so.1
#2  0x00007fa935228087 in start_thread () from /lib/libpthread.so.0
#3  0x00007fa934086ccd in clone () from /lib/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x41c2c950 (LWP 21701)):
#0  0x00007fa93407ebb6 in poll () from /lib/libc.so.6
#1  0x00007fa930e51cf7 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007fa930e521c8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007fa935576db7 in QEventDispatcherGlib::processEvents () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007fa93555467b in QEventLoop::processEvents () from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007fa9355547d8 in QEventLoop::exec () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007fa9354941b0 in QThread::exec () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007fa9234ed240 in ?? () from /usr/kde/4.2/lib64/kde4/plugins/phonon_backend/phonon_xine.so
#8  0x00007fa935496752 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007fa935228087 in start_thread () from /lib/libpthread.so.0
#10 0x00007fa934086ccd in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x4242d950 (LWP 21704)):
#0  0x00007fa9239519d7 in snd_ctl_read () from /usr/lib/libasound.so.2
#1  0x00007fa92394f2e1 in snd_hctl_handle_events () from /usr/lib/libasound.so.2
#2  0x00007fa923957925 in snd_mixer_handle_events () from /usr/lib/libasound.so.2
#3  0x00007fa91e4d88c5 in ?? () from /usr/lib64/xine/plugins/1.26/xineplug_ao_out_alsa.so
#4  0x00007fa935228087 in start_thread () from /lib/libpthread.so.0
#5  0x00007fa934086ccd in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x42c2e950 (LWP 21705)):
#0  0x00007fa93522c9a9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fa9232a5f05 in ?? () from /usr/lib64/libxine.so.1
#2  0x00007fa9232a6ce0 in ?? () from /usr/lib64/libxine.so.1
#3  0x00007fa935228087 in start_thread () from /lib/libpthread.so.0
#4  0x00007fa934086ccd in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x4342f950 (LWP 21712)):
#0  0x00007fa93522c9a9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fa935496f31 in QWaitCondition::wait () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007fa9369c79af in ?? () from /usr/lib64/qt4/libQtNetwork.so.4
#3  0x00007fa935496752 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007fa935228087 in start_thread () from /lib/libpthread.so.0
#5  0x00007fa934086ccd in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fa938f16760 (LWP 21699)):
[KCrash Handler]
#5  0x00007fa935b6137b in KProcess::startDetached () from /usr/kde/4.2/lib64/libkdecore.so.5
#6  0x000000000052f1cf in IRCView::openLink (this=<value optimized out>, url=<value optimized out>) at  konversation/src/viewer/ircview.cpp:1067
#7  0x000000000052f3d3 in IRCView::anchorClicked (this=0x1018290, url=<value optimized out>) at  konversation/src/viewer/ircview.cpp:1034
#8  0x000000000043bc5e in IRCView::qt_metacall (this=0x1018290, _c=QMetaObject::InvokeMetaMethod, _id=49, _a=0x7fff41080e60)
    at  konversation/build/src/moc_ircview.cpp:186
#9  0x00007fa9355648b5 in QMetaObject::activate () from /usr/lib64/qt4/libQtCore.so.4
#10 0x00007fa934ce62ed in QTextBrowser::anchorClicked () from /usr/lib64/qt4/libQtGui.so.4
#11 0x00007fa934ce77e4 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#12 0x00007fa934ce7aaa in QTextBrowser::qt_metacall () from /usr/lib64/qt4/libQtGui.so.4
#13 0x00007fa93641a075 in KTextBrowser::qt_metacall () from /usr/kde/4.2/lib64/libkdeui.so.5
#14 0x000000000043bbe5 in IRCView::qt_metacall (this=0x10043e8, _c=8907992, _id=16794576, _a=0x0) at  konversation/build/src/moc_ircview.cpp:142
#15 0x00007fa9355648b5 in QMetaObject::activate () from /usr/lib64/qt4/libQtCore.so.4
#16 0x00007fa934af863b in QTextControl::linkActivated () from /usr/lib64/qt4/libQtGui.so.4
#17 0x00007fa934aff200 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#18 0x00007fa934aff783 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#19 0x00007fa934b0236a in QTextControl::processEvent () from /usr/lib64/qt4/libQtGui.so.4
#20 0x00007fa934af8f9d in QTextControl::processEvent () from /usr/lib64/qt4/libQtGui.so.4
#21 0x00007fa934ce605b in QTextEdit::mouseReleaseEvent () from /usr/lib64/qt4/libQtGui.so.4
#22 0x00007fa93495fdac in QWidget::event () from /usr/lib64/qt4/libQtGui.so.4
#23 0x00007fa934c8330c in QFrame::event () from /usr/lib64/qt4/libQtGui.so.4
#24 0x00007fa934cf510b in QAbstractScrollArea::viewportEvent () from /usr/lib64/qt4/libQtGui.so.4
#25 0x00007fa934cf68d0 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#26 0x00007fa935555548 in QCoreApplicationPrivate::sendThroughObjectEventFilters () from /usr/lib64/qt4/libQtCore.so.4
#27 0x00007fa93492026f in QApplicationPrivate::notify_helper () from /usr/lib64/qt4/libQtGui.so.4
#28 0x00007fa934927149 in QApplication::notify () from /usr/lib64/qt4/libQtGui.so.4
#29 0x00007fa936337716 in KApplication::notify () from /usr/kde/4.2/lib64/libkdeui.so.5
#30 0x00007fa93555507c in QCoreApplication::notifyInternal () from /usr/lib64/qt4/libQtCore.so.4
#31 0x00007fa9349263d9 in QApplicationPrivate::sendMouseEvent () from /usr/lib64/qt4/libQtGui.so.4
#32 0x00007fa93497657a in ?? () from /usr/lib64/qt4/libQtGui.so.4
#33 0x00007fa934974dd5 in QApplication::x11ProcessEvent () from /usr/lib64/qt4/libQtGui.so.4
#34 0x00007fa934997e27 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#35 0x00007fa930e4ef61 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#36 0x00007fa930e51d95 in ?? () from /usr/lib/libglib-2.0.so.0
#37 0x00007fa930e521c8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#38 0x00007fa935576da0 in QEventDispatcherGlib::processEvents () from /usr/lib64/qt4/libQtCore.so.4
#39 0x00007fa934997c4c in ?? () from /usr/lib64/qt4/libQtGui.so.4
#40 0x00007fa93555467b in QEventLoop::processEvents () from /usr/lib64/qt4/libQtCore.so.4
#41 0x00007fa9355547d8 in QEventLoop::exec () from /usr/lib64/qt4/libQtCore.so.4
#42 0x00007fa9355561f3 in QCoreApplication::exec () from /usr/lib64/qt4/libQtCore.so.4
#43 0x000000000046229c in main (argc=1, argv=0x7fff41084828) at  konversation/src/main.cpp:100

*******
*******

If you need further information, just ask (here or on IRC) 

Kind regards

Fuchs
Comment 3 Eike Hein 2009-06-14 16:12:58 UTC
I have now been able to produce a crash when enabling the "Custom Browser" preference in Konversation. It doesn't appear to crash with this preference disabled, which sort of contradicts the "KDE
is configured to use  firefox  to open URLs." part of the bug report. Does it crash for you with "Custom Browser" disabled?
Comment 4 Eike Hein 2009-06-14 16:14:20 UTC
Ok, nevermind - your backtrace tells me you have "Custom Browser" enabled (KProcess::startDetached() is only called in that case), so the initial report was simply a bit wrong.
Comment 5 Eike Hein 2009-06-14 16:15:14 UTC
Created attachment 34523 [details]
Better backtrace
Comment 6 Christian (Fuchs) 2009-06-14 16:23:32 UTC
Hi Eike, 

In fact in KDEs systemsettings I can only chose between a custom browser (where I entered firefox) or based on the content (not sure about the translation, seems that systemsettings don't want it's language to be changed). 

With both settings I get the crash, when I chose based on address content I get

Anwendung: Konversation (konversation), Signal SIGSEGV
0x00007fccf6746aa1 in nanosleep () from /lib/libc.so.6
[Current thread is 0 (LWP 22059)]

Thread 6 (Thread 0x40aa7950 (LWP 22060)):
#0  0x00007fccf7919c2d in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fcce83764cb in ?? () from /usr/lib64/libxine.so.1
#2  0x00007fccf7915087 in start_thread () from /lib/libpthread.so.0
#3  0x00007fccf6773ccd in clone () from /lib/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x412a8950 (LWP 22061)):
#0  0x00007fccf353e946 in ?? () from /usr/lib/libglib-2.0.so.0
#1  0x00007fccf353f1c8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#2  0x00007fccf7c63db7 in QEventDispatcherGlib::processEvents () from /usr/lib64/qt4/libQtCore.so.4
#3  0x00007fccf7c4167b in QEventLoop::processEvents () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007fccf7c417d8 in QEventLoop::exec () from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007fccf7b811b0 in QThread::exec () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007fcce85ca240 in ?? () from /usr/kde/4.2/lib64/kde4/plugins/phonon_backend/phonon_xine.so
#7  0x00007fccf7b83752 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#8  0x00007fccf7915087 in start_thread () from /lib/libpthread.so.0
#9  0x00007fccf6773ccd in clone () from /lib/libc.so.6
#10 0x0000000000000000 in ?? ()

Thread 4 (Thread 0x41aa9950 (LWP 22064)):
#0  0x00007fccf676bbb6 in poll () from /lib/libc.so.6
#1  0x00007fcce35b5883 in ?? () from /usr/lib64/xine/plugins/1.26/xineplug_ao_out_alsa.so
#2  0x00007fccf7915087 in start_thread () from /lib/libpthread.so.0
#3  0x00007fccf6773ccd in clone () from /lib/libc.so.6
#4  0x0000000000000000 in ?? ()

Thread 3 (Thread 0x422aa950 (LWP 22065)):
#0  0x00007fccf79199a9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fcce8382f05 in ?? () from /usr/lib64/libxine.so.1
#2  0x00007fcce8383ce0 in ?? () from /usr/lib64/libxine.so.1
#3  0x00007fccf7915087 in start_thread () from /lib/libpthread.so.0
#4  0x00007fccf6773ccd in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x42aab950 (LWP 22066)):
#0  0x00007fccf79199a9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fccf7b83f31 in QWaitCondition::wait () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007fccf90b49af in ?? () from /usr/lib64/qt4/libQtNetwork.so.4
#3  0x00007fccf7b83752 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007fccf7915087 in start_thread () from /lib/libpthread.so.0
#5  0x00007fccf6773ccd in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fccfb603760 (LWP 22059)):
[KCrash Handler]
#5  0x00007fccf824e37b in KProcess::startDetached () from /usr/kde/4.2/lib64/libkdecore.so.5
#6  0x000000000052f1cf in IRCView::openLink (this=<value optimized out>, url=<value optimized out>) at  svn/konversation/src/viewer/ircview.cpp:1067
#7  0x000000000052f3d3 in IRCView::anchorClicked (this=0xfacd80, url=<value optimized out>) at  svn/konversation/src/viewer/ircview.cpp:1034
#8  0x000000000043bc5e in IRCView::qt_metacall (this=0xfacd80, _c=QMetaObject::InvokeMetaMethod, _id=145, _a=0x7fff0376e580)
    at  svn/konversation/build/src/moc_ircview.cpp:186
#9  0x00007fccf7c518b5 in QMetaObject::activate () from /usr/lib64/qt4/libQtCore.so.4
#10 0x00007fccf73d32ed in QTextBrowser::anchorClicked () from /usr/lib64/qt4/libQtGui.so.4
#11 0x00007fccf73d47e4 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#12 0x00007fccf73d4aaa in QTextBrowser::qt_metacall () from /usr/lib64/qt4/libQtGui.so.4
#13 0x00007fccf8b07075 in KTextBrowser::qt_metacall () from /usr/kde/4.2/lib64/libkdeui.so.5
#14 0x000000000043bbe5 in IRCView::qt_metacall (this=0xf785d8, _c=8907992, _id=16221632, _a=0x0) at  svn/konversation/build/src/moc_ircview.cpp:142
#15 0x00007fccf7c518b5 in QMetaObject::activate () from /usr/lib64/qt4/libQtCore.so.4
#16 0x00007fccf71e563b in QTextControl::linkActivated () from /usr/lib64/qt4/libQtGui.so.4
#17 0x00007fccf71ec200 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#18 0x00007fccf71ec783 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#19 0x00007fccf71ef36a in QTextControl::processEvent () from /usr/lib64/qt4/libQtGui.so.4
#20 0x00007fccf71e5f9d in QTextControl::processEvent () from /usr/lib64/qt4/libQtGui.so.4
#21 0x00007fccf73d305b in QTextEdit::mouseReleaseEvent () from /usr/lib64/qt4/libQtGui.so.4
#22 0x00007fccf704cdac in QWidget::event () from /usr/lib64/qt4/libQtGui.so.4
#23 0x00007fccf737030c in QFrame::event () from /usr/lib64/qt4/libQtGui.so.4
#24 0x00007fccf73e210b in QAbstractScrollArea::viewportEvent () from /usr/lib64/qt4/libQtGui.so.4
#25 0x00007fccf73e38d0 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#26 0x00007fccf7c42548 in QCoreApplicationPrivate::sendThroughObjectEventFilters () from /usr/lib64/qt4/libQtCore.so.4
#27 0x00007fccf700d26f in QApplicationPrivate::notify_helper () from /usr/lib64/qt4/libQtGui.so.4
#28 0x00007fccf7014149 in QApplication::notify () from /usr/lib64/qt4/libQtGui.so.4
#29 0x00007fccf8a24716 in KApplication::notify () from /usr/kde/4.2/lib64/libkdeui.so.5
#30 0x00007fccf7c4207c in QCoreApplication::notifyInternal () from /usr/lib64/qt4/libQtCore.so.4
#31 0x00007fccf70133d9 in QApplicationPrivate::sendMouseEvent () from /usr/lib64/qt4/libQtGui.so.4
#32 0x00007fccf706357a in ?? () from /usr/lib64/qt4/libQtGui.so.4
#33 0x00007fccf7061dd5 in QApplication::x11ProcessEvent () from /usr/lib64/qt4/libQtGui.so.4
#34 0x00007fccf7084e27 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#35 0x00007fccf353bf61 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#36 0x00007fccf353ed95 in ?? () from /usr/lib/libglib-2.0.so.0
#37 0x00007fccf353f1c8 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#38 0x00007fccf7c63da0 in QEventDispatcherGlib::processEvents () from /usr/lib64/qt4/libQtCore.so.4
#39 0x00007fccf7084c4c in ?? () from /usr/lib64/qt4/libQtGui.so.4
#40 0x00007fccf7c4167b in QEventLoop::processEvents () from /usr/lib64/qt4/libQtCore.so.4
#41 0x00007fccf7c417d8 in QEventLoop::exec () from /usr/lib64/qt4/libQtCore.so.4
#42 0x00007fccf7c431f3 in QCoreApplication::exec () from /usr/lib64/qt4/libQtCore.so.4
#43 0x000000000046229c in main (argc=1, argv=0x7fff03771f48) at  svn/konversation/src/main.cpp:100


(Well, KProcess::startDetached is stareded as well. Even though I did not set a custom browser) 

and with custom browser (and firefox entered) I get the crash in the report I sent in above. 

Sorry for the confusion. 

Kind regards

Fuchs
Comment 7 Eike Hein 2009-06-14 16:27:01 UTC
I'm referring to the "Custom Browser" preference *in Konversation*, which you seem to have enabled, i.e. KDE's setting is ignored anyway.
Comment 8 Eike Hein 2009-06-14 16:27:19 UTC
Bug #192838 might be related.
Comment 9 Eike Hein 2009-06-14 17:01:28 UTC
As Pino pointed out on IRC, once we have a fix for this we should remember that we have multiple places using similar code to invoke the custom browser, which should really all be changed to use one common static method somewhere so they don't get desynced on fixes.
Comment 10 Christian (Fuchs) 2009-06-14 17:09:18 UTC
Oh, in fact there is a setting for this in Konvi as well :) 
Sorry for the confusion created there. 

Yup, as soon as I disable the custom browser there I can't reproduce it. 

Kind regards, 

Christian
Comment 11 Eike Hein 2009-06-15 23:51:04 UTC
SVN commit 982455 by hein:

* Fix crash when opening URLs with ' in them when the "Custom
  Browser" preference is enabled in the config dialog.
BUG:196387
* Throw away outdated link-opening code in the topic label and
  URL catcher classes ... everything now uses the same static
  method in the Application class for opening links.


 M  +28 -0     application.cpp  
 M  +1 -0      application.h  
 M  +1 -0      dcc/transfermanager.cpp  
 M  +2 -20     urlcatcher.cpp  
 M  +1 -20     viewer/ircview.cpp  
 M  +1 -15     viewer/topiclabel.cpp  


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