Bug 271516

Summary: KTorrent crashes after adding new torrent for download
Product: [Applications] ktorrent Reporter: Elez J. Shenhar <elezsh>
Component: generalAssignee: Joris Guisson <joris.guisson>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Elez J. Shenhar 2011-04-22 22:05:16 UTC
Application: ktorrent (4.1.0)
KDE Platform Version: 4.6.2 (4.6.2)
Qt Version: 4.7.2
Operating System: Linux 2.6.38-8-generic x86_64
Distribution: Ubuntu Natty (development branch)

-- Information about the crash:
- What I was doing when the application crashed:
Adding a new torrent from the torrent website thepiratebay

The crash does not seem to be reproducible.

-- Backtrace:
Application: KTorrent (ktorrent), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fcd75d92780 (LWP 2628))]

Thread 11 (Thread 0x7fcd5bfff700 (LWP 2630)):
#0  0x00007fcd6e3f0c36 in __pthread_getspecific (key=<value optimized out>) at pthread_getspecific.c:62
#1  0x00007fcd6c9b85e9 in g_thread_self () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fcd6c990629 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fcd72b9c446 in QEventDispatcherGlib::processEvents (this=0x1d63fb0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007fcd72b70882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fcd72b70abc in QEventLoop::exec (this=0x7fcd5bffee00, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007fcd72a87924 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:492
#7  0x00007fcd72a8a175 in QThreadPrivate::start (arg=0x1d57fc0) at thread/qthread_unix.cpp:320
#8  0x00007fcd6e3ead8c in start_thread (arg=0x7fcd5bfff700) at pthread_create.c:304
#9  0x00007fcd710b304d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()

Thread 10 (Thread 0x7fcd5b7fe700 (LWP 2631)):
#0  0x00007fcd710a5f03 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=<value optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fcd7589722c in net::Poll::poll (this=0x7fcd5b7fdcd0, timeout=<value optimized out>) at /home/elez/libktorrent-1.1.0/src/net/poll.cpp:99
#2  0x00007fcd758f93ba in dht::RPCServer::Private::run (this=0x1d6abe0) at /home/elez/libktorrent-1.1.0/src/dht/rpcserver.cpp:95
#3  0x00007fcd72a8a175 in QThreadPrivate::start (arg=0x1d6abe0) at thread/qthread_unix.cpp:320
#4  0x00007fcd6e3ead8c in start_thread (arg=0x7fcd5b7fe700) at pthread_create.c:304
#5  0x00007fcd710b304d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#6  0x0000000000000000 in ?? ()

Thread 9 (Thread 0x7fcd60b8b700 (LWP 2632)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fcd59cb8832 in ?? () from /usr/lib/libQtWebKit.so.4
#2  0x00007fcd6e3ead8c in start_thread (arg=0x7fcd60b8b700) at pthread_create.c:304
#3  0x00007fcd710b304d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 8 (Thread 0x7fcd4fbad700 (LWP 2634)):
#0  0x00007fcd6e3ed3c4 in __pthread_mutex_lock (mutex=0x24d4cf8) at pthread_mutex_lock.c:61
#1  0x00007fcd6c98f87f in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fcd6c990122 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fcd6c990639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fcd72b9c446 in QEventDispatcherGlib::processEvents (this=0x2547c60, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#5  0x00007fcd72b70882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007fcd72b70abc in QEventLoop::exec (this=0x7fcd4fbacdd0, flags=...) at kernel/qeventloop.cpp:201
#7  0x00007fcd72a87924 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:492
#8  0x00007fcd72b52c2f in QInotifyFileSystemWatcherEngine::run (this=0x25ed450) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x00007fcd72a8a175 in QThreadPrivate::start (arg=0x25ed450) at thread/qthread_unix.cpp:320
#10 0x00007fcd6e3ead8c in start_thread (arg=0x7fcd4fbad700) at pthread_create.c:304
#11 0x00007fcd710b304d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 7 (Thread 0x7fcd4c316700 (LWP 2660)):
#0  0x00007fcd710498ef in __libc_free (mem=<value optimized out>) at malloc.c:3739
#1  0x00007fcd759357b8 in freeData (this=0x29e72e0) at /usr/include/qt4/QtCore/qhash.h:568
#2  operator= (this=0x29e72e0) at /usr/include/qt4/QtCore/qhash.h:595
#3  clear (this=0x29e72e0) at /usr/include/qt4/QtCore/qhash.h:574
#4  clear (this=0x29e72e0) at /usr/include/qt4/QtCore/qset.h:82
#5  utp::PollPipe::reset (this=0x29e72e0) at /home/elez/libktorrent-1.1.0/src/utp/pollpipe.cpp:63
#6  0x00007fcd7589726a in net::Poll::poll (this=0x1c68150, timeout=<value optimized out>) at /home/elez/libktorrent-1.1.0/src/net/poll.cpp:109
#7  0x00007fcd75893fe9 in net::DownloadThread::waitForSocketReady (this=0x1c68140) at /home/elez/libktorrent-1.1.0/src/net/downloadthread.cpp:128
#8  0x00007fcd758940d6 in net::DownloadThread::update (this=0x1c68140) at /home/elez/libktorrent-1.1.0/src/net/downloadthread.cpp:48
#9  0x00007fcd758942b9 in net::NetworkThread::run (this=0x1c68140) at /home/elez/libktorrent-1.1.0/src/net/networkthread.cpp:48
#10 0x00007fcd72a8a175 in QThreadPrivate::start (arg=0x1c68140) at thread/qthread_unix.cpp:320
#11 0x00007fcd6e3ead8c in start_thread (arg=0x7fcd4c316700) at pthread_create.c:304
#12 0x00007fcd710b304d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#13 0x0000000000000000 in ?? ()

Thread 6 (Thread 0x7fcd4bb15700 (LWP 2661)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:216
#1  0x00007fcd72a89f28 in thread_sleep (ti=0x7fcd4bb14da0) at thread/qthread_unix.cpp:470
#2  0x00007fcd72a8a080 in QThread::msleep (msecs=<value optimized out>) at thread/qthread_unix.cpp:496
#3  0x00007fcd75893b38 in net::UploadThread::update (this=0x1c68b20) at /home/elez/libktorrent-1.1.0/src/net/uploadthread.cpp:89
#4  0x00007fcd758942b9 in net::NetworkThread::run (this=0x1c68b20) at /home/elez/libktorrent-1.1.0/src/net/networkthread.cpp:48
#5  0x00007fcd72a8a175 in QThreadPrivate::start (arg=0x1c68b20) at thread/qthread_unix.cpp:320
#6  0x00007fcd6e3ead8c in start_thread (arg=0x7fcd4bb15700) at pthread_create.c:304
#7  0x00007fcd710b304d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#8  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7fcd4cb17700 (LWP 2662)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fcd72a8a82b in wait (this=<value optimized out>, mutex=0x294db60, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:88
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x294db60, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:160
#3  0x00007fcd75896dc2 in net::ReverseResolverThread::run (this=0x294db50) at /home/elez/libktorrent-1.1.0/src/net/reverseresolver.cpp:123
#4  0x00007fcd72a8a175 in QThreadPrivate::start (arg=0x294db50) at thread/qthread_unix.cpp:320
#5  0x00007fcd6e3ead8c in start_thread (arg=0x7fcd4cb17700) at pthread_create.c:304
#6  0x00007fcd710b304d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 4 (Thread 0x7fcd48abb700 (LWP 2694)):
#0  0x00007fcd6c98f707 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007fcd6c990122 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fcd6c990639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fcd72b9c446 in QEventDispatcherGlib::processEvents (this=0x3369910, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007fcd72b70882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fcd72b70abc in QEventLoop::exec (this=0x7fcd48abadd0, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007fcd72a87924 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:492
#7  0x00007fcd72b52c2f in QInotifyFileSystemWatcherEngine::run (this=0x3367b70) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007fcd72a8a175 in QThreadPrivate::start (arg=0x3367b70) at thread/qthread_unix.cpp:320
#9  0x00007fcd6e3ead8c in start_thread (arg=0x7fcd48abb700) at pthread_create.c:304
#10 0x00007fcd710b304d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fcd417fa700 (LWP 5374)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:216
#1  0x00007fcd72a8a79e in wait (this=<value optimized out>, mutex=0x276a4a0, time=30000) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x276a4a0, time=30000) at thread/qwaitcondition_unix.cpp:160
#3  0x00007fcd72a7f218 in QThreadPoolThread::run (this=0x2769da0) at concurrent/qthreadpool.cpp:140
#4  0x00007fcd72a8a175 in QThreadPrivate::start (arg=0x2769da0) at thread/qthread_unix.cpp:320
#5  0x00007fcd6e3ead8c in start_thread (arg=0x7fcd417fa700) at pthread_create.c:304
#6  0x00007fcd710b304d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fcd49abd700 (LWP 5392)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:216
#1  0x00007fcd72a8a79e in wait (this=<value optimized out>, mutex=0x7fcd5c003010, time=30000) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x7fcd5c003010, time=30000) at thread/qwaitcondition_unix.cpp:160
#3  0x00007fcd72a7f218 in QThreadPoolThread::run (this=0x1d8a5b0) at concurrent/qthreadpool.cpp:140
#4  0x00007fcd72a8a175 in QThreadPrivate::start (arg=0x1d8a5b0) at thread/qthread_unix.cpp:320
#5  0x00007fcd6e3ead8c in start_thread (arg=0x7fcd49abd700) at pthread_create.c:304
#6  0x00007fcd710b304d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fcd75d92780 (LWP 2628)):
[KCrash Handler]
#6  QNetworkReply::error (this=0x0) at access/qnetworkreply.cpp:453
#7  0x00007fcd52940b01 in kt::SearchWidget::torrentDownloadFinished (this=0x2510730) at /home/elez/ktorrent-4.1.0/plugins/search/searchwidget.cpp:217
#8  0x00007fcd52941ccc in kt::SearchWidget::qt_metacall (this=0x2510730, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffa0d92e60) at /home/elez/ktorrent-4.1.0/build/plugins/search/searchwidget.moc:112
#9  0x00007fcd72b865f8 in QMetaObject::activate (sender=0x43b7140, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3287
#10 0x00007fcd74a55a2b in KDEPrivate::AccessManagerReply::slotResult (this=0x43b7140, kJob=0x1d8cc80) at ../../kio/kio/accessmanagerreply_p.cpp:302
#11 0x00007fcd74a56513 in KDEPrivate::AccessManagerReply::qt_metacall (this=0x43b7140, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffa0d93300) at ./accessmanagerreply_p.moc:83
#12 0x00007fcd72b865f8 in QMetaObject::activate (sender=0x1d8cc80, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fffa0d93300) at kernel/qobject.cpp:3287
#13 0x00007fcd72fddd32 in KJob::result (this=<value optimized out>, _t1=0x1d8cc80) at ./kjob.moc:194
#14 0x00007fcd72fddd70 in KJob::emitResult (this=0x1d8cc80) at ../../kdecore/jobs/kjob.cpp:312
#15 0x00007fcd74a8dc9b in KIO::SimpleJob::slotFinished (this=0x1d8cc80) at ../../kio/kio/job.cpp:525
#16 0x00007fcd74a93122 in KIO::TransferJob::slotFinished (this=0x1d8cc80) at ../../kio/kio/job.cpp:1118
#17 0x00007fcd74a97421 in KIO::TransferJob::qt_metacall (this=0x1d8cc80, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffa0d93700) at ./jobclasses.moc:367
#18 0x00007fcd72b865f8 in QMetaObject::activate (sender=0x3b25620, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3287
#19 0x00007fcd74b34531 in KIO::SlaveInterface::dispatch (this=<value optimized out>, _cmd=104, rawdata=...) at ../../kio/kio/slaveinterface.cpp:173
#20 0x00007fcd74b314b5 in KIO::SlaveInterface::dispatch (this=0x3b25620) at ../../kio/kio/slaveinterface.cpp:89
#21 0x00007fcd74b24e8e in KIO::Slave::gotInput (this=0x3b25620) at ../../kio/kio/slave.cpp:348
#22 0x00007fcd74b254dc in KIO::Slave::qt_metacall (this=0x3b25620, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffa0d93b10) at ./slave.moc:82
#23 0x00007fcd72b865f8 in QMetaObject::activate (sender=0x27a20c0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3287
#24 0x00007fcd74a5eff7 in KIO::ConnectionPrivate::dequeue (this=0x3edfa70) at ../../kio/kio/connection.cpp:82
#25 0x00007fcd74a5f09d in KIO::Connection::qt_metacall (this=0x27a20c0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x477bee0) at ./connection.moc:79
#26 0x00007fcd72b8549a in QObject::event (this=0x27a20c0, e=<value optimized out>) at kernel/qobject.cpp:1226
#27 0x00007fcd71cbb9e4 in QApplicationPrivate::notify_helper (this=0x1cdb9e0, receiver=0x27a20c0, e=0x2a58260) at kernel/qapplication.cpp:4462
#28 0x00007fcd71cc03aa in QApplication::notify (this=<value optimized out>, receiver=0x27a20c0, e=0x2a58260) at kernel/qapplication.cpp:4341
#29 0x000000000043a6c1 in kt::App::notify (this=<value optimized out>, receiver=<value optimized out>, event=<value optimized out>) at /home/elez/ktorrent-4.1.0/ktorrent/app.cpp:97
#30 0x00007fcd72b7149c in QCoreApplication::notifyInternal (this=0x7fffa0d94540, receiver=0x27a20c0, event=0x2a58260) at kernel/qcoreapplication.cpp:731
#31 0x00007fcd72b74c25 in sendEvent (receiver=0x0, event_type=0, data=0x1c60d40) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#32 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x1c60d40) at kernel/qcoreapplication.cpp:1372
#33 0x00007fcd72b9c253 in sendPostedEvents (s=0x1ce1830) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#34 postEventSourceDispatch (s=0x1ce1830) at kernel/qeventdispatcher_glib.cpp:277
#35 0x00007fcd6c98fbcd in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007fcd6c9903a8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007fcd6c990639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007fcd72b9c3ef in QEventDispatcherGlib::processEvents (this=0x1c60520, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#39 0x00007fcd71d62dfe in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#40 0x00007fcd72b70882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#41 0x00007fcd72b70abc in QEventLoop::exec (this=0x7fffa0d944d0, flags=...) at kernel/qeventloop.cpp:201
#42 0x00007fcd72b74ecb in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1008
#43 0x0000000000429b78 in main (argc=5, argv=0x7fffa0d953b8) at /home/elez/ktorrent-4.1.0/ktorrent/main.cpp:177

Reported using DrKonqi
Comment 1 Joris Guisson 2011-04-23 11:02:29 UTC
Git commit eb9831457aa9107287329f36a4ced2722303c520 by Joris Guisson.
Committed on 23/04/2011 at 11:10.
Pushed by guisson into branch 'master'.

Fix crash in search plugin

BUG: 271516

M  +1    -0    ChangeLog     
M  +3    -0    plugins/search/searchwidget.cpp     

http://commits.kde.org/ktorrent/eb9831457aa9107287329f36a4ced2722303c520
Comment 2 Joris Guisson 2011-04-23 11:03:40 UTC
Git commit 8de74bcab751f0273520bc18dded6582cac1f591 by Joris Guisson.
Committed on 23/04/2011 at 11:10.
Pushed by guisson into branch '4.1'.

Backport to 4.1: Fix crash in search plugin

BUG: 271516

M  +1    -0    ChangeLog     
M  +3    -0    plugins/search/searchwidget.cpp     

http://commits.kde.org/ktorrent/8de74bcab751f0273520bc18dded6582cac1f591