Skip navigation.
 
mlRe: Launching Cocoa Application externally
FROM : Stéphane
DATE : Wed May 14 15:55:42 2008

On May 14, 2008, at 3:48 PM, Yann Disser wrote:

> When I launch my Cocoa application from Finder instead of from 
> within XCode, it reports a crash. All my other Projects seem to 
> work well from outside XCode...
>
> I tried to debug my App by changing the main-function to
>
> int main(int argc, char *argv[])
> {
>  [[NSString stringWithString:@"hier"] writeToFile:@"debug.txt" 
> atomically:YES];
>  exit(0);
>    return NSApplicationMain(argc,  (const char **) argv);
> }
>
> From within XCode this writes the file "debug.txt". From Finder it 
> doesn't. The same behaviour occurs with my other apps.


Where is "debug.txt" supposed to be created according to you?

> Maybe someone has an idea why my App crashes when launches from 
> Finder/Terminal and runs perfectly from within XCode?


There's a bug in your code or in your Info.plist.

Related mailsAuthorDate
mlLaunching Cocoa Application externally Yann Disser May 14, 15:48
mlRe: Launching Cocoa Application externally Stéphane May 14, 15:55
mlRe: Launching Cocoa Application externally Jean-Daniel Dupas May 14, 16:20
mlRe: Launching Cocoa Application externally Jens Alfke May 14, 16:47
mlRe: Launching Cocoa Application externally Yann Disser May 14, 17:13
mlRe: Launching Cocoa Application externally Andy Lee May 14, 17:30
mlRe: Launching Cocoa Application externally Stuart Malin May 14, 19:56
mlRe: Launching Cocoa Application externally Jean-Daniel Dupas May 14, 20:55
mlRe: Launching Cocoa Application externally Yann Disser May 15, 18:42
mlRe: Launching Cocoa Application externally Jean-Daniel Dupas May 15, 18:48
mlRe: Launching Cocoa Application externally Sherm Pendley May 15, 18:56
mlRe: Launching Cocoa Application externally Jens Alfke May 15, 20:45
mlRe: Launching Cocoa Application externally Douglas Davidson May 15, 20:49