Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-03-2010, 01:21 PM   #1 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 139
sumosumo84 is on a distinguished road
Default Help with NSInvalidArgumentException error

Hi, i have spent the last hour searching for a solution. I have already tried a few different things but nothing works. The breakpoints pass evaluation. so i really don't know whats going on

info:
-no compiling errors, only this one runtime error, i have solved one of the runtime errors before but not this one.
-it gets to the first view but when it goes to lvl1 view it quits.
-here is the error :
Code:
*** Terminating app due to uncaught exception
 'NSInvalidArgumentException', 
reason: '-[EngineUI onTimer]: unrecognized selector sent to instance 0x5951700'
*** Call stack at first throw:
-here is onTimer method:
Code:
- (void) onTimer {
	
	EngineUI *engine = [[EngineUI alloc]init];

	
	[engine checkcollision];
	finalScoreLabel.text = [NSString stringWithFormat:@"%i",[engine rFinalScore]];
	
	if ([engine rBgameOver]) {
		[lvl1 removeFromSuperview];
		[self.view addSubview:gameOver];
	}
	
	
	[engine eTwo];
	
	[engine wallCollision];
	[engine ceilingCollision];
	[engine autorelease];
}
-if you need more info just ask thanks

-ps. i know i am making a new UIEngine each time onTimer is called

-Nib info:

-UIEngine is a UIViewController, but i am using it with views from DoodleDodgeViewController not from its xib, i actually didnt creat a xib for it.

- In interface builder i am using the View Controller (the orange circle with a circle in it to hook stuff up to lvl 1.

thats all the info that i think might be apporpriate for this question, but i could be wrong. if you need more info to solve it please, just ask
sumosumo84 is offline   Reply With Quote
Old 10-03-2010, 02:46 PM   #2 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 139
sumosumo84 is on a distinguished road
Default

if you need the UIEngine class to figure this out just post. and i will give
sumosumo84 is offline   Reply With Quote
Old 10-03-2010, 07:29 PM   #3 (permalink)
Registered Member
 
Join Date: Sep 2010
Posts: 139
sumosumo84 is on a distinguished road
Default

please can anyone help?
sumosumo84 is offline   Reply With Quote
Old 10-03-2010, 09:37 PM   #4 (permalink)
Registered Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
smasher will become famous soon enough
Default

Code:
-[EngineUI onTimer]: unrecognized selector sent to instance 0x5951700'
This means that someone is trying to call the onTimer method on an instance of the EngineUI object, but EngineUI does not have an 'onTimer' method.

The obvious error would be calling onTimer on EngineUI; that should be easy to check for. A nonobvious reason would be calling onTimer on an object that was over-released - the message would be sent to the new object which replaced the old, over-released one.

So, check all the lines in your program that call onTimer. Are you calling it on the right object? Did you over-release that object?
__________________

Free Games!
smasher is offline   Reply With Quote
Reply

Bookmarks

Tags
error, exception, nserror, nsinvalidargument, problem with code

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 349
7 members and 342 guests
headkaze, mistergreen2011, nobstudio, Objective Zero, rayjeong, revg, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,655
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, pungs
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:10 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0