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

Bug in FBRequest #55

Closed
virajmody opened this issue Sep 20, 2010 · 2 comments
Closed

Bug in FBRequest #55

virajmody opened this issue Sep 20, 2010 · 2 comments

Comments

@virajmody
Copy link

The FBRequest class needs to retain/release the delegate passed in.

Here's a case where it can crash:

  • User code creates a Facebook instance and calls -logout:self
  • Facebook code creates a FBRequest and issues a server call to logout, but it invokes the fbDidLogout delegate immediately (which is another bug, IMHO)
  • when user code gets told logout is done, it correctly releases the Facebook instance
  • server request from FB completes and it tries to invoke the delegate (the FB instance that is now gone) and crashes.

The fix is to retain the delegate passed to the FBRequest object in FBRequest.m

@yujuan
Copy link

yujuan commented Sep 20, 2010

just check in the fix. Thanks!

@chrismoos
Copy link

I see this issue was closed, but it does still occur if the delegate has already been released when the FBRequest finishes.

virajmody mentioned the solution of retaining the delegate. This is fine as long as we ensure that the delegate is released after sending it message(s) (such as didReceiveResponse: or didFailWithError:).

I'd be happy to do this fix.

This issue was closed.
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

3 participants