Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 26, 2010, 07:21 AM   #1
andyiapan
macrumors newbie
 
Join Date: Feb 2010
terminating due to uncaught exception

Code:
NSArray *db1;


.....

- (void)viewDidLoad
{
....

db1 = [newStr componentsSeparatedByString:@"	"];


}
- (IBAction) button1:(id)sender{
	
	queue1.titleLabel.text = [db1 objectAtIndex: 3];

}
just a simple call, why terminate, HELP thanks><

Last edited by dejo; Dec 2, 2010 at 12:36 PM. Reason: Please use code tags.
andyiapan is offline   0 Reply With Quote
Old Nov 26, 2010, 07:38 AM   #2
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Read the Memory Management Guide. All of it. If you don't understand something stop until you do.

You are assigning an autoreleased value to db1 so you cannot expect that to exist at some undefined point in the future.
robbieduncan is offline   0 Reply With Quote
Old Nov 26, 2010, 02:09 PM   #3
andyiapan
Thread Starter
macrumors newbie
 
Join Date: Feb 2010
Thanks, assigning an autoreleased value? i still can't find out reason,
can explain to me><

Many Thanksss

Quote:
Originally Posted by robbieduncan View Post
Read the Memory Management Guide. All of it. If you don't understand something stop until you do.

You are assigning an autoreleased value to db1 so you cannot expect that to exist at some undefined point in the future.
andyiapan is offline   0 Reply With Quote
Old Nov 26, 2010, 02:11 PM   #4
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
Quote:
Originally Posted by andyiapan View Post
Thanks, assigning an autoreleased value? i still can't find out reason,
can explain to me><

Many Thanksss
That is the reason. If you don't know what that means you need to go back to basics. Did you read the document I linked to? Have you read the Objective-C guide on the developer site? If you don't know what that means you don't have the most basic knowledge you need.
robbieduncan is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Exception breakpoint where no exception is caused moonman239 iPhone/iPad Programming 1 Apr 30, 2014 08:03 AM
HELP! *** Terminating app due to uncaught exception 'NSUnknownKeyException' rwaller1 iPhone/iPad Programming 4 Sep 4, 2013 12:40 PM
NSTask Not terminating. DavidBlack Mac Programming 5 Aug 3, 2013 10:07 PM
Terminating app due to uncaught exception 'NSUnknownKeyException' cmi2012 iPhone/iPad Programming 10 Jul 20, 2012 03:06 PM
Xcode 4.5 problems - breakpoints I don't want and libc++abi.dylib uncaught exception moonman239 iPhone/iPad Programming 1 Jun 20, 2012 03:09 PM

Forum Jump

All times are GMT -5. The time now is 03:22 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC