Bug 465381

Summary: digiKam (and Showfoto) crashes on start on MacOS 10.13.
Product: [Applications] digikam Reporter: Matt P. <mattp>
Component: Showfoto-CoreAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: crash CC: caulier.gilles, metzpinguin
Priority: NOR    
Version: 7.9.0   
Target Milestone: ---   
Platform: macOS (DMG)   
OS: macOS   
Latest Commit: Version Fixed In: 8.1.0
Sentry Crash Report:
Attachments: Standard MacOS crash report (startup DigiKam)
Standard MacOS crash report (startup ShowPhoto)
Running DigiKam 7.10 on MacOS 10.13. (screenshot of message)
Matthias Pohlig.vcf

Description Matt P. 2023-02-06 17:10:05 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

Fresh install of DigiKam on MacOS 10.13.

First start up (and subsequents) , gives error of both Digikam and Showfoto Apps:

--------
Abbreviated startup / crash backtrace:
--------
Process:               digikam [58022]
Path:                  /Applications/digiKam.org/digikam.app/Contents/MacOS/digikam
Identifier:            org.digiKam
Version:               7.9.0 (7.9.0)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           digikam [58022]
User ID:               501

Date/Time:             2023-02-06 17:39:40.121 +0100
OS Version:            Mac OS X 10.13.6 (17G14042)
Report Version:        12
Anonymous UUID:        0710C71C-A9E8-8EDA-6445-B4B05DFBC99A

Sleep/Wake UUID:       008D7890-B7F7-4125-A23E-BBF6373AF3EC

Time Awake Since Boot: 3100000 seconds
Time Since Wake:       2500 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    DYLD, [0x1] Library missing

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
  Library not loaded: @rpath/lib/librav1e.0.5.1.dylib
  Referenced from: /Applications/digiKam.org/digikam.app/Contents/lib/libavcodec.58.dylib
  Reason: no suitable image found.  Did find:
	/Applications/digiKam.org/digikam.app/Contents/MacOS/../lib/librav1e.0.5.1.dylib: cannot load 'librav1e.0.5.1.dylib' (load command 0x80000034 is unknown)

Binary Images:
       0x1078ba000 -        0x1078c9ff3 +org.digiKam (7.9.0 - 7.9.0) <4EB3CE8D-4A8A-3E60-908D-5D2B18C8BF01> /Applications/digiKam.org/digikam.app/Contents/MacOS/digikam
       0x1078d3000 -        0x107912ff7 +libMagick++-7.Q16.5.dylib (0) <665E5D61-5751-35AE-BCF3-C251C6D5C772> /Applications/digiKam.org/digikam.app/Contents/lib/libMagick++-7.Q16.5.dylib
       0x107967000 -        0x107cd2ff7 +libMagickCore-7.Q16.10.dylib (0) <6945CFFA-44CC-3F75-82D4-11F6784880C9> /Applications/digiKam.org/digikam.app/Contents/lib/libMagickCore-7.Q16.10.dylib
Comment 1 Maik Qualmann 2023-02-06 17:29:34 UTC
Is there more of the crash log? It crashes in thread 0, but it's not listed. Can you post a full log?

Maik
Comment 2 Matt P. 2023-02-07 10:56:27 UTC
Created attachment 156025 [details]
Standard MacOS crash report (startup DigiKam)
Comment 3 Matt P. 2023-02-07 10:57:50 UTC
Created attachment 156026 [details]
Standard MacOS crash report (startup ShowPhoto)

MacOS crash report starting up showPhoto (bundled APP in DigiKAM)
Comment 4 Matt P. 2023-02-07 11:00:58 UTC
Sorry for the delay, I had no access to the Mac earlier.

I have attached the two "full" crash reports (as generated by MacOS), both from the startup of DigiKam as well as from starting up "ShowPhoto" which was bundled with the DigiKam install package.

Hope that gives more insight - will gladly post more info if needed, as soon as you give me some  rough idea what you need.
Comment 5 Maik Qualmann 2023-02-09 20:37:18 UTC
Hmm, it looks like a library of FFmpeg is missing. Can the problem also be reproduced with the upcoming digiKam-7.10.0 from here:

https://files.kde.org/digikam/

Maik
Comment 6 Matt P. 2023-02-10 09:54:20 UTC
(In reply to Maik Qualmann from comment #5)
> Hmm, it looks like a library of FFmpeg is missing. Can the problem also be
> reproduced with the upcoming digiKam-7.10.0 from here:
> Maik

Hello Maik, 
It seems we are running in a little deadlock here. I installed 7.10. as instructed, but now this version says 
"You cant run this version of the application. You have MacOS 10.13.6. The application requires MacOS 10.15. or later"
(see attached screenshot).

Now, that's a pity because I cannot upgrade this Mac easily - the hardware, despite still working fine, is from 2009 and "MacOS 10.13. High Sierra" is the latest I can get / is supported.
I was confident it could work because the digiKam Homepage states that MacOS 10.13. is OK, but that seems to be no longer the case with DigiKam 7.10.
Comment 7 Matt P. 2023-02-10 09:55:50 UTC
Created attachment 156122 [details]
Running DigiKam 7.10 on MacOS 10.13. (screenshot of message)

Running DigiKam 7.10 on MacOS 10.13. (screenshot of message)
Comment 8 caulier.gilles 2023-02-10 09:57:54 UTC
digiKam <-> macOS compatibility is explained in online documentation : https://docs.digikam.org/en/getting_started/installation.html#digikam-on-macos

Gilles Caulier
Comment 9 Matt P. 2023-02-10 11:37:05 UTC
(In reply to caulier.gilles from comment #8)
> digiKam <-> macOS compatibility is explained in online documentation :
> https://docs.digikam.org/en/getting_started/installation.html#digikam-on-
> macos
> 
> Gilles Caulier

Hello Gilles, Hello Maik, 

after digging deeper into this, I found a hint in GITLAB where the same effect was reported against GIMP two month ago.
( https://gitlab.gnome.org/GNOME/gimp/-/issues/8930 )
I have invested an hour and tried the following:

- Installed Xcode 9.0 on this Mac
- Installed Macports 2.8 (latest avail for High Sierra)
- got librav1e through MacPorts ("sudo port install rav1e" )

This gave me librav1e (Version0.6.3) in /opt/local/lib
- I reinstalled (after removing Version 7.10) DigiKam 7.09)
- As DigiKam doesn't seem to be built with version-independent symlinks ("librav1e.dylib") I did a hard copy of this file to the 
   librav1e.0.5.1.dylib in (in /digiKam.org/digikam.app/Contents/lib -> sudo cp /opt/local/lib/librav1e.0.6.3.dylib librav1e.0.5.1.dylib)
(bad,bad,bad)

Now ShowPhoto and DigiKam both start up succesfully !
I know that this is not a clean solution, I will have to think over my usage of this old iron anyway.
I just wanted to let you (and the community) know how it can be fixed if "in deep despair".

You may close this, if you like - thanks for all your efforts, anyway.

Best
Matt
Comment 10 Maik Qualmann 2023-02-10 12:17:00 UTC
Hmm, interesting, I just don't understand why digiKam-7.9.0 is running for other macOS users. We have a MySQL problem, but digiKam starts. If the librav1e is missing in the bundle, the problem would have to occur with everyone.

Maik
Comment 11 caulier.gilles 2023-02-10 13:06:52 UTC
Hi Maik,

Yes you right a missing dependency will break application startup for everybody.

I will double check the bundle deps-check script this week end.

Gilles
Comment 12 caulier.gilles 2023-02-10 13:10:58 UTC
A quick verification of the bundle log published online give :

  Copying /opt/digikam.org.x86_64/lib/libpcre2-8.0.dylib to /Users/gilles/Devel/7.x/project/bundles/macports//Applications/digiKam.org/lib/
  Copying /opt/digikam.org.x86_64/lib/libpcre2-posix.3.dylib to /Users/gilles/Devel/7.x/project/bundles/macports//Applications/digiKam.org/lib/
  Copying /opt/digikam.org.x86_64/lib/libpixman-1.0.dylib to /Users/gilles/Devel/7.x/project/bundles/macports//Applications/digiKam.org/lib/
  Copying /opt/digikam.org.x86_64/lib/libpng16.16.dylib to /Users/gilles/Devel/7.x/project/bundles/macports//Applications/digiKam.org/lib/
  Copying /opt/digikam.org.x86_64/lib/libpostproc.55.dylib to /Users/gilles/Devel/7.x/project/bundles/macports//Applications/digiKam.org/lib/
  Copying /opt/digikam.org.x86_64/lib/libpsl.5.dylib to /Users/gilles/Devel/7.x/project/bundles/macports//Applications/digiKam.org/lib/
  Copying /opt/digikam.org.x86_64/lib/librav1e.0.6.dylib to /Users/gilles/Devel/7.x/project/bundles/macports//Applications/digiKam.org/lib/

^^^^^^

So the lib is well packaged in the bundle.

7.x logs are there : https://files.kde.org/digikam/build.logs/macos/
8.x logs are there : https://files.kde.org/digikam/unstable/build.logs/macos/

Gilles
Comment 13 Matt P. 2023-02-10 15:39:42 UTC
(In reply to caulier.gilles from comment #12)
> A quick verification of the bundle log published online give :
> 
(....)
>   Copying /opt/digikam.org.x86_64/lib/librav1e.0.6.dylib to
> /Users/gilles/Devel/7.x/project/bundles/macports//Applications/digiKam.org/
> lib/
> 
> ^^^^^^
> 
> So the lib is well packaged in the bundle.
> 
> 7.x logs are there : https://files.kde.org/digikam/build.logs/macos/
> 8.x logs are there : https://files.kde.org/digikam/unstable/build.logs/macos/
> 
> Gilles

Hello Gilles,
This looks a bit funny to me now.
I installed / downloaded from Mirror FH Essingen and checked the checksum alright.
All I get after installation is librav.0.5.1.e.

It seem that the snippet you cited is from DigiKam 7.10, as it also states in the header "Target OSX minimal version: 10.15".
I agree this cannot work on my Mac.
The log for the 7.9.0 seems to be the one that is named "build_macports.full.log.gz" (unchanged since last march , anyway).
And this one shows librav1e.0.5.1 as being included.
------------------------------------------------------------------------------------------------------------------------------
P.S.
I checked both librav versions with otool -L and neither does give an error, though ?

(The one I copied from MacPorts /opt/local/lib under the "wrong" name):
librav1e.0.5.1.dylib:  
	/opt/local/lib/librav1e.0.6.dylib (compatibility version 0.6.0, current version 0.6.3)
	/opt/local/lib/libiconv.2.dylib (compatibility version 9.0.0, current version 9.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
mp@iMac/Applications/digiKam.org/digikam.app/Contents/lib: otool -L librav1e.0.5.1.dylib_orig 

The original file from digiKam package
librav1e.0.5.1.dylib_orig:
	/opt/digikam.org.x86_64/lib/librav1e.0.5.1.dylib (compatibility version 0.0.0, current version 0.5.1)
	/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.100.3)
	/usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 1.0.0)

From my limited knowledge, I would assume the first line of the second block is the problem: 
librav1e....   loads librav1e (itself ? It's  not a symlink, but a full binary file ?) from /opt/digikam.org/ -  this folder does not exist, DigiKam has installed itself in  /Applications/digikam.org/Contents/  ????
Comment 14 caulier.gilles 2023-04-19 05:39:23 UTC
Hi Matt,

This file is solved with 8.0.0 just released ?

Gilles Caulier
Comment 15 Matt P. 2023-04-19 10:13:14 UTC
Created attachment 158211 [details]
Matthias Pohlig.vcf

    Hi Gilles, As I am still on Mac OS 10.13 (and the old machine can't
   get anything newer), it will not be possible to install digiKam 8.0
   there.(I tried 7.10 already, and the installer denied that). I'd
   propose that we leave it with that, and close the bug.Seems I need to
   get a newer machine :-) Best,Matt. *Gesendet:* Mittwoch, 19. April
   2023 um 07:39 Uhr
   *Von:* bugzilla_noreply@kde.org
   *An:* mattp@web.de
   *Betreff:* [digikam] [Bug 465381] DigiKam (and Showfoto) crashes on
   start on MacOS 10.13https://bugs.kde.org/show_bug.cgi?id=465381

   --- Comment #14 from caulier.gilles@gmail.com ---
   Hi Matt,

   This file is solved with 8.0.0 just released ?

   Gilles Caulier

   --
   You are receiving this mail because:
   You reported the bug.
Comment 16 caulier.gilles 2023-04-19 10:50:45 UTC
macOS requirements for digiKam is listed here :

https://docs.digikam.org/en/getting_started/installation.html#digikam-on-macos

You needs at least macOS 10.15 for digiKam >= 7.10.0

Gilles Caulier