Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Save Current Playlist Panic
« previous next »
  • Print
Pages: [1]

Author Topic: Save Current Playlist Panic  (Read 559 times)

Offline iPodVT

  • Member
  • *
  • Posts: 466
Save Current Playlist Panic
« on: March 10, 2025, 01:40:06 PM »
Target: ipod6g
Version: ae3b34734a-250310

I was listening to an album that I had started playing via the Database Browser.  While it was playing I entered the WPS's context menu and selected Save Current Playlist.  Then while in the virtual keyboard screen I edited the directory name segment of the file pathname to a directory that doesn't exist, expecting that Rockbox would create the directory and place the new playlist file in it.  But that caused a Panic.  I retried the same thing, except that I accessed Save Current Playlist via a long click on the Playlists item in the main menu, and again got a Panic.
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1191
Re: Save Current Playlist Panic
« Reply #1 on: March 10, 2025, 06:26:10 PM »
So ARe you saying you get a panic if you atttempt to create a playlist in a directory that doesn't exist in both cases or is it irrespective of the prior existence as well?
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 466
Re: Save Current Playlist Panic
« Reply #2 on: March 10, 2025, 07:16:44 PM »
Quote from: Bilgus on March 10, 2025, 06:26:10 PM
So ARe you saying you get a panic if you atttempt to create a playlist in a directory that doesn't exist in both cases or is it irrespective of the prior existence as well?

I'm not quite sure what you are asking, but the only difference between the two scenarios is that in the first I accessed Save Current Directory via the WPS's context menus and in the second I accessed Save Current Directory via the context menu attached to the main menu's Playlists item.  Every other aspect was exactly the same between both attempts:  The current playlist was dynamic - derived from playing an album via the Database Browser and not associated with a previously saved playlist.  In both cases I edited the directory segment of the pathname exactly the same way to specify a directory that did not exist.  My Playlists directory is at "/Rockbox Playlists", Rockbox supplied the default path "/Rockbox Playlists/Playlist 1" in the virtual keyboard screen, and both times I edited the pathname to be "/Rockbox Playlists2/Playlist 1".  And both attempts caused a Panic.

Please let me know if I still haven't answered your question satisfactorily or if you have any other questions.

Thanks.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 466
Re: Save Current Playlist Panic
« Reply #3 on: March 10, 2025, 07:36:31 PM »
Quote from: Bilgus on March 10, 2025, 06:26:10 PM
So ARe you saying you get a panic if you atttempt to create a playlist in a directory that doesn't exist in both cases or is it irrespective of the prior existence as well?

Hang on - I think I now understand what you are asking.  I'll try it again, editing the directory name to a directory that exists but is not my specified Playlists directory.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 466
Re: Save Current Playlist Panic
« Reply #4 on: March 10, 2025, 08:03:22 PM »
Okay, I created the new directory "/Rockbox Playlists2", started playing an album via the Database Browser, went to Save Current Directory, and edited the supplied path from "/Rockbox Playlists/Playlist 1" to "/Rockbox Playlists2/Playlist 1".  The playlist was successfully saved in "/Rockbox Playlists2".  I also checked to make sure that Rockbox hadn't changed my previously selected Playlists Directory from "/Rockbox Playlists" to "/Rockbox Playlists2", and that was unchanged.  So it seems that the panic I'm reporting is dependent on specifying a directory that doesn't exist.  Of course, since the full path is editable the user could specify a chain of non existent directories (possibly opening a doorway into another dimension...).

BTW - this afternoon I also got a panic doing the same things on an ipodvideo running a dev build from January.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 466
Re: Save Current Playlist Panic
« Reply #5 on: March 10, 2025, 08:13:38 PM »
I'm not sure why I thought it mattered that the current playlist was dynamic and not one that already existed in my Playlists Directory.  In any case, I just now repeated the same test but instead of playing an album from the database browser I started playing a playlist from my playlists directory.  When I went to Save Current Playlist and edited the directory name to one that doesn't exist I got the same panic.
Logged

Offline chris_s

  • Developer
  • Member
  • *
  • Posts: 299
Re: Save Current Playlist Panic
« Reply #6 on: March 11, 2025, 01:25:20 AM »
should be fixed in the upcoming build, thanks for reporting, iPodVT
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 466
Re: Save Current Playlist Panic
« Reply #7 on: March 11, 2025, 08:39:02 AM »
Updated and tried it just now - no Panic.  Thanks very much.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 466
Re: Save Current Playlist Panic
« Reply #8 on: March 12, 2025, 08:42:43 AM »
There is still at least one edge condition causing issues.

After all of the recent testing I'd done re Save Current Playlist, I had several leftover test directories and playlists that had been created so I decided to clean things up by deleting them in the File Browser.  As it turns out, Rockbox still considered one of those deleted test playlists to be the Current Playlist.  This obviously caused problems for Resume (and continue) Playback, View Current Playlist, Save Current Playlist keeping same name and directory, and Save Current Playlist with new name and/or directory.  There were too many variations for me to keep track of which operation yielded which result, but there was at least one Panic (which I wasn't able to reproduce - I think it was from Save Current Playlist with new name and/or directory).  Some failed operations resulted in proper error messages, some with error messages that were displayed too briefly to read, and some failed operations didn't yield any error message at all (such as Save Current Playlist keeping same name and directory, IIRC).

I'm not reporting that the problem is that the operations failed to achieve desired results - of course they couldn't succeed - just that there was at least one Panic and several variations of problematic error messaging.

Target: ipod6g
Version: 003da4d223-250311

Thanks.
Logged

Offline chris_s

  • Developer
  • Member
  • *
  • Posts: 299
Re: Save Current Playlist Panic
« Reply #9 on: March 12, 2025, 10:15:08 AM »
That doesn't seem too surprising. Recovering from certain errors is still a TODO in that area of code, so it will intentionally panic instead. It may have displayed an exact error code that would be helpful to know. I can offer to fiddle around with it a bit, based on your description. Some errors can probably be handled more gracefully even in the short term.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 466
Re: Save Current Playlist Panic
« Reply #10 on: March 12, 2025, 11:01:34 AM »
Thanks.  I'm not in any way complaining or even pushing for a fix, just reporting what I see/experience.

I was able to reproduce the panic as follows:

I played a single song from the database which resulted in a dynamic current playlist of just that one song.  Then I saved that current playlist to my Playlists directory.  Then I deleted the playlist file via the File Browser.  Then I used Save Current Playlist to try to save the playlist with a different name (but still in my Playlists directory).  I got an error message:

Error accessing playlist file

and then

*Panic* (3c4aed56c0-250311
Failed to save playlist: -2
pc:08014b5c
sp:000097f4
    A:  0800ba0c
    A:  080073b0
    A:  08017ef4
bt end

Does the text in these panic screens get saved in a log file somewhere?

Thanks.
Logged

Offline chris_s

  • Developer
  • Member
  • *
  • Posts: 299
Re: Save Current Playlist Panic
« Reply #11 on: March 12, 2025, 11:19:00 AM »
Makes sense. Yeah, that is easily reproducible. Not written to a log file unfortunately
Logged

Offline Bilgus

  • Developer
  • Member
  • *
  • Posts: 1191
Re: Save Current Playlist Panic
« Reply #12 on: March 12, 2025, 11:33:39 AM »
Well we can't log it because the whole point of the panic is to stop the world and don't do anything else so in this buggy state it doesn't go off and overwrite your data.
Logged

Offline iPodVT

  • Member
  • *
  • Posts: 466
Re: Save Current Playlist Panic
« Reply #13 on: March 12, 2025, 11:37:48 AM »
Right - of course - I see that now.  Thanks.
Logged

Offline chris_s

  • Developer
  • Member
  • *
  • Posts: 299
Re: Save Current Playlist Panic
« Reply #14 on: March 13, 2025, 03:48:20 PM »
There's now an error message if you've deleted the playlist file, which prevents you from saving the playlist. So, at least the device shouldn't panic anymore in that particular scenario.
« Last Edit: March 13, 2025, 04:01:48 PM by chris_s »
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Save Current Playlist Panic
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.142 seconds with 22 queries.