1

Xcode screenshot

I'm working with cocoalibspotify. My app is about finished but I'm stuck with some weird issue. When I try to login again after logging out, the app crashes leaving with no crash log and later on my debug point goes to the line

sp_session_logout(outgoing_session);

from the method -(void)logout:(void (^)())completionBlock in class SPSession.m

And beside it there is signal SIGABRT.

Check out the screenshot I've attached. which shows the crash point with no crash log below in console.

This crash happens only happens sometimes rather than every time.

Any help would be appreciated.

Niru Mukund Shah
  • 4,637
  • 2
  • 20
  • 34

1 Answers1

2

Are you waiting for the completion block on your logout: call to fire before logging back in again? That'll cause problems, and the logout: call can take a while to complete at times.

In addition, does this problem occur with the latest master release, 2.4.0? How about the HEAD of the dev branch?

iKenndac
  • 18,730
  • 3
  • 35
  • 51
  • hi daniel! No, I'm not using the latest cocoalibspotify 2.4.0. Before that where you've identified version in your sample examples? Moreover, I'm using // logout from app [[SPSession sharedSession] logout:^{ }] – Niru Mukund Shah Nov 28 '12 at 09:19
  • I'm using // logout from app [[SPSession sharedSession] logout:^{ }] for logging out from the spotify. SO, I guess I'm not waiting for the completion block. – Niru Mukund Shah Nov 28 '12 at 09:27
  • Versions are applied as tags on the master branch. See https://github.com/spotify/cocoalibspotify/tags and https://github.com/spotify/cocoalibspotify/blob/master/CHANGELOG.markdown – iKenndac Nov 28 '12 at 09:28
  • yes, daniel that I know , but how one can come to know from the sample examples that on which version he/she is working? – Niru Mukund Shah Nov 28 '12 at 09:30
  • lets say I'm running simple player. Then how can I come to know that which version this app is using. Is it mentioned in some .h file or in some read me text? – Niru Mukund Shah Nov 28 '12 at 09:36
  • Run `git describe` on the repo or look at the CHANGELOG.markdown file. – iKenndac Nov 28 '12 at 09:38
  • ok.got it. & let me also congratulate you for the 2.4.0. good! – Niru Mukund Shah Nov 28 '12 at 09:44
  • in my app I do not wait for the logout then why my app gets crash at this point? did you check screenshot? – Niru Mukund Shah Nov 28 '12 at 09:46
  • I did. Did you try anything I suggested in my answer? – iKenndac Nov 28 '12 at 09:49
  • no. At this stage I can't change the version of the cocoalibspotify since my app is about to finish. So can you suggest me something to do with current version only.& what to mean by HEAD of the dev branch? – Niru Mukund Shah Nov 28 '12 at 09:54
  • I mean checking out the newest commit in the `dev` branch. I did suggest something — making sure you wait for the logout callback to complete before attempting to log in again. Other than that, there's nothing I can suggest apart from updating. – iKenndac Nov 28 '12 at 10:05
  • [[SPSession sharedSession] logout:^{ }] - that's an empty completion block right there. or maybe you stripped your code out in the comment? – Niklas Berglund Nov 29 '12 at 07:51