Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: FMX on OSX: how to use the "Normal" Configuration?


This question is answered. Helpful answers available: 0. Correct answers available: 1.


Permlink Replies: 5 - Last Post: Sep 7, 2017 11:34 PM Last Post By: Hans Jakobsen
Hans Jakobsen

Posts: 103
Registered: 9/10/01
FMX on OSX: how to use the "Normal" Configuration?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 16, 2016 6:08 AM
I can run my application on OS X when Configuration is set to "Application Store", but when I set it to "Normal" it crashes on the Mac.
A "Problem Report" window shows with these key points:

MyApp quit unexpectedly
Exception Type: EXC_BAD_ACCESS (Code Signature Invalid)
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace CODESIGNING, Code 0x2

It looks like it is not codesigned, but in Delphi options I cannot choose a certificate for the "Normal" configuration.
Did I miss something?

I use Delphi 10.1 upd2 (but it also happened in previous versions) and OS X 10.12.1

PS. In addition to this I cannot debug on OS X, but that appears to be a known bug that is not yet fixed.

Edited by: Hans Jakobsen on Nov 16, 2016 3:09 PM

Fixed spell erroor

Eli M

Posts: 1,346
Registered: 11/9/13
Re: FMX on OSX: how to use the "Normal" Configuration?
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 20, 2016 9:30 PM   in response to: Hans Jakobsen in response to: Hans Jakobsen
Not sure on this. I don't have that combo of versions here yet.

Does it work in Normal mode if you do a blank app?
Hans Jakobsen

Posts: 103
Registered: 9/10/01
Re: FMX on OSX: how to use the "Normal" Configuration?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 21, 2016 12:39 AM   in response to: Eli M in response to: Eli M
Eli M wrote:
Does it work in Normal mode if you do a blank app?

Yes, it works with a blank app.
This shows that the main chain works, that you can run an app with the Normal configuration. The question is, what is causing my main app not to work?
Since my main app works with the "Application Store" configuration, I suppose I am not doing anything terrible wrong.

When checks the codesigning in the terminal ("codesign -dv --verbose=4 EmptyApp.app") it tells me for both apps that they are not signed at all (expected). I then thought it could be related to all the extra files I deploy inside the app bundle, so I tried to remove all of them, but the problem is the same, so the problem is in the executable.

Conclusion, I have an executable, which is not codesigned and should not be codesigned, but OS X terminates it because of a codesigning problem...
Mike Margerum

Posts: 590
Registered: 12/1/99
Re: FMX on OSX: how to use the "Normal" Configuration? [Edit]
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 22, 2016 8:09 AM   in response to: Hans Jakobsen in response to: Hans Jakobsen
Fixed spell erroor
I dont know if this is your problem but I had an issue where I needed to
sign the dylib inside the app to get it to work on the Mac.
Hans Jakobsen

Posts: 103
Registered: 9/10/01
Re: FMX on OSX: how to use the "Normal" Configuration? [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 22, 2016 11:44 PM   in response to: Mike Margerum in response to: Mike Margerum
Mike Margerum wrote:
I needed to sign the dylib inside the app to get it to work on the Mac.

I do have a custom dylib inside the bundle. As a part of localizing the cause of the error, I already tried to run my app without deploying this dylib and the problem was the same (still a CodeSign error).
Hans Jakobsen

Posts: 103
Registered: 9/10/01
Re: FMX on OSX: how to use the "Normal" Configuration?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 7, 2017 11:34 PM   in response to: Hans Jakobsen in response to: Hans Jakobsen
I found the reason and solution!

Last time it happened the problem was suddenly gone. Yesterday I got the problem again and discovered that deleting the .app bundle before running in Debug/Normal configuration solved the problem.

The problem happens when I have made a Release build/deploy, which rebuilds and signs the whole app bundle. When I afterwards run in "Normal" configuration, it does not rebuild the app bundle, but just deploys the unsigned executable into the signed bundle. This causes the error to happen.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02