This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#11776 - Metadata read log
Attached to Project:
Rockbox
Opened by Jonas Häggqvist (rasher) - Friday, 26 November 2010, 03:48 GMT+2
Last edited by MichaelGiacomelli (saratoga) - Saturday, 11 December 2010, 05:31 GMT+2
Opened by Jonas Häggqvist (rasher) - Friday, 26 November 2010, 03:48 GMT+2
Last edited by MichaelGiacomelli (saratoga) - Saturday, 11 December 2010, 05:31 GMT+2
|
DetailsThis patch adds a menu entry to the debug menu which will allow the user to toggle writing of a log of files being read for metadata in /metadata.log. The filename is written before Rockbox attempts to read metadata from the file, so if Rockbox crashes when scanning for the DB, the last filename in the log should be the file that caused the crash. This should greatly help debug metadata reader problems.
|
This task depends upon
Closed by MichaelGiacomelli (saratoga)
Saturday, 11 December 2010, 05:31 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed in r28789.
Saturday, 11 December 2010, 05:31 GMT+2
Reason for closing: Accepted
Additional comments about closing: Committed in r28789.
1) fd == 0 is valid so that needs to be changed
2) the 2 write()'s should really be a snprintf() and a write() (or just fprintf() if we have that). putting a MAX_BUF array on the stack is no big deal here (get_metadata() shouldnt be being called recursively)
Comments from IRC:
"I'd do snprintf() then write instead of two write()'s" - this way a) was simpler b) doesn't use more stack (probably not important)
"opening it every time isnt very nice either" - agreed, it's not nice, but it gets the job done and makes sure no potential buffering messes up if Rockbox were to close with the file open. Performance is unimportant - getting the right result is very important.
I'll try it out later with a target full of music to see how long it takes.
The applied patch fixes the bug.
Not sure there's any reason not to commit this?