Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Mordicaii

macrumors newbie
Original poster
May 2, 2009
3
0
I am trying to load a page in a UIWebView, but whenever I press the button I set to do so, I get a `EXC_BAD_ACCESS' error. What does this mean, and what can I do about it.

Oddly, here is the only code I have changed.
WebController.m
Code:
- (IBAction)goToMainPage:(id)sender {
	NSURL *url = [NSURL URLWithString:@"http://www.bungie.net/forums/topics.aspx?forumID=10"];
	[webView loadRequest:[NSURLRequest requestWithURL:url]];
	[url release];
}

The_FloodViewController.m
Code:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
	if (interfaceOrientation == UIInterfaceOrientationPortrait) {
		return YES;
	}
	if (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) {
		return YES;
	}
	if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) {
		return YES;
	}
	if (interfaceOrientation == UIInterfaceOrientationLandscapeRight) {
		return YES;
	}
}

Thank you!
 
You're over-releasing the url object. Remove the '[url release];' line.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.