Re: Program crashes when executed normally, but runs w/o trouble in the Debugger
Re: Program crashes when executed normally, but runs w/o trouble in the Debugger
- Subject: Re: Program crashes when executed normally, but runs w/o trouble in the Debugger
- From: Charlton Wilbur <email@hidden>
- Date: Fri, 1 Jul 2005 14:25:11 -0400
On Jul 1, 2005, at 2:09 PM, Lorance, Ted wrote:
However, now when the program is run normally, it decides that the
working directory is "/" instead of the correct value, and fails to
load the file. It does not crash - the error trap worked fine -
but it will not load the file, since the directory is wrong.
Apple does not guarantee what the working directory will be. As a
result, there is no "correct value," and so you're relying on
undocumented behavior. Specify your path explicitly in the code, or
use other methods to figure out where the file is and construct the
path. Don't rely on the working directory that the program inherits,
because (as you have noted) you can't.
Charlton
--
Charlton Wilbur
email@hidden
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden