Bug 178251

Summary: Crash (signal 6) when new user uses home dir
Product: [Applications] digikam Reporter: Mark Purcell <msp>
Component: Setup-DatabaseAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles, marcel.wiesweg
Priority: NOR    
Version: 0.10.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 7.6.0
Sentry Crash Report:
Attachments: screen shot

Description Mark Purcell 2008-12-20 04:54:10 UTC
Version:           0.10.0-beta7 (using Devel)
Compiler:          gcc version 4.3.2 (Debian 4.3.2-1) 
OS:                Linux
Installed from:    Compiled sources


When a new user starts digikam, and uses their $HOME dir (which isn't recommended) I get the following crash:

Application: digiKam (digikam), signal SIGABRT

Thread 1 (Thread 0xb494f6c0 (LWP 25932)):
[KCrash Handler]
#6  0xb7fca424 in __kernel_vsyscall ()
#7  0xb5b54640 in raise () from /lib/i686/cmov/libc.so.6
#8  0xb5b56018 in abort () from /lib/i686/cmov/libc.so.6
#9  0xb5df46cd in qt_message_output (msgType=QtFatalMsg, buf=0xbffe19f0 "ASSERT: \"d\" in file /home/mark/src/kde-extras/build-area/digikam-0.10.0~beta7/libs/database/databaseaccess.cpp, line 98")
    at global/qglobal.cpp:2102
#10 0xb5df4796 in qFatal (msg=0xb5f3c438 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2303
#11 0xb5df4825 in qt_assert (assertion=0xb757d0b8 "d", file=0xb7575904 "/home/mark/src/kde-extras/build-area/digikam-0.10.0~beta7/libs/database/databaseaccess.cpp", line=98)
    at global/qglobal.cpp:1872
#12 0xb74dfa48 in DatabaseAccess (this=0xbffe3abb) at /home/mark/src/kde-extras/build-area/digikam-0.10.0~beta7/libs/database/databaseaccess.cpp:98
#13 0xb74d56d2 in Digikam::CollectionManager::allLocations (this=0x9a65710) at /home/mark/src/kde-extras/build-area/digikam-0.10.0~beta7/libs/database/collectionmanager.cpp:874
#14 0x0826f43f in main (argc=1, argv=0xbffe3d84) at /home/mark/src/kde-extras/build-area/digikam-0.10.0~beta7/digikam/main.cpp:161


Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages digikam depends on:
ii  kdebase-runtime   4:4.1.85+svn898692-0r1 runtime components from the offici
ii  kdelibs5          4:4.1.85+svn898648-0r1 core libraries for all KDE 4 appli
ii  kdepimlibs5       4:4.1.85+svn898651-0r1 core libraries for KDE PIM 4 appli
ii  libc6             2.7-16                 GNU C Library: Shared libraries
ii  libgcc1           1:4.3.2-1              GCC support library
ii  libgphoto2-2      2.4.1-3                gphoto2 digital camera library
ii  libgphoto2-port0  2.4.1-3                gphoto2 digital camera port librar
ii  libjasper1        1.900.1-5.1            The JasPer JPEG-2000 runtime libra
ii  libjpeg62         6b-14                  The Independent JPEG Group's JPEG
ii  libkdcraw7        4:4.1.85+svn896592-0r1 Raw picture decoding C++ library (
ii  libkexiv2-7       4:4.1.85+svn896592-0r1 Qt like interface for the libexiv2
ii  libkipi6          4:4.1.85+svn896592-0r1 library for apps that want to use
ii  liblcms1          1.17.dfsg-1            Color management library
ii  libmarble4        4:4.1.85+svn898806-0r1 Marble globe widget library
ii  libphonon4        4:4.2.80+svn895355-0r1 Phonon multimedia framework for Qt
ii  libpng12-0        1.2.27-2               PNG library - runtime
ii  libqt4-dbus       4.4.3-1                Qt 4 D-Bus module
ii  libqt4-network    4.4.3-1                Qt 4 network module
ii  libqt4-qt3support 4.4.3-1                Qt 3 compatibility library for Qt
ii  libqt4-sql        4.4.3-1                Qt 4 SQL module
ii  libqt4-sql-sqlite 4.4.3-1                Qt 4 SQLite 3 database driver
ii  libqt4-svg        4.4.3-1                Qt 4 SVG module
ii  libqt4-xml        4.4.3-1                Qt 4 XML module
ii  libqtcore4        4.4.3-1                Qt 4 core module
ii  libqtgui4         4.4.3-1                Qt 4 GUI module
ii  libstdc++6        4.3.2-1                The GNU Standard C++ Library v3
ii  libtiff4          3.8.2-11               Tag Image File Format (TIFF) libra
ii  marble            4:4.1.85+svn898806-0r1 Marble globe and map widget
ii  phonon            4:4.2.80+svn895355-0r1 metapackage for Phonon multimedia
ii  zlib1g            1:1.2.3.3.dfsg-12      compression library - runtime
Comment 1 Marcel Wiesweg 2008-12-20 20:50:55 UTC
Is home used as database path or album  path?
What is the output of the "Root Album Path: " and "Database Path: " debug outputs on the console before the crash?
Comment 2 Marcel Wiesweg 2008-12-21 16:21:30 UTC
SVN commit 899772 by mwiesweg:

Ensure that no empty dbPath can be set

CCBUG: 178251

 M  +3 -0      albummanager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=899772
Comment 3 caulier.gilles 2008-12-22 09:17:50 UTC
Mark,

Are you seen comment #1 from Marcel ?

Also, test again with current implementation from svn...

Gilles Caulier
Comment 4 caulier.gilles 2009-01-12 14:28:21 UTC
Mark,

No news here ???

Gilles Caulier
Comment 5 Mark Purcell 2009-01-14 14:08:21 UTC
Created attachment 30236 [details]
screen shot

With beta8 I am unable to reproduce the crash.

However the dialog could be cleaned up...  See attached.
Comment 6 Marcel Wiesweg 2009-01-14 21:49:59 UTC
The default file path is taken from KGlobalSettings::picturesPath().
On OpenSuse this is empty; in this case $HOME/Pictures is suggested. If the global settings really want to return $HOME here, it is used.
(I see no more objection not to use $HOME if you really want, although it should not be the default; but see above about choosing the default)
Comment 7 Marcel Wiesweg 2009-01-14 22:23:50 UTC
SVN commit 911111 by mwiesweg:

Fix some usability problems with the FirstRun dialog:
- if errors occur, do not exit, but return to dialog
  (requires to reimplement KDialog::slotButtonPressed, default implementation will always accept after Ok)
- remove check to refuse using $HOME as album root. I think, if the user really wants,
  we are a free country. Any objections?
- When a directory is chosen for album root, change default database directory
  to this as well (unless user changed it before)

BUG: 178251

 M  +63 -24    digikamfirstrun.cpp  
 M  +5 -4      digikamfirstrun.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=911111