Cocoa Newbie Crash Question
Cocoa Newbie Crash Question
- Subject: Cocoa Newbie Crash Question
- From: James Masasaki <email@hidden>
- Date: Sun, 26 Oct 2003 18:34:45 -0800
I have a very simple Cocoa/IB app that crashes and dies on startup.
All I want to do is start the app and put up one single alert. Here
is my main.m file:
#import <Cocoa/Cocoa.h>
#include <Foundation/Foundation.h>
int main( int argc, const char *argv[] )
{
NSAutoreleasePool *pool = NULL;
pool = [[NSAutoreleasePool alloc] init];
NSRunCriticalAlertPanel( @"This is an example of NSCriticalAlertPanel",
@"Alerts are surprisingly easy in Cocoa.",
@"",
@"",
@"OK",
nil,
nil );
[ pool release ];
return NSApplicationMain( argc, argv );
}
This is a basic Cocoa app created using Project Builder's "Cocoa
Application" template running under 10.2. No other modifications have
been made to the project.
What am I doing wrong?
Here is the crash log from Console:
**********
Date/Time: 2003-10-26 18:17:18 -0800
OS Version: 10.2.7 (Build 6S80)
Host: G4
Command: StorageTest
PID: 981
Exception: EXC_BREAKPOINT (0x0006)
Code[0]: 0x00000001Code[1]: 0x97e5497c
Thread 0 Crashed:
#0 0x97e5497c in _NSRaiseError
#1 0x97e70204 in -[NSAssertionHandler
handleFailureInMethod:object:file:lineNumber:description:]
#2 0x9309ed1c in -[NSView lockFocus]
#3 0x930c1bf0 in _NXAllocateImageCache
#4 0x93115210 in -[NSCachedImageRep
_initWithSize:depth:separate:alpha:allowDeep:]
#5 0x930ccee8 in -[NSImage lockFocus]
#6 0x930f43e8 in -[NSImage _expandRep:]
#7 0x93091f40 in -[NSImage _expand]
#8 0x930e0958 in -[NSImage copyWithZone:]
#9 0x9317adf0 in -[NSAlert
buildAlertStyle:title:message:first:second:third:args:]
#10 0x933bd288 in _NXDoLocalRunAlertPanel
#11 0x933730bc in NSRunCriticalAlertPanel
#12 0x00003cd0 in main (main.m:20)
#13 0x000039ec in _start (crt.c:267)
#14 0x0000386c in start
PPC Thread State:
srr0: 0x97e5497c srr1: 0x0002f030 vrsave: 0x00000000
xer: 0x00000000 lr: 0x97e54958 ctr: 0x97df3e2c mq: 0x00000000
r0: 0x00000000 r1: 0xbffff230 r2: 0x28000447 r3: 0xa7e02644
r4: 0x9068d51c r5: 0x20000000 r6: 0xbfffef10 r7: 0x00000000
r8: 0x00048010 r9: 0xa7df0294 r10: 0x00000001 r11: 0x00000000
r12: 0x28000447 r13: 0x00000000 r14: 0x00000000 r15: 0x00000000
r16: 0xa309ab84 r17: 0x000858f0 r18: 0x00005000 r19: 0x00000000
r20: 0x00048010 r21: 0x00000001 r22: 0x00000000 r23: 0x00105418
r24: 0xbffff480 r25: 0x00000080 r26: 0x0012d640 r27: 0xa3086110
r28: 0x0012d570 r29: 0x0012d700 r30: 0x00000000 r31: 0x97e5489c
Thanks,
James
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.