Hello again,

I further investigated the issue and could figure that

1.) macdeployqt adds an invalid signature to the binary:

codesign --verify --deep --strict --verbose=2 ./camera.app
./camera.app: invalid signature (code or signature have been modified)

This is why the app crashes. Thus, the crash it not due to the deployment of 
libs but due to the invalid signature.


2.) My signing call:

codesign --options=runtime --deep ./camera.app -s "Developer ID Application: 
AlexC (xzy)"

did not sign the plugins in contradiction to how it worked on my older Intel 
Mac which is why the signature did not work out but I could resolve it my 
adding the --force flag:

codesign --options=runtime --deep --force ./camera.app -s "Developer ID 
Application: AlexC (xzy)"


Afterwards my issue was resolved.

Thanks for your support and inspiration,
best

Alex

--
http://www.carot.de
Email : alexan...@carot.de
Tel.: +49 (0)177 5719797


> Gesendet: Sonntag, 1. Dezember 2024 um 08:08
&gt; Von: coroberti <corobe...@gmail.com>
&gt; An: "Alexander Carôt" <alexander_ca...@gmx.net>
&gt; CC: interest@qt-project.org
&gt; Betreff: Re: Re: [Interest] crahs with macdeployqt
&gt;
&gt; Dear Alexander,
&gt; Correct.
&gt; From my experience, signing issues can propagate to crashes.
&gt; 
&gt; My code signing line is:
&gt; codesign --deep -o runtime -f -vv --entitlements ./entitlements.plist
&gt; --preserve-metadata=identifier,entitlements,requirements,runtime
&gt; --timestamp -s "Developer ID Application: X"
&gt; 
&gt; in entitlements.plist
&gt; <!--?xml version="1.0" encoding="utf-8"?-->
&gt; <plist version="1.0">
&gt;     <dict>
&gt;         <key>com.apple.security.automation.apple-events</key>
&gt;         <true>
&gt;     <key>com.apple.security.files.user-selected.read-write</key>
&gt;     <true>
&gt;     </true></true></dict>
&gt; </plist>
&gt; 
&gt; I hope this has help.
&gt; 
&gt; Kind regards,
&gt; Robert Iakobashvili
&gt; ............................
&gt; On Fri, Nov 29, 2024 at 6:04 PM Alexander Carôt <alexander_ca...@gmx.net> 
wrote:
&gt; &gt;
&gt; &gt; Hi Robert,
&gt; &gt;
&gt; &gt; &gt;&gt;you are not missing deep signing after macdeployqt, aren't 
you?
&gt; &gt;
&gt; &gt; in fact I did not sign the binary because I had a problem with the 
signing itself: If I sign the camera.app example via:
&gt; &gt;
&gt; &gt; codesign --options=runtime --deep ./camera.app -s "Developer ID 
Application: AlexC (xzy)"
&gt; &gt;
&gt; &gt; and then check via
&gt; &gt;
&gt; &gt; codesign --verify --deep --strict --verbose=2 ./camera.app
&gt; &gt;
&gt; &gt; I get
&gt; &gt;
&gt; &gt; ./camera.app: invalid signature (code or signature have been modified)
&gt; &gt; In subcomponent: 
/Users/soulalex/Qt6_8/Examples/Qt-6.8.0/multimedia/camera/camera.app/Contents/PlugIns/imageformats/libqgif.dylib
&gt; &gt; In architecture: arm64
&gt; &gt;
&gt; &gt; It had been workling for years on an older Intel Mac but just 
recently I updated to an M1 and here the problem with the signature came up.
&gt; &gt;
&gt; &gt; So – does macdeployqt without signing lead to a crash in any case and 
my problem is maybe purely related to a codesign issue ?
&gt; &gt;
&gt; &gt; Best
&gt; &gt;
&gt; &gt; Alex
&gt; &gt;
&gt; &gt; --
&gt; &gt; http://www.carot.de
&gt; &gt; Email : alexan...@carot.de
&gt; &gt; Tel.: +49 (0)177 5719797
&gt; &gt;
&gt; &gt;
&gt; &gt; &gt; Gesendet: Freitag, 29. November 2024 um 09:03
&gt; &gt; &gt; Von: coroberti <corobe...@gmail.com>
&gt; &gt; &gt; An: "Alexander Carôt" <alexander_ca...@gmx.net>
&gt; &gt; &gt; CC: "interest@qt-project.org" <interest@qt-project.org>
&gt; &gt; &gt; Betreff: Re: [Interest] crahs with macdeployqt
&gt; &gt; &gt;
&gt; &gt; &gt; Alexander,
&gt; &gt; &gt; Additionally to Hamish's suggestion,
&gt; &gt; &gt; you are not missing deep signing after macdeployqt, aren't you?
&gt; &gt; &gt;
&gt; &gt; &gt; Kind regards,
&gt; &gt; &gt; Robert Iakobashvili
&gt; &gt; &gt; ............................
&gt; &gt; &gt;
&gt; &gt; &gt; On Fri, Nov 29, 2024 at 8:49 AM Hamish Moffatt via Interest
&gt; &gt; &gt; <interest@qt-project.org> wrote:
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Ouch. Check out this thread I found by searching on the 
missing path text: https://developer.apple.com/forums/thread/764315
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Hamish
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Sent from Nine
&gt; &gt; &gt; &gt; ________________________________
&gt; &gt; &gt; &gt; From: Alexander Carôt <alexander_ca...@gmx.net>
&gt; &gt; &gt; &gt; Sent: Friday, November 29, 2024 17:42
&gt; &gt; &gt; &gt; To: Hamish Moffatt; interest@qt-project.org
&gt; &gt; &gt; &gt; Subject: Aw: Re: [Interest] crahs with macdeployqt
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt;&gt;&gt; What does the crash log say?
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; This is it – looks it's related to a path and/or code 
signature issue:
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Exception Type:  EXC_BAD_ACCESS (SIGKILL (Code Signature 
Invalid))
&gt; &gt; &gt; &gt; Exception Subtype: UNKNOWN_0x32 at 0x0000000100978000
&gt; &gt; &gt; &gt; Exception Codes: 0x0000000000000032, 0x0000000100978000
&gt; &gt; &gt; &gt; VM Region Info: 0x100978000 is in 0x100978000-0x100998000;  
bytes after start: 0  bytes before end: 131071
&gt; &gt; &gt; &gt;       REGION TYPE                    START - END         [ 
VSIZE] PRT/MAX SHRMOD  REGION DETAIL
&gt; &gt; &gt; &gt;       UNUSED SPACE AT START
&gt; &gt; &gt; &gt; ---&gt;  __TEXT                      100978000-100998000    
[  128K] r-x/r-x SM=COW  /main_executable_path_missing
&gt; &gt; &gt; &gt;       __DATA_CONST                100998000-10099c000    [  
 16K] rw-/rw- SM=COW  /main_executable_path_missing
&gt; &gt; &gt; &gt; Termination Reason: CODESIGNING 2 Invalid Page
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Triggered by Thread:  0
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Thread 0 Crashed:
&gt; &gt; &gt; &gt; 0   dyld_path_missing                           0x100cf21e4 
0x100cf0000 + 8676
&gt; &gt; &gt; &gt; 1   dyld_path_missing                           0x100cf426c 
0x100cf0000 + 17004
&gt; &gt; &gt; &gt; 2   dyld_path_missing                           0x100d3e6fc 
0x100cf0000 + 321276
&gt; &gt; &gt; &gt; 3   dyld_path_missing                           0x100cf5e3c 
0x100cf0000 + 24124
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Thread 0 crashed with ARM Thread State (64-bit):
&gt; &gt; &gt; &gt;     x0: 0x0000000100978000   x1: 0x000000016f487558   x2: 
0x000000016f487500   x3: 0x0000000100cf1e24
&gt; &gt; &gt; &gt;     x4: 0x0000000000000001   x5: 0x0000000000000073   x6: 
0x0000000000000000   x7: 0x0000000000000e60
&gt; &gt; &gt; &gt;     x8: 0x000000016f487538   x9: 0x0000000100d77458  x10: 
0x0000000100d61000  x11: 0x0000000100d6ea56
&gt; &gt; &gt; &gt;    x12: 0x0000000000000065  x13: 0x0000000000000073  x14: 
0x000000000004bca0  x15: 0x0000000000000000
&gt; &gt; &gt; &gt;    x16: 0x0000000100cf430c  x17: 0x6ae100016f487500  x18: 
0x0000000000000000  x19: 0x000000016f487558
&gt; &gt; &gt; &gt;    x20: 0x0000000100978000  x21: 0x000000016f487500  x22: 
0x000000016f487840  x23: 0x0000000000000000
&gt; &gt; &gt; &gt;    x24: 0x0000000000000000  x25: 0x0000000000000000  x26: 
0x0000000000000000  x27: 0x0000000000000000
&gt; &gt; &gt; &gt;    x28: 0x0000000000000000   fp: 0x000000016f4874f0   lr: 
0x0000000100cf426c
&gt; &gt; &gt; &gt;     sp: 0x000000016f487460   pc: 0x0000000100cf21e4 cpsr: 
0x80001000
&gt; &gt; &gt; &gt;    far: 0x0000000100978000  esr: 0x92000007 (Data Abort) 
byte read Translation fault
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Binary Images:
&gt; &gt; &gt; &gt;        0x100cf0000 -        0x100d73fff dyld_path_missing 
(*) &lt;40bedd20-da23-3b70-a9c2-a1c68a738762&gt; /dyld_path_missing
&gt; &gt; &gt; &gt;        0x100978000 -        0x100997fff 
main_executable_path_missing (*) <cfe71e9e-9cc2-3553-bbe2-f2ed3a87dd7a> 
/main_executable_path_missing
&gt; &gt; &gt; &gt;                0x0 - 0xffffffffffffffff ??? (*) 
&lt;00000000-0000-0000-0000-000000000000&gt; ???
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; --
&gt; &gt; &gt; &gt; http://www.carot.de
&gt; &gt; &gt; &gt; Email : alexan...@carot.de
&gt; &gt; &gt; &gt; Tel.: +49 (0)177 5719797
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; Gesendet: Donnerstag, 28. November 2024 um 22:53
&gt; &gt; &gt; &gt; &gt; Von: "Hamish Moffatt via Interest" 
<interest@qt-project.org>
&gt; &gt; &gt; &gt; &gt; An: interest@qt-project.org
&gt; &gt; &gt; &gt; &gt; Betreff: Re: [Interest] crahs with macdeployqt
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; On 29/11/24 07:01, Alexander Carôt via Interest wrote:
&gt; &gt; &gt; &gt; &gt; &gt; Hello all,
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; I have a strange effect with Qt6.8 on a Mac M1 
(with macOS 15.0.1) regarding macdeployqt.
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; Whatever binary I use (including the examples 
such as “camera” in multimedia) it crashes after running macdeployqt on it.
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; &gt; Before I probably reinstall Qt (or maybe an older 
version of it) I wonder if you have better idea to approach this issue.
&gt; &gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; What does the crash log say?
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; Hamish
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; _______________________________________________
&gt; &gt; &gt; &gt; &gt; Interest mailing list
&gt; &gt; &gt; &gt; &gt; Interest@qt-project.org
&gt; &gt; &gt; &gt; &gt; https://lists.qt-project.org/listinfo/interest
&gt; &gt; &gt; &gt; &gt; 
</interest@qt-project.org></cfe71e9e-9cc2-3553-bbe2-f2ed3a87dd7a>
&gt; &gt; &gt; &gt; _______________________________________________
&gt; &gt; &gt; &gt; Interest mailing list
&gt; &gt; &gt; &gt; Interest@qt-project.org
&gt; &gt; &gt; &gt; https://lists.qt-project.org/listinfo/interest
&gt; &gt; &gt; 
</alexander_ca...@gmx.net></interest@qt-project.org></interest@qt-project.org></alexander_ca...@gmx.net></corobe...@gmail.com>
&gt; </alexander_ca...@gmx.net></alexander_ca...@gmx.net></corobe...@gmail.com>
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to