Why does this keep sending EXC_BAD_ACCESS
Why does this keep sending EXC_BAD_ACCESS
- Subject: Why does this keep sending EXC_BAD_ACCESS
- From: Angel Caban <email@hidden>
- Date: Tue, 30 Mar 2004 11:37:49 -0500
This is the code snippet:
1 - (void)createServerWindowWithServer:(Server *)server
2 {
3 ServerWindowController *servWin;
4 NSWindowController *win;
5
6 // First, look for a clean server window
7 NSEnumerator *enumerator = [serverWindows objectEnumerator];
8 while(win = (NSWindowController *)[enumerator nextObject]) {
9 // The first clean window is ours
10 NSString *title = [[win window] title];
11 if([title isEqualToString:@"Server"]) {
12 servWin = (ServerWindowController *)win;
13
14 // Clean Server Window
15 [[servWin window] setTitle:(data->hostName)];
16 [servWin setServer:server];
17
18 break;
19 }
20 }
...
The program crashes at line 7. With an EXC_BAD_ACCESS.
serverWindows is an initialized NSMutableArray.
The crash comes from objc_msgSend
usually +0012 lwz r12,32(r12)
or +0020 lwz r11,0(r12)
Why would this happen?
--
Angel Caban
_______________________________________________
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.