When I run this code
NSString *string = [NSString stringWithFormat:@"http://makrr.com/*****/****/*****/****/%@.mp3", [data objectForKey:@"location"]];`
Im getting a EXC_BAD_ACCESS. [data objectForKey:@”Location”] is a NSCFString.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m not sure where the
EXC_BAD_ACCESSis coming from, but the compiler is reading[data objectForKey:@"Location"]as an NSCFString sinceNSStringis a class cluster, along with other Foundation types such as NSNumber and NSArray:Most likely,
[data objectForKey:@"Location"]has been released one too many times and has been deallocated. This could case an errorEXC_BAD_ACCESS. You should check your memory management carefully to see that it is not being autoreleased (or manually released).