I must be getting a memory leak, I'm calling a graph library view and the view shows the first time I use this button method, but the second time the app crashes, with no real error message, that I can see.
-(IBAction)graphNavButtonPressed
{
UIViewController *vc = [[GraphController alloc] init];
[vc setModalTransitionStyle:UIModalTransitionStyleCrossDissolve];
[self presentModalViewController:vc animated:YES]; // APP FAILS ON THIS LINE
[vc release];
return;
}
Program received signal: “EXC_BAD_ACCESS”.
(gdb) bt
#0 0x02889903 in objc_msgSend ()
#1 0x0279a1c0 in __useVolatileDomainsForUser ()
#2 0x0267120c in CFPreferencesCopyAppValue ()
EDIT:
In GraphController ViewDidLoad I've got this code.
NSUserDefaults *myDefaults = [NSUserDefaults standardUserDefaults];
strCurrencySymbol = [myDefaults objectForKey:kNSUCurrency]; //HERE where it crashes
EDIT 2:
Ive been reading about someone with a similar problem, caused by a view being loaded incorrectly. link text I am doing something perhaps a little odd. In order to use the graph library from a tab bar, I load my date range view and then show the graph in viewDidLoad, then once the graph is closed the date range view remains. The user can then click view graph again to show the graph with different dates. If I don`t do this my view will be blank when the graph is closed. So heres how Im calling the graph.
I`m reusing the date range screen elsewhere so the graph may not be shown.
Any further suggestions ?