Package: k3b Version: 0.12.17-2 Severity: normal Tags: patch upstream
k3b crashes with SIGSEGV upon changing the default for the external application which appears last in the configuration widget (vcdxrip in my case). Way to reproduce: 1. You must have at least two choices for the last external application, which means it has to be installed (I assume this will be vcdxrip, in general, i.e. install the vcdimager package which ships vcdxrip). It normally happens in current debian etch and sid that the application is listed twice, because of the /usr/bin/X11 -> /usr/bin symlink shipped by x11-common, which makes every application be listed as /usr/bin/(something) as well as /usr/bin/X11/(something). 2. Open the k3b menu: Settings -> Configure K3b... 3. Select Programs in the left section of the new window. The 'Programs' tab should be opened as default on the right. 4. Scroll all the way down the list of external application. 5. For the sake of example, let's assume that /usr/bin/X11/vcdxrip is selected as default for vcdxrip. Select the *other* choice, /usr/bin/vcdxrip in our example. The "Set Default" button becomes available. 6. Click on the "Set Default" button. This triggers the SIGSEGV. This is due to a missing check in src/option/k3bexternalbinwidget.cpp. Before setting the new default, in K3bExternalBinWidget::slotSetDefaultButtonClicked, the default flag is removed from every item in the list which belongs to the intended application. A QListViewItemIterator object is used to go through the list items. However, when the end of the list is reached, the object is set to 0 by the ++it; statement (see documentation for the QListViewItemIterator class). The condition in the while statement, used to check whether we've gone past the intended application, doesn't check for a 0, therefore trying to evaluate 0->parent(). I attach my patch to resolve the issue. This is an upstream bug, not resolved in the 0.12.x trunk or the 1.0 trunk as of now. If I haven't forwarded it in a -- System Information: Debian Release: testing/unstable APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.16-2-k7 Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8) Versions of packages k3b depends on: ii cdparanoia 3a9.8-14 An audio extraction tool for sampl ii kdebase-bin 4:3.5.4-2 core binaries for the KDE base mod ii kdelibs-data 4:3.5.4-3 core shared data for all KDE appli ii kdelibs4c2a 4:3.5.4-3 core libraries and binaries for al ii libacl1 2.2.41-1 Access control list shared library ii libart-2.0-2 2.3.17-1 Library of functions for 2D graphi ii libattr1 2.4.32-1 Extended attribute shared library ii libaudio2 1.8-2 The Network Audio System (NAS). (s ii libc6 2.3.6.ds1-4 GNU C Library: Shared libraries ii libdbus-1-2 0.62-4 simple interprocess messaging syst ii libdbus-qt-1-1c2 0.62-4 simple interprocess messaging syst ii libexpat1 1.95.8-3.2 XML parsing C library - runtime li ii libfontconfig1 2.3.2-7 generic font configuration library ii libfreetype6 2.2.1-2 FreeType 2 font engine, shared lib ii libgamin0 [libfam0] 0.1.7-4 Client library for the gamin file ii libgcc1 1:4.1.1-13 GCC support library ii libhal1 0.5.7.1-1 Hardware Abstraction Layer - share ii libice6 1:1.0.0-3 X11 Inter-Client Exchange library ii libidn11 0.6.5-1 GNU libidn library, implementation ii libjpeg62 6b-13 The Independent JPEG Group's JPEG ii libk3b2 0.12.17-2 The KDE cd burning application lib ii libmusicbrainz4c2a 2.1.4-1 Second generation incarnation of t ii libpng12-0 1.2.8rel-5.2 PNG library - runtime ii libqt3-mt 3:3.3.6-4 Qt GUI Library (Threaded runtime v ii libsm6 1:1.0.0-4 X11 Session Management library ii libstdc++6 4.1.1-13 The GNU Standard C++ Library v3 ii libx11-6 2:1.0.0-8 X11 client-side library ii libxcursor1 1.1.5.2-5 X cursor management library ii libxext6 1:1.0.0-4 X11 miscellaneous extension librar ii libxft2 2.1.8.2-8 FreeType-based font drawing librar ii libxi6 1:1.0.0-5 X11 Input extension library ii libxinerama1 1:1.0.1-4.1 X11 Xinerama extension library ii libxrandr2 2:1.1.0.2-4 X11 RandR extension library ii libxrender1 1:0.9.0.2-4 X Rendering Extension client libra ii libxt6 1:1.0.0-5 X11 toolkit intrinsics library ii mkisofs 5:1.0~pre4-1 Creates ISO-9660 CD-ROM filesystem ii wodim 5:1.0~pre4-1 command line CD writing tool ii zlib1g 1:1.2.3-13 compression library - runtime Versions of packages k3b recommends: ii cdrdao 1:1.2.1-7 records CDs in Disk-At-Once (DAO) ii dvd+rw-tools 6.1-3 DVD+-RW/R tools ii kcontrol 4:3.5.4-2 control center for KDE ii kdebase-kio-plugins 4:3.5.4-2 core I/O slaves for KDE ii vcdimager 0.7.23-3 A VideoCD (VCD) image mastering an -- no debconf information
--- src/option/k3bexternalbinwidget.cpp.orig 2006-08-23 09:31:52.000000000 +0200 +++ src/option/k3bexternalbinwidget.cpp 2006-09-09 13:44:47.000000000 +0200 @@ -284,7 +284,7 @@ // remove all default flags K3bExternalBinViewItem* bi = (K3bExternalBinViewItem*)item->parentProgramItem()->firstChild(); QListViewItemIterator it( bi ); - while( it.current()->parent() == item->parentProgramItem() ) { + while( it.current() && it.current()->parent() == item->parentProgramItem() ) { ((K3bExternalBinViewItem*)it.current())->setDefault(false); ++it; }