Re: Mysterious .app/Finder corruption?
Re: Mysterious .app/Finder corruption?
- Subject: Re: Mysterious .app/Finder corruption?
- From: Andy O'Meara <email@hidden>
- Date: Fri, 01 Apr 2011 16:35:36 -0500
Hi Joe, thanks a ton for writing -- I think I've already gotten a few more grey hairs from trying to figure this out.
On further experimentation, I've discovered that if I launch the app from the command line (from any dir), it runs properly (either using open -a foo.app or ./foo.app/Contents/MacOS/foo). If I simply double click the same app, it doesn't work -- argh Apple! I wish like hell I could provide more than "it doesn't work" but I can't repro it with the debugger attached (no idea why). The best I have is that the app seems to run ok, but when it loads our bundle and we use CFBundleGetFunctionPointerForName() to fetch code symbols, we keep getting NULL. Keep in mind that if the app is run from the command line or a different dir, this does not occur. This leads me to think the Finder/OS is somehow confused when it goes to fetch symbols from the bundle.
This app is only a 32-bit universal binary and the bundle is a 32+64 bit universal binary, so I tried building the app as a 64 bit universal binary but the problem persisted.
Will keep trying to crack this! Ugh, it just sucks to burn so much time on crap like this..
Thanks,
Andy
On Apr 1, 2011, at 3:28 PM, Joseph Chilcote wrote:
> On Thu, Mar 31, 2011 at 5:30 PM, Andy O'Meara
> <email@hidden> wrote:
>> Hey everyone,
>>
>> I've been trying to get insight into what appears to be an inane bug either within the OS X package installer or the Finder.
>>
>> We use a build script that builds all our .bundles and .apps and then calls package maker via the command line to make our .pkg. Our package creates a new dir in the Applications dir (if it doesn't already exist), and expands the .app into this directory. What's happening is that after the installer runs our package, our .app fails to load our bundle. Yet if I run the .app that the package was given (ie. if I run the app before it gets sucked into the pkg), the app runs fine -- it's as if somehow the .app created by the installer is somehow not right.
>
> Hi Andy,
>
> Not sure I follow what you mean by the app failing to load the bundle,
> but it could be that launchservices is not properly registering the
> app. I've seen this behavior when installing apps into a subdirectory
> of /Applications. I've been able to fix it by dropping a symlink in
> /Applications, or even simply navigating to the parent directory of
> the app itself and launching it from there. But it sounds like even
> that's not working for you. Also, since you can get it to work by
> launching the App before packaging it, have you tried trapping for
> what changes when you launch it on your build machine? Sounds like
> this problem exists even before it's being packaged.
>
> If I were you, I'd reduce the complexity of your package to its
> simplest state. Package just your App (after triple-checking the
> permissions) to install only into /Applications. Does that work?
> Include your pre-install script. Does that work? Add the
> subdirectory. Etc, etc. Perhaps this process will lay bare the
> problem.
>
> Best regards,
>
> --joe
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Installer-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden