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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

Thread: Collision Error
View Single Post
Old 03-09-2010, 09:52 PM   #1 (permalink)
OblivianStudios
Registered Member
 
Join Date: Mar 2010
Posts: 14
Default Collision Error

In my app I have to objects colliding. When they do gives me the errors "Program received signals:'EXC_BAD_ACCESS'" and objc_msgSend.
Code:
- (void)checkcollision{
	if(CGRectIntersectsRect(Object.frame, ballImage.frame)){
		
		UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Game Over, Score:" message:time.text delegate:nil cancelButtonTitle:@"Okay" otherButtonTitles:nil];
		[alert show];
		[alert release];
		
		[myTicker invalidate];		
		
		pos = CGPointMake(0.0,0.0);	
		
		
	}
}
But when I remove the UIAlertView so the code is...
Code:
- (void)checkcollision{
	if(CGRectIntersectsRect(Object.frame, ballImage.frame)){
		
		[myTicker invalidate];		
		
		pos = CGPointMake(0.0,0.0);	
		
		
	}
}
I get the error "Program received signals:'SIGABRT'" and _kill

I've read that I'm getting the EXC_BAD_ACCESS and objc_msgSend because the Alert is being deallocated. But the only deallocation I have id the super dealloc at the end.

Thanks

-Oblivian Studios
OblivianStudios is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,862
Threads: 89,223
Posts: 380,685
Top Poster: BrianSlick (7,129)
Welcome to our newest member, higgey
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:40 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.