Bug 323117 - Crash while remove songs in "Mixed mode CD proyect"
Summary: Crash while remove songs in "Mixed mode CD proyect"
Status: RESOLVED FIXED
Alias: None
Product: k3b
Classification: Applications
Component: general (show other bugs)
Version: 2.0.2
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Michał Małek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-02 19:28 UTC by Hector
Modified: 2014-10-16 20:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.0.3
Sentry Crash Report:
jpwhiting: gardening+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hector 2013-08-02 19:28:49 UTC
Application: k3b (2.0.2)
KDE Platform Version: 4.10.5
Qt Version: 4.8.4
Operating System: Linux 3.8.0-27-generic x86_64
Distribution: Ubuntu 13.04

-- Information about the crash:
- What I was doing when the application crashed:
I inserted several songs to a new project (mixed mode), and then picked out several of these songs and tried to delete, then crash
- Custom settings of the application:
Mixed mode CD proyect

The crash can be reproduced every time.

-- Backtrace:
Application: K3b (k3b), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f7b443e4800 (LWP 15238))]

Thread 4 (Thread 0x7f7b26470700 (LWP 15242)):
#0  0x00007f7b3da5f3cd in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f7b38e711dc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f7b38e716ba in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f7b2d1a84f6 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007f7b38e94eb5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f7b38222f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007f7b3da6be1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 3 (Thread 0x7f7b17fff700 (LWP 15248)):
#0  0x00007f7b3da7a1df in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f7b3da5f3c2 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007f7b38e711dc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f7b38e71304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f7b3f10c036 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5  0x00007f7b3f0dc38f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6  0x00007f7b3f0dc618 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#7  0x00007f7b3efde410 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007f7b3f0bdedf in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x00007f7b3efe0bec in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#10 0x00007f7b38222f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#11 0x00007f7b3da6be1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 2 (Thread 0x7f7b14ba0700 (LWP 15286)):
#0  0x00007f7b3822705e in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f7b3efdf7f6 in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#2  0x00007f7b3efdff96 in QThread::sleep(unsigned long) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#3  0x00007f7b43df07f5 in K3b::MediaCache::PollThread::run (this=0x27ea220) at /build/buildd/k3b-2.0.2/libk3b/tools/k3bmediacache.cpp:106
#4  0x00007f7b3efe0bec in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#5  0x00007f7b38222f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00007f7b3da6be1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 1 (Thread 0x7f7b443e4800 (LWP 15238)):
[KCrash Handler]
#5  0x00000000004f53a6 in K3b::MetaItemModel::slotRowsAboutToBeRemoved (this=0x6, parent=..., start=6, end=6) at /build/buildd/k3b-2.0.2/src/k3bmetaitemmodel.cpp:902
#6  0x00007f7b3f0f20ef in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#7  0x00007f7b3f13d124 in QAbstractItemModel::rowsAboutToBeRemoved(QModelIndex const&, int, int) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#8  0x00007f7b3f0d42a6 in QAbstractItemModel::beginRemoveRows(QModelIndex const&, int, int) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#9  0x0000000000474482 in K3b::AudioProjectModel::Private::_k_aboutToRemoveTrack (this=0x3116160, track=<optimized out>) at /build/buildd/k3b-2.0.2/src/projects/k3baudioprojectmodel.cpp:86
#10 0x00007f7b3f0f20ef in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#11 0x00007f7b43e4b622 in K3b::AudioDoc::aboutToRemoveTrack (this=<optimized out>, _t1=_t1@entry=0x32c56e0) at /build/buildd/k3b-2.0.2/obj-x86_64-linux-gnu/libk3b/k3baudiodoc.moc:223
#12 0x00007f7b43e44d4e in take (this=0x32c56e0) at /build/buildd/k3b-2.0.2/libk3b/projects/audiocd/k3baudiotrack.cpp:258
#13 K3b::AudioTrack::take (this=0x32c56e0) at /build/buildd/k3b-2.0.2/libk3b/projects/audiocd/k3baudiotrack.cpp:254
#14 0x00007f7b43e44e1b in K3b::AudioTrack::~AudioTrack (this=0x32c56e0, __in_chrg=<optimized out>) at /build/buildd/k3b-2.0.2/libk3b/projects/audiocd/k3baudiotrack.cpp:87
#15 0x00007f7b43e44fc9 in K3b::AudioTrack::~AudioTrack (this=0x32c56e0, __in_chrg=<optimized out>) at /build/buildd/k3b-2.0.2/libk3b/projects/audiocd/k3baudiotrack.cpp:98
#16 0x0000000000473f7e in qDeleteAll<QList<K3b::AudioTrack*>::const_iterator> (end=..., begin=...) at /usr/include/qt4/QtCore/qalgorithms.h:322
#17 qDeleteAll<QList<K3b::AudioTrack*> > (c=...) at /usr/include/qt4/QtCore/qalgorithms.h:330
#18 K3b::AudioViewImpl::remove (this=<optimized out>, indexes=...) at /build/buildd/k3b-2.0.2/src/projects/k3baudioviewimpl.cpp:128
#19 0x000000000047a750 in K3b::MixedView::slotRemove (this=0x311fb90) at /build/buildd/k3b-2.0.2/src/projects/k3bmixedview.cpp:170
#20 0x00007f7b3f0f20ef in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#21 0x00007f7b3e202152 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#22 0x00007f7b3e203580 in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#23 0x00007f7b3e2036e7 in QAction::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#24 0x00007f7b3fa4a8a7 in KAction::event(QEvent*) () from /usr/lib/libkdeui.so.5
#25 0x00007f7b3e2088ec in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#26 0x00007f7b3e20b25b in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#27 0x00007f7b3fb261a6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#28 0x00007f7b3f0dd63e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#29 0x00007f7b3e23b754 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#30 0x00007f7b3e23bbb3 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#31 0x00007f7b3e20cdd0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#32 0x00007f7b3fb261a6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#33 0x00007f7b3f0dd63e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#34 0x00007f7b3e2ab649 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#35 0x00007f7b3e2aba81 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#36 0x00007f7b3e282859 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#37 0x00007f7b3e2ae0b2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#38 0x00007f7b38e70f05 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007f7b38e71248 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#40 0x00007f7b38e71304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#41 0x00007f7b3f10c016 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#42 0x00007f7b3e2ae1ae in ?? () from /usr/lib/x86_64-linux-gnu/libQtGui.so.4
#43 0x00007f7b3f0dc38f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#44 0x00007f7b3f0dc618 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#45 0x00007f7b3f0e1cf6 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#46 0x00000000004449a2 in main (argc=<optimized out>, argv=0x7fff1f5c8b78) at /build/buildd/k3b-2.0.2/src/main.cpp:165

Possible duplicates by query: bug 285327.

Reported using DrKonqi
Comment 1 Albert Astals Cid 2014-10-16 20:40:55 UTC
Git commit 56d6545fda70ae7bc2301f863a7975e6e91ada78 by Albert Astals Cid.
Committed on 16/10/2014 at 20:39.
Pushed by aacid into branch '2.0'.

Fix Crash while remove songs in "Mixed mode CD proyect"

It happens that the first remove of song deletes the parent model so the rest of subsequent removes go back to the parent model, try to delete themselves from it and they are already gone.

Create a mixed mode CD.
Add three songs to the audio section
Select two songs
Remove them
Without the patch it crashes, with it works fine
REVIEW: 120607
FIXED-IN: 2.0.3

Acked by Michal Malek

M  +9    -5    src/k3bmetaitemmodel.cpp

http://commits.kde.org/k3b/56d6545fda70ae7bc2301f863a7975e6e91ada78