Bug 292522 - Digikam crashes on startup
Summary: Digikam crashes on startup
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Runtime (show other bugs)
Version: 2.5.0
Platform: MacPorts macOS
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-26 21:39 UTC by Jan Gosmann
Modified: 2018-08-30 17:47 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Gosmann 2012-01-26 21:39:25 UTC
Version:           2.5.0 (using KDE 4.7.4) 
OS:                OS X

Digikam 2.5.0 crashes on startup with OS X Lion. (Other KDE applications work.)


Reproducible: Always

Steps to Reproduce:
Start digikam.

Actual Results:  
crashes

Expected Results:  
does not crash

The console output:
digikam(3240)/KSharedDataCache ensureFileAllocated: This system misses support for posix_fallocate() -- ensure this partition has room for at least 10547296 bytes. 
digikam(3240)/KSharedDataCache: Unable to find an appropriate lock to guard the shared cache.  This *should* be essentially impossible. :( 
digikam(3240)/KSharedDataCache: Unable to perform initial setup, this system probably does not really support process-shared pthreads or semaphores, even though it claims otherwise. 
digikam(3240)/KSharedDataCache: Unable to unmap shared memory segment 0x10f3e7000 
2012-01-26 22:27:47.412 digikam[3240:7803] Can't open input server /Library/InputManagers/MultiClutchInputManager.bundle
QSqlDatabasePrivate::removeDatabase: connection 'ConnectionTest' is still in use, all queries will cease to work.
digikam(3240)/KSharedDataCache ensureFileAllocated: This system misses support for posix_fallocate() -- ensure this partition has room for at least 10547296 bytes. 
digikam(3240)/KSharedDataCache: Unable to find an appropriate lock to guard the shared cache.  This *should* be essentially impossible. :( 
digikam(3240)/KSharedDataCache: Unable to perform initial setup, this system probably does not really support process-shared pthreads or semaphores, even though it claims otherwise. 
digikam(3240)/KSharedDataCache: Unable to unmap shared memory segment 0x110900000 
digikam(3240)/kdecore (K*TimeZone*): KSystemTimeZones: ktimezoned initialize() D-Bus call failed:  "The name org.kde.kded was not provided by any .service files" 

Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
QKqueueFileSystemWatcherEngine::addPaths: open: Too many open files
QFileSystemWatcher: failed to add paths: [some path]
[lots of repititions for the previous two lines (as it seems at least once for every directory)]
digikam(3240)/digikam (core) Digikam::ImageInfoJob::slotResult: Failed to list url:  "" 
digikam(3240)/digikam (core) Digikam::ImageInfoJob::slotResult: Failed to list url:  "" 
QEventDispatcherUNIXPrivate(): Unable to create thread pipe: Too many open files
QEventDispatcherUNIXPrivate(): Can not continue without a thread pipe
Abort trap: 6
Comment 1 caulier.gilles 2012-01-27 05:43:42 UTC
DBUS for KDE is not initialized on your system :

D-Bus call failed:  "The name org.kde.kded was not provided by any .service
files"

Why ??? no idea. Wrong install, missing packages ?

Gilles Caulier
Comment 2 Jan Gosmann 2012-01-29 16:51:40 UTC
Oh, I missed that line. So I started kded manually and that line disappeared. However, the problem still persists and the output seems to be the same (except that one line).
Comment 3 caulier.gilles 2012-01-29 16:59:14 UTC
If you run another KDE program as Kate editor, you can also reproduce it ?

Gilles Caulier
Comment 4 Jan Gosmann 2012-01-29 17:18:38 UTC
I do not have Kate installed, but KMyMoney and Showfoto for example are working.
Comment 5 caulier.gilles 2012-01-29 20:32:12 UTC
I recommend to install kate and try again... Just to see...

Gilles Caulier
Comment 6 Jan Gosmann 2012-01-29 20:54:09 UTC
Kate is also working.
Comment 7 caulier.gilles 2012-01-29 21:42:44 UTC
There is no reason to see digKam not working at startup.

Since dbus must work on your computer now, the backtrace from the console still the same ?

Gilles Caulier
Comment 8 Jan Gosmann 2012-02-01 19:54:41 UTC
This is the new backtrace which seems to be pretty much the same:

digikam(3685)/KSharedDataCache ensureFileAllocated: This system misses support for posix_fallocate() -- ensure this partition has room for at least 10547296 bytes. 
digikam(3685)/KSharedDataCache: Unable to find an appropriate lock to guard the shared cache.  This *should* be essentially impossible. :( 
digikam(3685)/KSharedDataCache: Unable to perform initial setup, this system probably does not really support process-shared pthreads or semaphores, even though it claims otherwise. 
digikam(3685)/KSharedDataCache: Unable to unmap shared memory segment 0x117a8b000 
2012-02-01 20:37:41.864 digikam[3685:7803] Can't open input server /Library/InputManagers/MultiClutchInputManager.bundle
QSqlDatabasePrivate::removeDatabase: connection 'ConnectionTest' is still in use, all queries will cease to work.
digikam(3685)/KSharedDataCache ensureFileAllocated: This system misses support for posix_fallocate() -- ensure this partition has room for at least 10547296 bytes. 
digikam(3685)/KSharedDataCache: Unable to find an appropriate lock to guard the shared cache.  This *should* be essentially impossible. :( 
digikam(3685)/KSharedDataCache: Unable to perform initial setup, this system probably does not really support process-shared pthreads or semaphores, even though it claims otherwise. 
digikam(3685)/KSharedDataCache: Unable to unmap shared memory segment 0x11b98c000 
QKqueueFileSystemWatcherEngine::addPaths: open: Too many open files
QFileSystemWatcher: failed to add paths: [some path]
[lots of repititions for the previous two lines (as it seems at least once for
every directory)]
digikam(3685)/digikam (core) Digikam::ImageInfoJob::slotResult: Failed to list url:  "" 
digikam(3685)/digikam (core) Digikam::ImageInfoJob::slotResult: Failed to list url:  "" 
QEventDispatcherUNIXPrivate(): Unable to create thread pipe: Too many open files
QEventDispatcherUNIXPrivate(): Can not continue without a thread pipe
Abort trap: 6
Comment 9 Daniel Zuberbühler 2012-02-02 16:48:56 UTC
I get the same console output and crash on my system (OSX 10.7.2)
Comment 10 brad 2012-02-03 14:41:39 UTC
To those that see this bug, does this happen if there are no images in your library? I.e. can you try moving your library out of the way and start digikam with an empty library. 

I run digikam on OS X 10.6.x and as far as i can tell, digikam needs the patch in https://bugs.kde.org/show_bug.cgi?id=289330 to run properly (unless you have less than about 220 pictures). It hasn't run out-of-the-box on OS X 10.6.x since digikam-2.3.0.
Comment 11 Jan Gosmann 2012-02-04 22:12:58 UTC
I can start Digikam without a library.
Comment 12 brad 2012-02-04 22:30:37 UTC
Then it is likely related (or the exact same) the bug i mentioned above. 

Depending on your familiarity with macports you can try to patch it, but download the latest patch from the bug report i mentioned above (its a very simple patch), then,
  (NOTE: i did not expand BUILDPATH in step 2 since it is very long)

 $ port configure digikam
 $ cd /opt/local/var/macports/build/BUILDPATH/digikam/work/digikam-2.5.0/core
 $ patch -p1 < PATHTO/0001-disable-filewatching-on-OS-X-but-dir-watching-still-.patch
 $ port install digikam

good luck!
Comment 13 Daniel Zuberbühler 2012-02-05 13:20:55 UTC
Digikam runs fine when I start with an empty library.

If I understand correctly, with the patch digikam will watch only directories, not files.
But it would still be limited to watch a maximum of 255 directories, right?
I have > 702 directories in my library, so I assume digikam will still crash even with this patch.

Should I patch digikam to disable fs watching completely? Would it have other sideeffects besides not seeing new files on the fly?
Comment 14 brad 2012-02-05 15:38:26 UTC
On Feb 5, 2012, at 8:20 AM, Daniel Zuberbühler wrote:

> https://bugs.kde.org/show_bug.cgi?id=292522
> 
> 
> 
> 
> 
> --- Comment #13 from Daniel Zuberbühler <dani zubinet org>  2012-02-05 13:20:55 ---
> Digikam runs fine when I start with an empty library.
> 
> If I understand correctly, with the patch digikam will watch only directories,
> not files.
> But it would still be limited to watch a maximum of 255 directories, right?
> I have > 702 directories in my library, so I assume digikam will still crash
> even with this patch.
> 
yes, you're absolutely correct. 

> Should I patch digikam to disable fs watching completely? Would it have other
> sideeffects besides not seeing new files on the fly?
> 
yes. disabling fs watching on os x seems to be the way to go.
Comment 15 Daniel Zuberbühler 2012-02-05 21:32:25 UTC
Actually I did try running digikam patched with brad's patch.
It starts up properly, even with > 255 directories and I don't get any related error messages on the console.
I guess the file limit really only applies to files but not to directories.
Comment 16 Jan Gosmann 2012-03-24 16:42:44 UTC
Tried the patch from ticket #289330 and it solved the problem also for me.

*** This bug has been marked as a duplicate of bug 289330 ***
Comment 17 caulier.gilles 2018-08-30 17:47:47 UTC
Not reproducible with 6.0.0