ktorrent always crashes on exit

Bug #1762167 reported by Laurent Bonnaud
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KTorrent
Fix Released
High
ktorrent (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

ktorrent always crashes when it exits.

ProblemType: Crash
DistroRelease: Ubuntu 18.04
Package: ktorrent 5.1.0-2
Uname: Linux 4.16.0-041600-generic x86_64
ApportVersion: 2.20.9-0ubuntu4
Architecture: amd64
CurrentDesktop: MATE
Date: Sun Apr 8 14:33:10 2018
ExecutablePath: /usr/bin/ktorrent
ProcCmdline: ktorrent
ProcEnviron:
 LANG=en_US.UTF-8
 TERM=xterm
 SHELL=/bin/bash
 XDG_RUNTIME_DIR=<set>
 PATH=(custom, no user)
Signal: 11
SourcePackage: ktorrent
StacktraceTop:
 __GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:51
 KCrash::defaultCrashHandler(int) () at /usr/lib/x86_64-linux-gnu/libKF5Crash.so.5
 <signal handler called> () at /lib/x86_64-linux-gnu/libc.so.6
 ()
 ()
Title: ktorrent crashed with SIGSEGV in __GI_raise()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout kvm lpadmin lxd plugdev sambashare staff

Revision history for this message
In , Suhn-l (suhn-l) wrote :
Download full text (10.0 KiB)

Application: ktorrent (5.0.1)

Qt Version: 5.9.1
Frameworks Version: 5.36.0
Operating System: Linux 4.12.4-1.g2a27bf2-default x86_64
Distribution: "openSUSE Tumbleweed"

-- Information about the crash:
- What I was doing when the application crashed:

The torrent finished downloading and was removed. The list was empty. Application was closed with CTRL-Q. Crash.

The crash can be reproduced sometimes.

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

Thread 5 (Thread 0x7f3eea7bb700 (LWP 2720)):
#0 0x00007f3f14b498e8 in pa_mainloop_iterate (m=<optimized out>, block=<optimized out>, retval=0x0) at pulse/mainloop.c:939
#1 0x00007f3f14b49960 in pa_mainloop_run (m=0x3ee8d53d00, retval=retval@entry=0x0) at pulse/mainloop.c:944
#2 0x00007f3f14b577c9 in thread (userdata=0x3ee9346b80) at pulse/thread-mainloop.c:100
#3 0x00007f3f1255d0b8 in internal_thread_func (userdata=0x3ee8caaf80) at pulsecore/thread-posix.c:81
#4 0x00007f3f18ca14d7 in start_thread (arg=0x7f3eea7bb700) at pthread_create.c:456
#5 0x00007f3f1d24eb2f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 4 (Thread 0x7f3ee3fff700 (LWP 2329)):
#0 0x00007f3f18ca75dd in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x3ee8d92190) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x3ee8d92140, cond=0x3ee8d92168) at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x3ee8d92168, mutex=0x3ee8d92140) at pthread_cond_wait.c:655
#3 0x00007f3f1de6b04b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQt5Core.so.5
#4 0x00007f3f22a9baa3 in net::ReverseResolverThread::run (this=0x3ee8b95bc0) at /usr/src/debug/libktorrent-2.0.1/src/net/reverseresolver.cpp:124
#5 0x00007f3f1de69d2e in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#6 0x00007f3f18ca14d7 in start_thread (arg=0x7f3ee3fff700) at pthread_create.c:456
#7 0x00007f3f1d24eb2f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

Thread 3 (Thread 0x7f3f08b2e700 (LWP 2012)):
#0 0x00007f3f1d24518d in poll () at ../sysdeps/unix/syscall-template.S:84
#1 0x00007f3f166d0d19 in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x7f3ef4003070, timeout=<optimized out>, context=0x7f3ef4000990) at gmain.c:4271
#2 g_main_context_iterate (context=context@entry=0x7f3ef4000990, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3967
#3 0x00007f3f166d0e2c in g_main_context_iteration (context=0x7f3ef4000990, may_block=1) at gmain.c:4033
#4 0x00007f3f1e08c6ab in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#5 0x00007f3f1e03535a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#6 0x00007f3f1de6531a in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#7 0x00007f3f1de69d2e in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#8 0x00007f3f18ca14d7 in start_thread (arg=0x7f3f08b2e700) at pthread_create.c:456...

Revision history for this message
In , Jacob Noori (jacobnoori) wrote :

Created attachment 109128
New crash information added by DrKonqi

ktorrent (5.1.0) using Qt 5.9.2

- What I was doing when the application crashed:

Once the torrent list was emptied, I quit KTorrent from the File Menu. The crash is reproducible sometimes.

-- Backtrace (Reduced):
#6 bt::TorrentInterface::getDisplayName (this=0x556d28d53640) at /usr/include/KF5/libktorrent/interfaces/torrentinterface.h:426
#7 kt::QueueManagerModel::data (this=<optimized out>, index=..., role=<optimized out>) at /usr/src/debug/ktorrent-5.1.0/ktorrent/tools/queuemanagermodel.cpp:235
#8 0x00007f5347063776 in QStyledItemDelegate::initStyleOption(QStyleOptionViewItem*, QModelIndex const&) const () from /usr/lib64/libQt5Widgets.so.5
#9 0x00007f5347062cd9 in QStyledItemDelegate::sizeHint(QStyleOptionViewItem const&, QModelIndex const&) const () from /usr/lib64/libQt5Widgets.so.5
#10 0x00007f53470a32ca in QTreeView::indexRowSizeHint(QModelIndex const&) const () from /usr/lib64/libQt5Widgets.so.5

Revision history for this message
In , Andrius Štikonas (stikonas) wrote :

*** Bug 387669 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Andrius Štikonas (stikonas) wrote :

*** Bug 384476 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Andrius Štikonas (stikonas) wrote :

*** Bug 387754 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Andrius Štikonas (stikonas) wrote :

*** Bug 385766 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Andrius Štikonas (stikonas) wrote :

*** Bug 385543 has been marked as a duplicate of this bug. ***

Revision history for this message
In , nvrs (nviorres) wrote :

Created attachment 109528
New crash information added by DrKonqi

ktorrent (5.1.0) using Qt 5.9.3

- What I was doing when the application crashed:

Removed the torrent that had finished downloading and closed the application via the tray icon context menu.

-- Backtrace (Reduced):
#7 0x00007f9ee8597136 in QModelIndex::data (arole=0, this=0x7fff546863e0) at ../../include/QtCore/../../src/corelib/itemmodels/qabstractitemmodel.h:432
#8 QStyledItemDelegate::initStyleOption (this=0x1440a20, option=0x7fff54686270, index=...) at itemviews/qstyleditemdelegate.cpp:345
#9 0x00007f9ee85965ef in QStyledItemDelegate::sizeHint (this=0x1440a20, option=..., index=...) at itemviews/qstyleditemdelegate.cpp:410
#10 0x00007f9ee85dbf31 in QTreeView::indexRowSizeHint (this=this@entry=0x13f6bb0, index=...) at itemviews/qtreeview.cpp:2987
#11 0x00007f9ee85dc946 in QTreeViewPrivate::layout (this=this@entry=0x142b3b0, i=i@entry=-1, recursiveExpanding=recursiveExpanding@entry=false, afterIsUninitialized=afterIsUninitialized@entry=false) at itemviews/qtreeview.cpp:3321

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 387945 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 387927 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 385761 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Marvelvance (marvelvance) wrote :

Created attachment 109780
New crash information added by DrKonqi

ktorrent (5.1.0) using Qt 5.10.0

- Unusual behavior I noticed:
- Everytime I close ktorrent
- For every update of the app

-- Backtrace (Reduced):
#6 0x00007f575972c43d in QVariant::QVariant(QString const&) () from /usr/lib64/libQt5Core.so.5
#7 0x00005603f82dbf9c in kt::ViewModel::Item::data (this=0x5603f92bf480, col=<optimized out>) at /usr/src/debug/ktorrent-5.1.0/ktorrent/view/viewmodel.cpp:255
#8 0x00005603f82dde0d in kt::ViewModel::data (this=<optimized out>, index=..., role=<optimized out>) at /usr/src/debug/ktorrent-5.1.0/ktorrent/view/viewmodel.cpp:648
#9 0x00007f575a6ba7c6 in QStyledItemDelegate::initStyleOption(QStyleOptionViewItem*, QModelIndex const&) const () from /usr/lib64/libQt5Widgets.so.5
#10 0x00007f575a6b9d29 in QStyledItemDelegate::sizeHint(QStyleOptionViewItem const&, QModelIndex const&) const () from /usr/lib64/libQt5Widgets.so.5

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 390157 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 389915 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Suhn-l (suhn-l) wrote :

Created attachment 111024
New crash information added by DrKonqi

ktorrent (5.1.0) using Qt 5.10.0

I originally reported the bug and am now supplying a more detailed backtrace which includes the Qt libraries.

-- Backtrace (Reduced):
#6 bt::TorrentInterface::getDisplayName (this=0x564f7f4b1510) at /usr/include/KF5/libktorrent/interfaces/torrentinterface.h:426
#7 kt::QueueManagerModel::data (this=<optimized out>, index=..., role=<optimized out>) at /usr/src/debug/ktorrent-5.1.0-2.1.x86_64/ktorrent/tools/queuemanagermodel.cpp:235
#8 0x00007f23a491bdb6 in QModelIndex::data (arole=0, this=0x7fff95c6f570) at ../../include/QtCore/../../src/corelib/itemmodels/qabstractitemmodel.h:432
#9 QStyledItemDelegate::initStyleOption (this=0x564f7ebd3390, option=0x7fff95c6f400, index=...) at itemviews/qstyleditemdelegate.cpp:345
#10 0x00007f23a491b319 in QStyledItemDelegate::sizeHint (this=0x564f7ebd3390, option=..., index=...) at itemviews/qstyleditemdelegate.cpp:410

Revision history for this message
In , Suhn-l (suhn-l) wrote :

Created attachment 111054
New crash information added by DrKonqi

ktorrent (5.1.0) using Qt 5.10.0

And once more, with apparently a slightly different backtrace.

-- Backtrace (Reduced):
#6 _mm_movemask_epi8(long long __vector(2)) (__A=...) at /usr/lib64/gcc/x86_64-suse-linux/7/include/emmintrin.h:1396
#7 findChar (str=0xab24726070d0, len=<optimized out>, ch=..., from=from@entry=0, cs=cs@entry=Qt::CaseSensitive) at tools/qstring.cpp:866
#8 0x00007f63d852bc48 in QString::indexOf (this=<optimized out>, ch=..., from=from@entry=0, cs=cs@entry=Qt::CaseSensitive) at tools/qstring.cpp:3369
#9 0x00007f63d852bc87 in QString::replace (this=this@entry=0x7fff7814ce60, before=before@entry=..., after=after@entry=..., cs=cs@entry=Qt::CaseSensitive) at tools/qstring.cpp:2817
#10 0x00007f63d965f7ad in QAbstractItemDelegatePrivate::textForRole (this=<optimized out>, role=role@entry=Qt::DisplayRole, value=..., locale=..., precision=precision@entry=6) at itemviews/qabstractitemdelegate.cpp:597

Revision history for this message
In , Suhn-l (suhn-l) wrote :

Created attachment 111449
New crash information added by DrKonqi

ktorrent (5.1.0) using Qt 5.10.0

Another backtrace.
Again, the output keeps on changing.

-- Backtrace (Reduced):
#6 QChar::isSurrogate (this=<optimized out>) at ../../../include/QtCore/../../src/corelib/tools/qchar.h:460
#7 QStringIterator::next (invalidAs=65533, this=<synthetic pointer>, this=<synthetic pointer>) at ../../../include/QtCore/5.10.0/QtCore/private/../../../../../src/corelib/tools/qstringiterator_p.h:168
#8 QFontEngineFT::stringToCMap (this=0x55c36bb8a080, str=<optimized out>, len=<optimized out>, glyphs=0x7ffc3f858710, nglyphs=0x7ffc3f8586fc, flags=...) at freetype/qfontengine_ft.cpp:1733
#9 0x00007fad2e7f76e2 in QFontEngineMulti::stringToCMap (this=0x55c36b966620, str=0x56326c978af5, len=3, glyphs=0x7ffc3f858710, nglyphs=0x7ffc3f8586fc, flags=...) at text/qfontengine.cpp:1896
#10 0x00007fad2e81849c in QTextEngine::shapeText (this=this@entry=0x55c36b8bcc30, item=item@entry=13) at text/qtextengine.cpp:1050

Revision history for this message
In , Maxim-stargazer (maxim-stargazer) wrote :

*** This bug has been confirmed by popular vote. ***

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 bt::TorrentInterface::getDisplayName (this=0x563791af8990) at /usr/include/KF5/libktorrent/interfaces/torrentinterface.h:426
 kt::ViewModel::Item::data (this=0x563791eadaa0, col=<optimized out>) at ./ktorrent/view/viewmodel.cpp:212
 kt::ViewModel::data (this=<optimized out>, index=..., role=<optimized out>) at ./ktorrent/view/viewmodel.cpp:648
 QModelIndex::data (arole=0, this=0x7ffecb875080) at ../../include/QtCore/../../src/corelib/itemmodels/qabstractitemmodel.h:432
 QStyledItemDelegate::initStyleOption (this=0x563791eb49d0, option=0x7ffecb874ef0, index=...) at itemviews/qstyleditemdelegate.cpp:345

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in ktorrent (Ubuntu):
importance: Undecided → Medium
summary: - ktorrent crashed with SIGSEGV in __GI_raise()
+ ktorrent crashed with SIGSEGV in bt::TorrentInterface::getDisplayName()
tags: removed: need-amd64-retrace
information type: Private → Public
Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 393572 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 393785 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 392831 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 394111 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 395907 has been marked as a duplicate of this bug. ***

Revision history for this message
In , bm_rec (bm-rec) wrote :

Created attachment 114174
New crash information added by DrKonqi

ktorrent (5.1.0) using Qt 5.10.1

- What I was doing when the application crashed:
I was closeing Ktorrent from system Plasma tray

-- Backtrace (Reduced):
#6 0x00007f3901601d93 in findChar(QChar const*, int, QChar, int, Qt::CaseSensitivity) () from /lib64/libQt5Core.so.5
#7 0x00007f39016065da in QString::replace(QChar, QChar, Qt::CaseSensitivity) () from /lib64/libQt5Core.so.5
#8 0x00007f390227b029 in QAbstractItemDelegatePrivate::textForRole(Qt::ItemDataRole, QVariant const&, QLocale const&, int) const () from /lib64/libQt5Widgets.so.5
#9 0x00007f39022822b3 in QStyledItemDelegate::displayText(QVariant const&, QLocale const&) const () from /lib64/libQt5Widgets.so.5
#10 0x00007f3902283c6e in QStyledItemDelegate::initStyleOption(QStyleOptionViewItem*, QModelIndex const&) const () from /lib64/libQt5Widgets.so.5

Revision history for this message
In , Valerii Malov (vmalov) wrote :

To anyone still having this issue, do you use "scan folders" plugin and does disabling it fix the crash on exit (or it crashes ktorrent too when you disable the plugin)?

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 397327 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Bernie Innocenti (codewiz) wrote :

(In reply to Valeriy Malov from comment #24)
> To anyone still having this issue, do you use "scan folders" plugin and does
> disabling it fix the crash on exit (or it crashes ktorrent too when you
> disable the plugin)?

Not using the Scan Folder plugin, and getting crashes on shutdown with the exact same stack trace of comment #23.

Revision history for this message
In , Strangiato Xanadu (strangiato) wrote :

*** Bug 398145 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 399330 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Strangiato Xanadu (strangiato) wrote :

*** Bug 399411 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 400392 has been marked as a duplicate of this bug. ***

Changed in ktorrent:
importance: Unknown → High
Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 403016 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Marcin Lewandowski (marcin-adam-lewandowski) wrote :

Created attachment 118516
New crash information added by DrKonqi

ktorrent (5.1.1) using Qt 5.11.3

Worth mention:
Connecting through local OpenVPN server running on BananaPiM!+ with 4096 encryption.
Torrents are set to be moved to NAS running on RaspberryPi3+ mounted with sshfs to local machine where error accured using using the same OVPN connection..

When a large file is moved between RPI NAS and local machine through OVPN its very slow and it sometimes make all the KDE slow when seraching files or browsig folders in Dolphin. To boost local machine i trid to close Ktorrent from the task bar => close. At the time 3 files where copied.

-- Backtrace (Reduced):
#6 _mm_movemask_epi8(long long __vector(2)) (__A=...) at /usr/lib/gcc/x86_64-linux-gnu/8/include/emmintrin.h:1305
#7 findChar (str=0xaacf3c584430, len=<optimized out>, ch=..., from=from@entry=0, cs=cs@entry=Qt::CaseSensitive) at tools/qstring.cpp:1049
#8 0x00007f5c42b77328 in QString::indexOf (this=<optimized out>, ch=..., from=from@entry=0, cs=cs@entry=Qt::CaseSensitive) at ../../include/QtCore/../../src/corelib/tools/qarraydata.h:206
#9 0x00007f5c42b77367 in QString::replace (this=this@entry=0x7ffc6dccd850, before=before@entry=..., after=after@entry=..., cs=cs@entry=Qt::CaseSensitive) at tools/qstring.cpp:3031
#10 0x00007f5c4388ad4f in QAbstractItemDelegatePrivate::textForRole (this=<optimized out>, role=role@entry=Qt::DisplayRole, value=..., locale=..., precision=precision@entry=6) at ../../include/QtCore/../../src/corelib/tools/qchar.h:88

Revision history for this message
In , Marcin Lewandowski (marcin-adam-lewandowski) wrote :

Created attachment 118522
New crash information added by DrKonqi

ktorrent (5.1.1) using Qt 5.11.3

Ktorrent crushed while closing but just before I closed it i removed a couple of finished torrents from the list.

-- Backtrace (Reduced):
#13 0x00007f08b42c8b28 in QTextEngine::itemize() const () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#14 0x00007f08b42d006c in QTextLayout::beginLayout() () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#15 0x00007f08b482c21f in viewItemTextLayout (textLayout=..., lineWidth=8388607) at styles/qcommonstyle.cpp:850
#16 0x00007f08b482f6e2 in QCommonStylePrivate::viewItemSize (this=this@entry=0x55c263558660, option=option@entry=0x7ffdf4b0c240, role=role@entry=0) at styles/qcommonstyle.cpp:909
#17 0x00007f08b482ffb8 in QCommonStylePrivate::viewItemLayout (this=0x55c263558660, opt=opt@entry=0x7ffdf4b0c240, checkRect=checkRect@entry=0x7ffdf4b0c180, pixmapRect=pixmapRect@entry=0x7ffdf4b0c160, textRect=textRect@entry=0x7ffdf4b0c170, sizehint=sizehint@entry=true) at styles/qcommonstyle.cpp:1006

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 404670 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 405407 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Misterwayn-f (misterwayn-f) wrote :

Created attachment 119080
New crash information added by DrKonqi

ktorrent (5.1.1) using Qt 5.12.2

- What I was doing when the application crashed:

I clicked File->Quit from the main window. The app appeared to exit properly. 5-10 seconds later the KCrash report appeared.

Application state:
~9 torrents seeding
~2 torrents downloading
~5 torrents in queue to download
Speed limit Download: No Limit
Speed limit Upload: 30 KiB/s
Plugins enabled: UPnP (connected by wifi, static ip, no ipv6, dns: 1.1.1.1/1.0.0.1, netgear R8000 router)

Fresh install of OpenSUSE Tumbleweed yesterday.

I am willing to help test/debug this. Feel free to send me a note if I can be of service. In the mean time, I'm going to start following the stack traces around the source.

-- Backtrace (Reduced):
#6 std::__atomic_base<int>::load (__m=std::memory_order_relaxed, this=0x74746366) at /usr/include/c++/8/bits/atomic_base.h:390
#7 QAtomicOps<int>::load<int> (_q_value=...) at ../../include/QtCore/../../src/corelib/thread/qatomic_cxx11.h:227
#8 QBasicAtomicInteger<int>::load (this=0x74746366) at ../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:103
[...]
#10 QString::QString (other=..., this=0x7ffc597c3f50) at ../../include/QtCore/../../src/corelib/tools/qstring.h:958
#11 v_construct_helper<QString> (t=..., x=0x7ffc597c3f50) at ../../include/QtCore/5.12.2/QtCore/private/../../../../../src/corelib/kernel/qvariant_p.h:123

Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

This bug still exists in Ubuntu 19.04/disco in this package version:

Package: ktorrent
Version: 5.1.1-1build1

summary: - ktorrent crashed with SIGSEGV in bt::TorrentInterface::getDisplayName()
+ ktorrent always crashes on exit
tags: added: disco
Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 406026 has been marked as a duplicate of this bug. ***

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ktorrent (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 408406 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 408759 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Giant+bug-kde (giant+bug-kde) wrote :

*** Bug 410334 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Ftefrjbhfvasf32 (ftefrjbhfvasf32) wrote :

Created attachment 121845
New crash information added by DrKonqi

ktorrent (5.1.1) using Qt 5.13.0

- What I was doing when the application crashed:

I had several torrents opened and I quited KTorrent. Then CPU usage peaked to 90% and KTorrent crashed.

-- Backtrace (Reduced):
#7 0x00007ffacf7a5749 in memcpy (__len=65524, __src=<optimized out>, __dest=<optimized out>) at /usr/include/bits/string_fortified.h:34
#8 QString::reallocData (this=0x7ffdb5308b90, alloc=<optimized out>, grow=<optimized out>) at tools/qstring.cpp:2382
[...]
#10 QString::replace (this=this@entry=0x7ffdb5308b90, before=before@entry=..., after=after@entry=..., cs=cs@entry=Qt::CaseSensitive) at tools/qstring.cpp:3282
#11 0x00007ffad05a4667 in QAbstractItemDelegatePrivate::textForRole (this=<optimized out>, role=role@entry=Qt::DisplayRole, value=..., locale=..., precision=precision@entry=6) at ../../include/QtCore/../../src/corelib/tools/qchar.h:88
#12 0x00007ffad05abc20 in QStyledItemDelegate::displayText (this=<optimized out>, value=..., locale=...) at itemviews/qstyleditemdelegate.h:99

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 411222 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 411002 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Valerii Malov (vmalov) wrote :

Git commit b819ef6a35495e12a204cbb241cdb2502c4cd11e by Valerii Malov.
Committed on 29/09/2019 at 20:31.
Pushed by valeriymalov into branch '5.1'.

Cleanup ViewModel a bit and try to fix crash on exit

Summary:
removeTorrent makes changes to torrent list we are currently iterating
on per-item basis, this causees heap-use-after-free in onExit
Just call removeRows which should be functionally the same, but should
delete all items in one batch

Compact ViewModel::Item::update
Fix a few warnings (0 as nullptr, c-style casts)
Remove useless ViewModel::torrentFromIndex variant
Remove unused headers
add CMakeLists.txt.user to gitignore

Test Plan: build with asan, run & exit, see asan stacktrace before changing onExit

Reviewers: stikonas

Differential Revision: https://phabricator.kde.org/D24149

M +1 -0 .gitignore
M +1 -0 ktorrent/CMakeLists.txt
M +51 -146 ktorrent/view/viewmodel.cpp
M +10 -11 ktorrent/view/viewmodel.h

https://commits.kde.org/ktorrent/b819ef6a35495e12a204cbb241cdb2502c4cd11e

Revision history for this message
In , Andrius Štikonas (stikonas) wrote :

Would anybody be able to compile this and check if crash on exit is fixed?

I was never able to reproduce it.

Revision history for this message
In , R-rob-c (r-rob-c) wrote :

I can confirm that this bug has been fixed.

Built from master, there are no crashes.
Built from master with the above patch reverted, the crash occurs again.

When trying to reproduce the bug, I noticed that it occurs if the .local/share/ktorrent/ directory contains at least three subdirectories starting with "tor", e.g. "tor0", "tor1", "tor2".

Revision history for this message
In , R-rob-c (r-rob-c) wrote :

*** Bug 392256 has been marked as a duplicate of this bug. ***

Revision history for this message
In , R-rob-c (r-rob-c) wrote :

*** Bug 405610 has been marked as a duplicate of this bug. ***

Revision history for this message
In , R-rob-c (r-rob-c) wrote :

*** Bug 415247 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 415645 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 416518 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Kovin (kovin) wrote :

For me the bug is fixed, no crash when closing ktorrent (version 5.1.2).

Operating System: Gentoo Linux
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.1
Kernel Version: 5.6.5-gentoo-nvidia
OS Type: 64-bit

Revision history for this message
In , Cfeck (cfeck) wrote :

Thanks for the update; changing status.

The fix is not in v5.1.2, but might have been backported by the distribution. See comment 44 for the commit.

Revision history for this message
In , Andrius Štikonas (stikonas) wrote :

(In reply to Christoph Feck from comment #53)
> Thanks for the update; changing status.
>
> The fix is not in v5.1.2, but might have been backported by the
> distribution. See comment 44 for the commit.

Maybe it's time to schedule KTorrent 5.2? I think it also was ported away from QtWebkit.

Changed in ktorrent:
status: Unknown → Fix Released
Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 422071 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 423523 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Techxgames (techxgames) wrote :

Created attachment 135931
New crash information added by DrKonqi

ktorrent (20.12.2) using Qt 5.15.2

- What I was doing when the application crashed:

After pressing Ctrl+Q to exit it, I got notified of the crash.

-- Backtrace (Reduced):
#5 0x000055da6cae7fe6 in kt::ViewModel::Item::color (this=0x55da6dc46550, col=<optimized out>) at ./ktorrent/view/viewmodel.cpp:238
#6 0x000055da6cae999d in kt::ViewModel::data (this=<optimized out>, index=..., role=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qabstractitemmodel.h:63
#7 0x00007ff7174b05d7 in QModelIndex::data (arole=9, this=0x7ffc2d577180) at ../../include/QtCore/../../src/corelib/itemmodels/qabstractitemmodel.h:460
#8 QStyledItemDelegate::initStyleOption (this=0x55da7252c3d0, option=0x7ffc2d577010, index=...) at itemviews/qstyleditemdelegate.cpp:291
#9 0x00007ff7174afcf7 in QStyledItemDelegate::sizeHint (this=0x55da7252c3d0, option=..., index=...) at itemviews/qstyleditemdelegate.cpp:410

Norbert (nrbrtx)
tags: removed: disco
Revision history for this message
Laurent Bonnaud (laurent-bonnaud) wrote :

I am closing this bug because Ubuntu now contains a fixed version of ktorrent.

Changed in ktorrent (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.