Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXC_BAD_ACCESS on function initWithAPIKey #21

Open
hydex86 opened this issue Sep 8, 2011 · 4 comments
Open

EXC_BAD_ACCESS on function initWithAPIKey #21

hydex86 opened this issue Sep 8, 2011 · 4 comments

Comments

@hydex86
Copy link

hydex86 commented Sep 8, 2011

I'm getting an EXC_BAD_ACCESS when debugger is processing function initWithAPIWey on OFFlickrAPIContext class.

When debugger is at this point:

 - (id)initWithAPIKey:(NSString *)inKey sharedSecret:(NSString *)inSharedSecret
 {
    if ((self = [super init])) {
       key = [inKey copy];

On the last code line, I can see inKey has the value of the constant I defined on SampleAPIKey.h . inKey is a NSCFString and key is NSString. Key value is nil.

Do you know what could it happens? I'm using Xcode 4.

Thanks for your help!

@hydex86
Copy link
Author

hydex86 commented Sep 8, 2011

If I change the code line for the next one, there is not EXC_BAD_ADDRESS at this point.

self.key = [inKey copy];

And key property retain instead of readonly.

I think I'm doing something bad. Or the library doesn't work with the latest iOS sdk version?

Thanks

@hydex86 hydex86 closed this as completed Sep 8, 2011
@hydex86 hydex86 reopened this Sep 8, 2011
@hydex86
Copy link
Author

hydex86 commented Sep 8, 2011

I closed the issue accidentally.

@ghost
Copy link

ghost commented Sep 21, 2011

I have the same issue... exactly on the same line.
I'm using Xcode 4.1 and my project targets iOS 4.3

@Hydex: have you resolved this issue? Did you find any solutions?

@hydex86
Copy link
Author

hydex86 commented Sep 21, 2011

@mediamac1 I solved the issue. Don't know what did exactly, but the problem was about linking the library, choosing the architecture which it was compiled, or something like this. As you could see, the way described in the guide about linking the library doesn't apply to Xcode 4.1.

When I solved the problem, I got an EXC_BAD_ACCESS on the next line:

RESTAPIEndpoint = kDefaultFlickrRESTAPIEndpoint;

I solved this changing the next code lines:

`
RESTAPIEndpoint = kDefaultFlickrRESTAPIEndpoint;
photoSource = kDefaultFlickrPhotoSource;
photoWebPageSource = kDefaultFlickrPhotoWebPageSource;
authEndpoint = kDefaultFlickrAuthEndpoint;
uploadEndpoint = kDefaultFlickrUploadEndpoint;
``

to:

self.RESTAPIEndpoint = kDefaultFlickrRESTAPIEndpoint; self.photoSource = kDefaultFlickrPhotoSource; self.photoWebPageSource = kDefaultFlickrPhotoWebPageSource; self.authEndpoint = kDefaultFlickrAuthEndpoint; self.uploadEndpoint = kDefaultFlickrUploadEndpoint;

but I had problems later. Finally I decided not to use this library and choose a generic OAuth library. Mabye some other person could show us the light.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant