Announcements

Help Wizard

Step 1

NEXT STEP

iPhone App Crashing Due to Non-existent Playlist Folder

Solved!

iPhone App Crashing Due to Non-existent Playlist Folder

I considered putting this in one of the startup crashing threads, but there are some interesting differences, so I opted for a new thread.  As the title says, the app keeps crashing, and I think it's related to a null-reference or database problem.  A bit about my use case:

 

Running Spotify 0.5.9 on an iPhone 4S and iPad 3rd Gen, both running iOS 6.0.1.

 

This bug manifests the same way on the iPhone and iPad.  Basically, when I started the app on either device, it crashed immediately.  I did a couple of things to troubleshoot and resolve this.  Since I had about 5 seconds of uptime before the app crashed, I was able to try quickly logging out of the service (no easy feat).  This worked, initially.  If I successfully logged out and restarted the app, the app behaved fine, until I logged back into my account (at which point, it immediately crashed and continued to crash on subsequent startups unless I logged out again).

 

I then begrudginly uninstalled the app, cleared the history/cache in Safari, and reinstalled the app.  Here's where it gets interesting - the app worked fine after the reinstall, but I noticed something odd.  There is a playlist folder at the bottom of my playlists which does not appear in the list of playlists in the Desktop client.  If I try to delete this folder using the Edit function in the iPhone app, the app immediately crashes.  It does not immediately crash upon startup, though.  If I go into the folder, there's a link to "iTunes", which contains "0 playlists."  If I click on that, I see what looks like an empty playlist with about 200, thinly-spaced, horizontal lines (see below).

 

I noticed one final piece of information - the iOS app seemed to exhibit the startup crash problem after I moved some playlists and folders around in the Desktop client.  I have a hunch that there's some kind of database or cache mismatch that causes a null reference, and then when the app tries to move it around, it seg faults.  Just a hunch, though.

 

This is really frustrating, because while there's somewhat of a fix (reinstalling the app), this has happened multiple times, forcing me to resync over 1000 songs for offline availability.  That's just not realistic to expect on a regular basis, and constant streaming isn't realistic either, when I'm traveling or on a slow network.

 

Please let me know if you need additional info.

 

Matt

 

photo.PNG

Reply

Accepted Solutions
Marked as solution

Wow, so maybe this is just beginer's luck, but I think I may have found a solution to this.  In order to make it easier to resync all my tracks after a reinstall, I threw all of my playlists into one, giant folder.  That way, I could just go into "All Tracks" and click "make available offline," instead of having to painstakingly go through each album and playlist and make each one available offline.

 

After doing that, the weird, null folder (called "Northern Lights") still appeared in the main directory, albeit in a much shorter list of 2, since everything else was placed in the new folder.  On a whim, I tried delating the null folder again, and this time it allowed me to do it without crashing the app!  Better yet,  I can now move folders and playlists around in the Desktop client without causing crashes to occur in the iOS app.

 

My best guess is that I had a large number of playlists and folders in the main directory, and this was causing issues (maybe range issues?) with accessing the weird, null directory at the end of the list.  Condensing almost everything in the main directory into one folder somehow made it accessible again, and I was able to remove the source of the bug.  I'm not sure what type of datastructures Spotify uses, so this is all speculation, but this seems very much related to the "too many playlists" problem.  Seems to an issue with the number of items that can be allocated in the main directory.

 

The only downside in all of this is that I just realized the iPad app doesn't have the button to make all tracks in a folder available offline.  So while everything's working great on the iPhone, I'm still stuck enabling each playlist for offline play on the iPad, one at a time 😕

 

 

View solution in original post

5 Replies

A little more info on this - I confirmed the startup crashing syndrome definitely appears when I try to move playlist folders around in the Desktop client while syncing on the iPhone app.   Very easy way to reproduce the startup bug.  Not sure if it's specifically related to the null folder I mentioned before, or if there's a fundamental problem with rearranging folders in the Desktop client while syncing in the app, but regardless, this causes failure every time.

Marked as solution

Wow, so maybe this is just beginer's luck, but I think I may have found a solution to this.  In order to make it easier to resync all my tracks after a reinstall, I threw all of my playlists into one, giant folder.  That way, I could just go into "All Tracks" and click "make available offline," instead of having to painstakingly go through each album and playlist and make each one available offline.

 

After doing that, the weird, null folder (called "Northern Lights") still appeared in the main directory, albeit in a much shorter list of 2, since everything else was placed in the new folder.  On a whim, I tried delating the null folder again, and this time it allowed me to do it without crashing the app!  Better yet,  I can now move folders and playlists around in the Desktop client without causing crashes to occur in the iOS app.

 

My best guess is that I had a large number of playlists and folders in the main directory, and this was causing issues (maybe range issues?) with accessing the weird, null directory at the end of the list.  Condensing almost everything in the main directory into one folder somehow made it accessible again, and I was able to remove the source of the bug.  I'm not sure what type of datastructures Spotify uses, so this is all speculation, but this seems very much related to the "too many playlists" problem.  Seems to an issue with the number of items that can be allocated in the main directory.

 

The only downside in all of this is that I just realized the iPad app doesn't have the button to make all tracks in a folder available offline.  So while everything's working great on the iPhone, I'm still stuck enabling each playlist for offline play on the iPad, one at a time 😕

 

 

I have a similar problem: Always a folder called "Barnens" ending upp in the bottom in the list in the iPhone app. I can not be deleted and is maked for offline download. The app chrashes if i try to delete it.

The strange thing is that i can add new song to that folder in a new playlist without problem, but then it will show up in the desktop app as a single playlist.

 

Any idea how to delete it?

MKling - throwing all of my other playlists and playlist folders inside of one giant folder did the trick for me.  When I did this, the empty list still showed up in the main directory, but I was then able to delete it without causing the app to crash.  I know it's rather tedious to move everything over one by one, but it seemed to work for me, and it hasn't caused any problems since (unless you consider having to navigate into that folder each time a problem).  It even got rid of them problem where moving around playslists in the desktop client causes the mobile app to perpetually crash at startup.

Thanks, but it seems this trick does not solve my problem.

I will open a new topic and see if the Spotify people has a solution.

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random