Bug 307160 - KTorrent crashes when I right click in groups view
Summary: KTorrent crashes when I right click in groups view
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: 4.3.0
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-21 14:08 UTC by Jure Repinc
Modified: 2012-09-24 09:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jure Repinc 2012-09-21 14:08:05 UTC
Application: ktorrent (4.3.0)
KDE Platform Version: 4.9.00 (Compiled from sources)
Qt Version: 4.8.3
Operating System: Linux 3.5.2-gentoo x86_64
Distribution (Platform): Gentoo Packages

-- Information about the crash:
- What I was doing when the application crashed:
1. Click Group View Visible button in toolbar
2. Right click in the groups view

- Actual result:
KTorrent crashes

- Expected
KTorrent shouldn't crash

The crash can be reproduced every time.

-- Backtrace:
Application: KTorrent (ktorrent), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fddce401780 (LWP 1234))]

Thread 7 (Thread 0x7fddcab2b700 (LWP 1551)):
#0  0x0000003078e0fc0d in read () at ../sysdeps/unix/syscall-template.S:82
#1  0x000000307be8263f in read (__nbytes=16, __buf=0x7fddcab2ac90, __fd=<optimized out>) at /usr/include/bits/unistd.h:45
#2  g_wakeup_acknowledge (wakeup=0x7fddc4001c10) at gwakeup.c:212
#3  0x000000307be48849 in g_main_context_check (context=context@entry=0x7fddc40008c0, max_priority=2147483647, fds=fds@entry=0x7fddc4002cb0, n_fds=n_fds@entry=1) at gmain.c:2980
#4  0x000000307be48c62 in g_main_context_iterate (context=context@entry=0x7fddc40008c0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3143
#5  0x000000307be48de4 in g_main_context_iteration (context=0x7fddc40008c0, may_block=1) at gmain.c:3207
#6  0x00007fddd08c7896 in QEventDispatcherGlib::processEvents (this=0x7fddc4002800, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#7  0x00007fddd089861f in QEventLoop::processEvents (this=this@entry=0x7fddcab2ae40, flags=...) at kernel/qeventloop.cpp:149
#8  0x00007fddd08988a8 in QEventLoop::exec (this=0x7fddcab2ae40, flags=...) at kernel/qeventloop.cpp:204
#9  0x00007fddd079a990 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#10 0x00007fddd0878f2f in QInotifyFileSystemWatcherEngine::run (this=0x1a958d0) at io/qfilesystemwatcher_inotify.cpp:248
#11 0x00007fddd079d90c in QThreadPrivate::start (arg=0x1a958d0) at thread/qthread_unix.cpp:338
#12 0x0000003078e08f4a in start_thread (arg=0x7fddcab2b700) at pthread_create.c:305
#13 0x0000003077ee90ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 6 (Thread 0x7fddc115f700 (LWP 2096)):
#0  pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fddc3622afd in WTF::TCMalloc_PageHeap::scavengerThread (this=0x7fddc3fdc2c0 <WTF::pageheap_memory>) at wtf/FastMalloc.cpp:2495
#2  0x00007fddc3622c09 in WTF::TCMalloc_PageHeap::runScavengerThread (context=<optimized out>) at wtf/FastMalloc.cpp:1618
#3  0x0000003078e08f4a in start_thread (arg=0x7fddc115f700) at pthread_create.c:305
#4  0x0000003077ee90ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 5 (Thread 0x7fddc095e700 (LWP 2099)):
#0  0x0000003077ee01bf in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x000000307be48cc4 in g_main_context_poll (n_fds=1, fds=0x7fddbc0027c0, timeout=-1, context=0x7fddbc0009a0, priority=<optimized out>) at gmain.c:3440
#2  g_main_context_iterate (context=context@entry=0x7fddbc0009a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3141
#3  0x000000307be48de4 in g_main_context_iteration (context=0x7fddbc0009a0, may_block=1) at gmain.c:3207
#4  0x00007fddd08c7896 in QEventDispatcherGlib::processEvents (this=0x7fddbc0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#5  0x00007fddd089861f in QEventLoop::processEvents (this=this@entry=0x7fddc095de70, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007fddd08988a8 in QEventLoop::exec (this=0x7fddc095de70, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007fddd079a990 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#8  0x00007fddd079d90c in QThreadPrivate::start (arg=0x34604e0) at thread/qthread_unix.cpp:338
#9  0x0000003078e08f4a in start_thread (arg=0x7fddc095e700) at pthread_create.c:305
#10 0x0000003077ee90ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 4 (Thread 0x7fddb8849700 (LWP 2239)):
#0  net::Socket::ready(net::Poll const*, net::Poll::Mode) const (this=0x33eae50, p=0x175e390, mode=INPUT) at /mnt/linux2/var/tmp/portage/net-libs/libktorrent-1.3.0/work/libktorrent-1.3.0/src/net/socket.cpp:449
#1  0x00007fddd14985c1 in _ZN3net14DownloadThread6updateEv.part.24 (this=0x175e380) at /mnt/linux2/var/tmp/portage/net-libs/libktorrent-1.3.0/work/libktorrent-1.3.0/src/net/downloadthread.cpp:65
#2  net::DownloadThread::update() (this=0x175e380) at /mnt/linux2/var/tmp/portage/net-libs/libktorrent-1.3.0/work/libktorrent-1.3.0/src/net/downloadthread.cpp:46
#3  0x00007fddd1486aa9 in net::NetworkThread::run() (this=0x175e380) at /mnt/linux2/var/tmp/portage/net-libs/libktorrent-1.3.0/work/libktorrent-1.3.0/src/net/networkthread.cpp:48
#4  0x00007fddd079d90c in QThreadPrivate::start (arg=0x175e380) at thread/qthread_unix.cpp:338
#5  0x0000003078e08f4a in start_thread (arg=0x7fddb8849700) at pthread_create.c:305
#6  0x0000003077ee90ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 3 (Thread 0x7fdd63fff700 (LWP 2240)):
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:39
#1  0x00007fddd079c414 in _q_futex (timeout=0x0, val=2, op=0, addr=0x175e610, addr2=<optimized out>, val2=<optimized out>) at thread/qmutex_unix.cpp:99
#2  QMutexPrivate::wait (this=0x175e610, timeout=<optimized out>) at thread/qmutex_unix.cpp:113
#3  0x00007fddd0798765 in QMutex::lock (this=<optimized out>) at thread/qmutex.cpp:164
#4  0x00007fddd1497faa in waitForSocketsReady (this=0x175e890) at /mnt/linux2/var/tmp/portage/net-libs/libktorrent-1.3.0/work/libktorrent-1.3.0/src/net/uploadthread.cpp:112
#5  net::UploadThread::update() (this=0x175e890) at /mnt/linux2/var/tmp/portage/net-libs/libktorrent-1.3.0/work/libktorrent-1.3.0/src/net/uploadthread.cpp:45
#6  0x00007fddd1486aa9 in net::NetworkThread::run() (this=0x175e890) at /mnt/linux2/var/tmp/portage/net-libs/libktorrent-1.3.0/work/libktorrent-1.3.0/src/net/networkthread.cpp:48
#7  0x00007fddd079d90c in QThreadPrivate::start (arg=0x175e890) at thread/qthread_unix.cpp:338
#8  0x0000003078e08f4a in start_thread (arg=0x7fdd63fff700) at pthread_create.c:305
#9  0x0000003077ee90ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 2 (Thread 0x7fdd637fe700 (LWP 2241)):
#0  pthread_cond_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fddd079de6b in wait (time=18446744073709551615, this=0x3304b40) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=0x19daf80, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007fddd1517f9a in net::ReverseResolverThread::run (this=0x19daf70) at /mnt/linux2/var/tmp/portage/net-libs/libktorrent-1.3.0/work/libktorrent-1.3.0/src/net/reverseresolver.cpp:124
#4  0x00007fddd079d90c in QThreadPrivate::start (arg=0x19daf70) at thread/qthread_unix.cpp:338
#5  0x0000003078e08f4a in start_thread (arg=0x7fdd637fe700) at pthread_create.c:305
#6  0x0000003077ee90ad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 1 (Thread 0x7fddce401780 (LWP 1234)):
[KCrash Handler]
#6  0x000000000045e8e3 in groupForIndex (index=..., this=0x2e61df0) at /mnt/linux2/var/tmp/portage/net-p2p/ktorrent-4.3.0/work/ktorrent-4.3.0/ktorrent/groups/groupviewmodel.cpp:183
#7  showContextMenu (p=..., this=0x2f8c940) at /mnt/linux2/var/tmp/portage/net-p2p/ktorrent-4.3.0/work/ktorrent-4.3.0/ktorrent/groups/groupview.cpp:143
#8  _ZN2kt9GroupView18qt_static_metacallEP7QObjectN11QMetaObject4CallEiPPv.part.10 (_a=<optimized out>, _id=<optimized out>, _o=<optimized out>) at /mnt/linux2/var/tmp/portage/net-p2p/ktorrent-4.3.0/work/ktorrent-4.3.0_build/ktorrent/groupview.moc:69
#9  qt_static_metacall (_o=0x2f8c940, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /mnt/linux2/var/tmp/portage/net-p2p/ktorrent-4.3.0/work/ktorrent-4.3.0_build/ktorrent/groupview.moc:59
#10 0x00007fddd08afef4 in QMetaObject::activate (sender=0x2f8c940, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff57857ba0) at kernel/qobject.cpp:3547
#11 0x00007fddd01f2719 in QWidget::customContextMenuRequested(QPoint const&) () from /usr/lib64/qt4/libQtGui.so.4
#12 0x00007fddd01e76b1 in QWidget::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#13 0x00007fddcfc483d5 in QFrame::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#14 0x00007fddcfbdc458 in QAbstractScrollArea::viewportEvent(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#15 0x00007fddcfa7ffe1 in QAbstractItemView::viewportEvent(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#16 0x00007fddcfa5120a in QTreeView::viewportEvent(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#17 0x00007fddcfbd97f1 in QAbstractScrollAreaFilter::eventFilter(QObject*, QEvent*) [clone .local.5241] () from /usr/lib64/qt4/libQtGui.so.4
#18 0x00007fddd0899a34 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<optimized out>, receiver=0x2e61810, event=0x7fff57858e30) at kernel/qcoreapplication.cpp:1025
#19 0x00007fddd0272d51 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#20 0x00007fddd0270974 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#21 0x000000000045498a in kt::App::notify (this=<optimized out>, receiver=<optimized out>, event=<optimized out>) at /mnt/linux2/var/tmp/portage/net-p2p/ktorrent-4.3.0/work/ktorrent-4.3.0/ktorrent/app.cpp:99
#22 0x00007fddd08998ce in QCoreApplication::notifyInternal (this=0x7fff5785a8b0, receiver=0x2e61810, event=0x7fff57858e30) at kernel/qcoreapplication.cpp:915
#23 0x00007fddd0227e5f in QETWidget::translateMouseEvent(_XEvent const*) [clone .34508] () from /usr/lib64/qt4/libQtGui.so.4
#24 0x00007fddd0224236 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#25 0x00007fddd017437a in x11EventSourceDispatch(_GSource*, int (*)(void*), void*) [clone .210389] () from /usr/lib64/qt4/libQtGui.so.4
#26 0x000000307be489f5 in g_main_dispatch (context=0x1793c10) at gmain.c:2539
#27 g_main_context_dispatch (context=context@entry=0x1793c10) at gmain.c:3075
#28 0x000000307be48d28 in g_main_context_iterate (context=context@entry=0x1793c10, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3146
#29 0x000000307be48de4 in g_main_context_iteration (context=0x1793c10, may_block=1) at gmain.c:3207
#30 0x00007fddd08c7876 in QEventDispatcherGlib::processEvents (this=0x1753b30, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#31 0x00007fddd017470d in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtGui.so.4
#32 0x00007fddd089861f in QEventLoop::processEvents (this=this@entry=0x7fff57859b10, flags=...) at kernel/qeventloop.cpp:149
#33 0x00007fddd08988a8 in QEventLoop::exec (this=0x7fff57859b10, flags=...) at kernel/qeventloop.cpp:204
#34 0x00007fddd089d4d6 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#35 0x00007fddd026f4df in QApplication::exec() () from /usr/lib64/qt4/libQtGui.so.4
#36 0x000000000042c14b in main (argc=5, argv=<optimized out>) at /mnt/linux2/var/tmp/portage/net-p2p/ktorrent-4.3.0/work/ktorrent-4.3.0/ktorrent/main.cpp:186

Reported using DrKonqi
Comment 1 Joris Guisson 2012-09-24 09:18:31 UTC
Git commit 38398b45ab57b50db1d2aa15a6d4da4aa03dc332 by Joris Guisson.
Committed on 24/09/2012 at 11:18.
Pushed by guisson into branch 'master'.

Fix crash when right clicking on some locations in the GroupView due to 0 pointer

M  +1    -0    ChangeLog
M  +1    -1    ktorrent/groups/groupviewmodel.cpp

http://commits.kde.org/ktorrent/38398b45ab57b50db1d2aa15a6d4da4aa03dc332
Comment 2 Joris Guisson 2012-09-24 09:19:14 UTC
Git commit 9f675a3e9679edaf5659ac80524dbbd0d66ad508 by Joris Guisson.
Committed on 24/09/2012 at 11:18.
Pushed by guisson into branch '4.3'.

Backport to 4.3: Fix crash when right clicking on some locations in the GroupView due to 0 pointer

M  +1    -0    ChangeLog
M  +1    -1    ktorrent/groups/groupviewmodel.cpp

http://commits.kde.org/ktorrent/9f675a3e9679edaf5659ac80524dbbd0d66ad508