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
Search



Donate

Rockbox Technical Forums


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

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  Disktidy: "Plugin returned an error"
« previous next »
  • Print
Pages: [1]

Author Topic: Disktidy: "Plugin returned an error"  (Read 4733 times)

Offline mlind

  • Member
  • *
  • Posts: 179
  • Recording Pro
Disktidy: "Plugin returned an error"
« on: November 18, 2006, 11:37:05 AM »
Disktidy doesn't finish it's work, but stops with an error when it gets to a certain point in the file structure.

I THINK it is when it reaches a folder where I have some Mac OS X apps placed for portable use.
Could there be an issue with how many levels of nested folders are possible?
Logged
iRiver H120

Offline perfectdrug

  • Artist
  • Member
  • *
  • Posts: 103
Re: Disktidy: "Plugin returned an error"
« Reply #1 on: November 18, 2006, 11:43:47 AM »
i experienced the same and i also think it is because it's too deep in the filestructure
when i delete the folder with the subfolders disctidy finish as normal
Logged
uʍop ǝpısdn < sbuıʇʇǝs pɔ1 < ʎɐ1dsıp < sbuıʇʇǝs 1ɐɹǝuǝb

Offline mlind

  • Member
  • *
  • Posts: 179
  • Recording Pro
Re: Disktidy: "Plugin returned an error"
« Reply #2 on: November 18, 2006, 12:00:21 PM »
Yes!

I moved the folder (containing the apps) up two levels to the root, and it worked!
Moved it back down one level and it still worked.
Moved it back down yet another - to it's original position - an got an error.

Seems you cannot have more than 7 levels of sub-folders.
(5 of my 8 were inside the app structure)

Thanks Perfectdrug for helping me in the right direction.
/M
Logged
iRiver H120

Offline mlind

  • Member
  • *
  • Posts: 179
  • Recording Pro
Re: Disktidy: "Plugin returned an error"
« Reply #3 on: December 25, 2006, 07:43:52 PM »
Can someone confirm that
Code: [Select]
#define MAX_OPEN_DIRS 8
(found in "dir.c")
means that the afforementioned problem is not with the plugin (Disctidy) but a system limit?
- which means we can't do anything about it...

And why 8? Any specific reason?
Logged
iRiver H120

Offline mlind

  • Member
  • *
  • Posts: 179
  • Recording Pro
Re: Disktidy: "Plugin returned an error"
« Reply #4 on: December 28, 2006, 05:48:48 AM »
OK. IRC seems to be the place to get answers...
From IRC 10th of december:
http://www.rockbox.org/irc/rockbox-20061210.txt

Quote
20.32.53 #       * Bger just spotted that disktidy can't enter more then 7 (or 8) levels in the dir tree
20.33.39 #       Bger> (because it doesn't close the dir handle and #define MAX_OPEN_DIRS 8 )
...
20.39.56 #       amiconn> But you cannot close the parent handles, otherwise recursion won't work
Logged
iRiver H120

Offline mlind

  • Member
  • *
  • Posts: 179
  • Recording Pro
Re: Disktidy: "Plugin returned an error"
« Reply #5 on: January 06, 2007, 03:46:27 PM »
I managed to fix this myself!
 
At last I got myself a working coding environment!
And with some coding I made the plugin avoid going deeper than allowed, but still carry on with the rest.

Here's my experimental patch:
http://www.rockbox.org/tracker/task/6512

How do I edit "related tasks" / dependencies on FS?
« Last Edit: January 06, 2007, 04:13:52 PM by mlind »
Logged
iRiver H120

Offline the_winch

  • Member
  • *
  • Posts: 53
    • website
Re: Disktidy: "Plugin returned an error"
« Reply #6 on: January 07, 2007, 08:39:46 AM »
Please test this patch.

http://www.rockbox.org/tracker/task/6514

It keeps track of the position in the directory so the handle can be closed when recursing into a sub dir and then reopened afterwards.
It will run a little slower due to reopening dir handles and skipping over already processed items.
This removes the directory handle limit but the next limit is the stack, if the dir tree is too deep you will get a stack overflow.

There is a h120 build with the patch applied here
http://winch.pinkbile.com/temp/h120.zip
« Last Edit: January 07, 2007, 01:27:59 PM by the_winch »
Logged

Offline mlind

  • Member
  • *
  • Posts: 179
  • Recording Pro
Re: Disktidy: "Plugin returned an error"
« Reply #7 on: January 07, 2007, 04:41:01 PM »
Quote from: the_winch on January 07, 2007, 08:39:46 AM
next limit is the stack, if the dir tree is too deep you will get a stack overflow.

I got:
Code: [Select]
*PANIC*
Stkov main
Seems it managed to clean 8 but not 9.
But for my original actual case, before I put things even deeper for testing, it is just enough to be ok.

In my case I really don't think it's such a big deal if the deepest folders don't get cleaned.
It's no place I will go browsing for music.

But a possible sollution would maybe be to let Disktidy start with the current folder (in the browser) and clean the 8 allowed but no further down. If the user wants his one deep folder to be cleaned he can browse there and Disktidy will that folder and its contents?
Logged
iRiver H120

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Plugins/Viewers
| | |-+  Disktidy: "Plugin returned an error"
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.078 seconds with 15 queries.