Bug 340515 - k3b crashes when building dvd-rw from iso file
Summary: k3b crashes when building dvd-rw from iso file
Status: RESOLVED FIXED
Alias: None
Product: k3b
Classification: Applications
Component: general (show other bugs)
Version: 2.0.2
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: k3b developers
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2014-10-31 05:15 UTC by Kevin Martin
Modified: 2014-11-03 21:11 UTC (History)
4 users (show)

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


Attachments
Here are the last 2000 lines from an strace of a failure.. (424.76 KB, application/x-gzip)
2014-11-02 15:34 UTC, Kevin Martin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Martin 2014-10-31 05:15:06 UTC
Application: k3b (2.0.2)
KDE Platform Version: 4.14.2
Qt Version: 4.8.6
Operating System: Linux 3.18.0-0.rc1.git4.1.fc22.x86_64 x86_64
Distribution: "Fedora release 22 (Rawhide)"

-- Information about the crash:
I was building a bootable DVD on a DVD-RW from a Microsoft Windows 8 iso file.

-- Backtrace:
Application: K3b (k3b), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f537006d900 (LWP 5001))]

Thread 3 (Thread 0x7f5347ef5700 (LWP 5002)):
#0  0x00007f536613601d in poll () at /lib64/libc.so.6
#1  0x00007f53616a5e24 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2  0x00007f53616a5f3c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007f5367f6da3e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtCore.so.4
#4  0x00007f5367f3d261 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtCore.so.4
#5  0x00007f5367f3d5c5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtCore.so.4
#6  0x00007f5367e32b59 in QThread::exec() () at /lib64/libQtCore.so.4
#7  0x00007f5367f1dcc3 in QInotifyFileSystemWatcherEngine::run() () at /lib64/libQtCore.so.4
#8  0x00007f5367e353bf in QThreadPrivate::start(void*) () at /lib64/libQtCore.so.4
#9  0x00007f5367ba353a in start_thread () at /lib64/libpthread.so.0
#10 0x00007f53661415fd in clone () at /lib64/libc.so.6

Thread 2 (Thread 0x7f533de51700 (LWP 5111)):
#0  0x00007f536613601d in poll () at /lib64/libc.so.6
#1  0x00007f53616a5e24 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#2  0x00007f53616a5f3c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#3  0x00007f5367f6da3e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtCore.so.4
#4  0x00007f5367f3d261 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtCore.so.4
#5  0x00007f5367f3d5c5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtCore.so.4
#6  0x00007f5367e32b59 in QThread::exec() () at /lib64/libQtCore.so.4
#7  0x00007f5367f1dcc3 in QInotifyFileSystemWatcherEngine::run() () at /lib64/libQtCore.so.4
#8  0x00007f5367e353bf in QThreadPrivate::start(void*) () at /lib64/libQtCore.so.4
#9  0x00007f5367ba353a in start_thread () at /lib64/libpthread.so.0
#10 0x00007f53661415fd in clone () at /lib64/libc.so.6

Thread 1 (Thread 0x7f537006d900 (LWP 5001)):
[KCrash Handler]
#5  0x00007f5367e7bf03 in QString::mid(int, int) const () at /lib64/libQtCore.so.4
#6  0x0000000000545f9f in K3b::LsofWrapper::checkDevice(K3b::Device::Device*) ()
#7  0x0000000000546a79 in K3b::LsofWrapperDialog::slotCheckDevice() ()
#8  0x0000000000546ddd in K3b::LsofWrapperDialog::checkDevice(K3b::Device::Device*, QWidget*) ()
#9  0x00000000004f816f in K3b::Application::Core::internalBlockDevice(K3b::Device::Device*) ()
#10 0x00007f536f9486b0 in K3b::Core::blockDevice(K3b::Device::Device*) () at /lib64/libk3blib.so.6
#11 0x00007f536f9978d3 in K3b::GrowisofsWriter::start() () at /lib64/libk3blib.so.6
#12 0x00007f536f9c780e in K3b::Iso9660ImageWritingJob::startWriting() () at /lib64/libk3blib.so.6
#13 0x00007f536f9c799c in K3b::Iso9660ImageWritingJob::start() () at /lib64/libk3blib.so.6
#14 0x00007f5367f57951 in QObject::event(QEvent*) () at /lib64/libQtCore.so.4
#15 0x00007f5366df9efc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQtGui.so.4
#16 0x00007f5366e00958 in QApplication::notify(QObject*, QEvent*) () at /lib64/libQtGui.so.4
#17 0x00007f5368f27a1a in KApplication::notify(QObject*, QEvent*) () at /lib64/libkdeui.so.5
#18 0x00007f5367f3e70d in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /lib64/libQtCore.so.4
#19 0x00007f5367f419d1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /lib64/libQtCore.so.4
#20 0x00007f5367f6d8ae in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQtCore.so.4
#21 0x00007f53616a5aeb in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#22 0x00007f53616a5e88 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#23 0x00007f53616a5f3c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#24 0x00007f5367f6da1e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtCore.so.4
#25 0x00007f5366e9d136 in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtGui.so.4
#26 0x00007f5367f3d261 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtCore.so.4
#27 0x00007f5367f3d5c5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtCore.so.4
#28 0x00007f53672cb75c in QDialog::exec() () at /lib64/libQtGui.so.4
#29 0x000000000051ce28 in K3b::JobProgressDialog::startJob(K3b::Job*) ()
#30 0x000000000045a0f2 in K3b::ImageWritingDialog::slotStartClicked() ()
#31 0x0000000000527465 in K3b::InteractionDialog::slotStartClickedInternal() ()
#32 0x0000000000527dad in K3b::InteractionDialog::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) [clone .part.12] ()
#33 0x00007f5367f5325c in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () at /lib64/libQtCore.so.4
#34 0x00007f5367488252 in QAbstractButton::clicked(bool) () at /lib64/libQtGui.so.4
#35 0x00007f53671c8363 in QAbstractButtonPrivate::emitClicked() () at /lib64/libQtGui.so.4
#36 0x00007f53671c97a4 in QAbstractButtonPrivate::click() () at /lib64/libQtGui.so.4
#37 0x00007f53671c98b4 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () at /lib64/libQtGui.so.4
#38 0x00007f5366e4d118 in QWidget::event(QEvent*) () at /lib64/libQtGui.so.4
#39 0x00007f5366df9efc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQtGui.so.4
#40 0x00007f5366e00abf in QApplication::notify(QObject*, QEvent*) () at /lib64/libQtGui.so.4
#41 0x00007f5368f27a1a in KApplication::notify(QObject*, QEvent*) () at /lib64/libkdeui.so.5
#42 0x00007f5367f3e70d in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /lib64/libQtCore.so.4
#43 0x00007f5366e0011f in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () at /lib64/libQtGui.so.4
#44 0x00007f5366e76532 in QETWidget::translateMouseEvent(_XEvent const*) () at /lib64/libQtGui.so.4
#45 0x00007f5366e74f2c in QApplication::x11ProcessEvent(_XEvent*) () at /lib64/libQtGui.so.4
#46 0x00007f5366e9cfb4 in x11EventSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQtGui.so.4
#47 0x00007f53616a5aeb in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#48 0x00007f53616a5e88 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#49 0x00007f53616a5f3c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#50 0x00007f5367f6da1e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtCore.so.4
#51 0x00007f5366e9d136 in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtGui.so.4
#52 0x00007f5367f3d261 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtCore.so.4
#53 0x00007f5367f3d5c5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtCore.so.4
#54 0x00007f53672cb75c in QDialog::exec() () at /lib64/libQtGui.so.4
#55 0x0000000000527934 in K3b::InteractionDialog::exec() ()
#56 0x00000000005118fd in K3b::MainWindow::slotWriteImage() ()
#57 0x0000000000512805 in K3b::MainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) [clone .part.41] ()
#58 0x00007f5367f5325c in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () at /lib64/libQtCore.so.4
#59 0x00007f5366df3792 in QAction::triggered(bool) () at /lib64/libQtGui.so.4
#60 0x00007f5366df5317 in QAction::activate(QAction::ActionEvent) () at /lib64/libQtGui.so.4
#61 0x00007f536724704d in QMenuPrivate::activateCausedStack(QList<QPointer<QWidget> > const&, QAction*, QAction::ActionEvent, bool) () at /lib64/libQtGui.so.4
#62 0x00007f536724ba09 in QMenuPrivate::activateAction(QAction*, QAction::ActionEvent, bool) () at /lib64/libQtGui.so.4
#63 0x00007f5368feff23 in KMenu::mouseReleaseEvent(QMouseEvent*) () at /lib64/libkdeui.so.5
#64 0x00007f5366e4d118 in QWidget::event(QEvent*) () at /lib64/libQtGui.so.4
#65 0x00007f536724f9db in QMenu::event(QEvent*) () at /lib64/libQtGui.so.4
#66 0x00007f5366df9efc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib64/libQtGui.so.4
#67 0x00007f5366e00abf in QApplication::notify(QObject*, QEvent*) () at /lib64/libQtGui.so.4
#68 0x00007f5368f27a1a in KApplication::notify(QObject*, QEvent*) () at /lib64/libkdeui.so.5
#69 0x00007f5367f3e70d in QCoreApplication::notifyInternal(QObject*, QEvent*) () at /lib64/libQtCore.so.4
#70 0x00007f5366e0011f in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () at /lib64/libQtGui.so.4
#71 0x00007f5366e768ca in QETWidget::translateMouseEvent(_XEvent const*) () at /lib64/libQtGui.so.4
#72 0x00007f5366e74f2c in QApplication::x11ProcessEvent(_XEvent*) () at /lib64/libQtGui.so.4
#73 0x00007f5366e9cfb4 in x11EventSourceDispatch(_GSource*, int (*)(void*), void*) () at /lib64/libQtGui.so.4
#74 0x00007f53616a5aeb in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#75 0x00007f53616a5e88 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#76 0x00007f53616a5f3c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#77 0x00007f5367f6da1e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtCore.so.4
#78 0x00007f5366e9d136 in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtGui.so.4
#79 0x00007f5367f3d261 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtCore.so.4
#80 0x00007f5367f3d5c5 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib64/libQtCore.so.4
#81 0x00007f5367f42ca9 in QCoreApplication::exec() () at /lib64/libQtCore.so.4
#82 0x000000000044473b in main ()

Reported using DrKonqi
Comment 1 Albert Astals Cid 2014-10-31 19:46:41 UTC
Can you reproduce this all the time? If so could you please run in a shell

strace -s 1000 k3b --nofork &> myfile

and try to make it crash again and the attach the contents of myfile?
Comment 2 Kevin Martin 2014-11-02 15:34:52 UTC
Created attachment 89402 [details]
Here are the last 2000 lines from an strace of a failure..

Here are the last 2000 lines from an strace of a failure..
Comment 3 Albert Astals Cid 2014-11-02 16:18:50 UTC
Thanks that was useful :)

This https://git.reviewboard.kde.org/r/120944/ should fix the crash
Comment 4 Albert Astals Cid 2014-11-03 21:11:48 UTC
Git commit 839f731e5940705afa1b9ea8c8dbb4678e7d4de9 by Albert Astals Cid.
Committed on 03/11/2014 at 21:09.
Pushed by aacid into branch '2.0'.

Don't increase iterator after it's already at the end

Don't increase it after it's already at the end. We are increasing the iterator inside of the loop, and as part of the for so it'll be past the end and the it != l.constEnd() will be true and we will crash.

Changed the code so that it only increases the iterator if we know it's not at the end already.

Did some stand-alone code that runs over

const char * processResult = "p1445\ncchrome\nf5\nf6\nf12\nf13\nf16\nf17\nf21\nf22\nf26\nf27\nf32\nf33\np1453\ncchrome\nf6\nf7\np1528\ncdbus-launch\nf8\np1530\ncenlightenment\nf5\nf6\nf10\nf11\nf34\nf37\nf38\np1533\ncefreetd\nf6\nf7\np1540\ncgvfsd\nf6\nf7\np1565\ncterminology\nf5\nf6\nf10\nf11\np1566\ncfirefox\nf10\nf11\nf12\nf13\nf14\nf15\nf22\nf23\nf161\nf162\np1619\ncenlightenment_f\nf5\nf6\np1631\nctempget\nf1\nf5\nf6\nf37\nf38\np1679\ncat-spi-bus-laun\nf5\nf6\np1736\ncplugin-containe\nf6\nf7\nf11\nf12\np1822\ncthunderbird\nf10\nf11\nf12\nf13\nf14\nf15\nf21\nf22\nf44\nf176\np2261\nckdeinit4\nf0\nf3\nf5\np2263\ncklauncher\nf0\nf3\nf4\nf5\nf6\nf10\nf11\np2265\nckded4\nf0\nf4\nf6\np2267\ncgam_server\nf6\nf7\np2346\nckuiserver\nf0\nf4\nf6\np2381\ncknotify4\nf0\nf4\nf6\np2633\nck3b\nf5\nf6\nf14\nf21\nf22\nf25\nf26\nf28\nf33\nf34\np2791\nclsof\nf0\nf1\nf2\nf4\nf5\np2792\nclsof\nf3\nf6\n";

And it crashed, now doesn't crash anymore
REVIEW: 120944
FIXED-IN: 2.0.3

M  +4    -1    src/k3blsofwrapper.cpp

http://commits.kde.org/k3b/839f731e5940705afa1b9ea8c8dbb4678e7d4de9