Re: different application behaviour under different startup modes ...
Re: different application behaviour under different startup modes ...
- Subject: Re: different application behaviour under different startup modes ...
- From: vinai <email@hidden>
- Date: Thu, 7 May 2009 09:07:22 -0700 (PDT)
--- On Thu, 5/7/09, I. Savant <email@hidden> wrote:
> From: I. Savant <email@hidden>
> To: "vinai" <email@hidden>
> Cc: email@hidden
> Date: Thursday, May 7, 2009, 9:59 AM
>
> On Thu, May 7, 2009 at 10:53 AM, vinai <email@hidden> wrote:
>
>> However, when I try to launch the application from
>> either double-click in the finder, or trying to open the
>> application folder from a terminal command line, I get the
>> message about "The application ... quit unexpectedly.
>> Mac OS X and other applications are not affected. ..."
>> And when I hit the relaunch button here - the application
>> launches and behaves just as it did from "Build and Run"
>> from within Xcode - just fine ...
>
> Strange. Try doing a "clean", then rebuild and see if the same thing
> happens. If it does, post the crash report to the list so we can
> actually see what's going on.
The clean and rebuilds did not help, but the tip about the crash log did. I saw what function was being called. The confusing thing to me was that particular function (that was causing the crash), should not have been called. I checked for the number of command line arguments (argc value). If it was greater than 1, it should not have called the section of code that caused the crash. That section is reserved for code when this app is run in command line mode.
It seems that Xcode and the Relaunch button from the crash dialog box launch the application almost like one would from the command line, whereas launching from the Finder GUI appends another argument so the value of argc under those conditions is 2 ... Strange ...
Thanks for the tips!
cheers
vinai
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden