Rockbox Technical Forums

Support and General Use => Recording => Topic started by: mlind on September 06, 2007, 10:00:00 AM

Title: Strange behaviour after Disk Full error while recording
Post by: mlind on September 06, 2007, 10:00:00 AM
I just filed a bugreport:
http://www.rockbox.org/tracker/task/7721

I also wanted to see if anyone else in the forums have any experiences like this.
Here's my report:

Yesterday I did a recording and got "The Disk is Full".
After that several things behaved really strange:

1. The last recorded file was unusable.
Actually this happened twice, once with WavPack and once with Wav.
None of the two files (last recorded in each case) played in RockBox, but the WavPack file I was actually able to convert to AIFF with "MAX" (ripper/converter for Mac).

2. The WPS got messed up.
When I played another file the WPS showed "STOP" instead of "PLAYING:" (including other WPS items that should show on stop/pause in my WPS) - but there was sound, and also movement on the peak meters and the progress strip.
After reboot it was fine again.

3 The recorded files was found in an unexpected new directory, that showed twice!
[This I haven't been able to reproduce]
The recording should be made to a dir named "Grieg 2-1", but when I looked that dir was empty and instead I found the files in a new dir (not created by me) named "Grieg 2".
AND: This dir existed twice in the "recordings" directory!
Also in playback the directory would play twice.
After reboot the dir only existed once, but still it was a new one...
Title: Re: Strange behaviour after Disk Full error while recording
Post by: LambdaCalculus on September 06, 2007, 10:07:52 AM
According to your report, you're using an iriver H100 series, correct?
Title: Re: Strange behaviour after Disk Full error while recording
Post by: mlind on September 06, 2007, 10:37:17 AM
iRiver H120

Recreated the behaviour today with current build.
Yesterday was a build from last month.
Title: Re: Strange behaviour after Disk Full error while recording
Post by: LambdaCalculus on September 06, 2007, 10:47:27 AM
Do you remember what SVN revision you were using prior, and what SVN build are you using now? That's actually a critical piece of information you forgot to list on your bug report.
Title: Re: Strange behaviour after Disk Full error while recording
Post by: mlind on September 06, 2007, 10:53:55 AM
Fixed on the tracker:

"When I first encountered this I was using a build from the beginning of august.
Today when I filed the report I first reproduced the bugs (#1 & #2) with a build from today: r14627M-070906"
Title: Re: Strange behaviour after Disk Full error while recording
Post by: AlexP on September 06, 2007, 10:55:16 AM
Can you try it with a non-modified current build please?
Title: Re: Strange behaviour after Disk Full error while recording
Post by: mlind on September 06, 2007, 10:59:09 AM
Can you try it with a non-modified current build please?

What do you mean?
I downloaded this: http://build.rockbox.org/dist/build-h120/rockbox.zip
What makes you think it's modified?
I can't even compile at the moment.
Title: Re: Strange behaviour after Disk Full error while recording
Post by: AlexP on September 06, 2007, 11:01:14 AM
The M after the version number means modified.  If you downloaded from the rockbox website that is odd.  Could you try redownloading and see if you get a version without the M in the version number?
Title: Re: Strange behaviour after Disk Full error while recording
Post by: mlind on September 06, 2007, 12:26:31 PM
When I download from the "Current build page" I get build r14627M-070906.
When I download from the "Daily build page" I get build r14625-070906.

Anyway.
The behaviour is the same in both builds.
Title: Re: Strange behaviour after Disk Full error while recording
Post by: AlexP on September 06, 2007, 01:00:44 PM
Weird!

Anyway, as for your problem I personally haven't experienced it on my H100, but I do next to no recording so that isn't very indicative.

Sorry not to be more help.
Title: Re: Strange behaviour after Disk Full error while recording
Post by: simon142857 on September 26, 2007, 07:33:58 AM
I just loaded the latest build for my H120- got the same "disc full" problem.
I tried the suggested tricks (main menu->Info->Debug->View disk info->FRee->click joystick) and deleting Recycle  and system information files.
Still getting it
I installed the build over a nicely behaving REP build from Mmmmm that's about 3 months old.
Title: Re: Strange behaviour after Disk Full error while recording
Post by: petur on September 26, 2007, 07:40:29 AM
I am looking into the issue and have so far found that the recording code looks ok (I did change a couple of things to make it write the header), and after the disk full the file looks ok, but not after a reboot. Still have to try this without dircache on.

Looks like I will have to dive into dircache and lower, the file isn't properly closed on disk it seems.
Title: Re: Strange behaviour after Disk Full error while recording
Post by: simon142857 on September 29, 2007, 04:14:19 AM
Well I'll be dipped if now my 120 won't even play mp3's in Rockbox mode!
"Codec Failure"
I can get the IRiver firmware to play them, tho.

Just loaded the latest build, and still whacked!
Shall I try reloading an older build?

ok researched a bit and found a possible snafu
older bootloader
now updating...

ALRIGHT THEN!
that did it- updated bootloader, used the kewl new install util...
disc full issue resolved, codec failure issue resolved
oh yeah...
thanks petur and all for your awesome work!

Now the recording setup is a bit different- is there updated documentation?
Title: Re: Strange behaviour after Disk Full error while recording
Post by: petur on September 29, 2007, 12:26:20 PM
ALRIGHT THEN!
that did it- updated bootloader, used the kewl new install util...
disc full issue resolved, codec failure issue resolved
- please don't post general support issues in the recording subforum
- I haven't fixed the discfull issue yet so it can't be ok... the resulting file will still be 0 bytes afaik...
Title: Re: Strange behaviour after Disk Full error while recording
Post by: simon142857 on September 29, 2007, 08:14:23 PM
hmmmm....
i started off with a "disc full" warning while trying to record.
Now I can record. It's working perfectly.
asfaik.

Might what came in between those two events  be of interest to others trying to record and receiving the disk full warning?
Title: Re: Strange behaviour after Disk Full error while recording
Post by: mlind on September 30, 2007, 05:30:05 AM
simon142857: Your former problem was not the same as is discussed in this thread.
I was recording, and when the disc got full - because it WAS full - strange things started to happen for me. This is what Petur is talking about.
Title: Re: Strange behaviour after Disk Full error while recording
Post by: simon142857 on September 30, 2007, 06:19:10 PM
oops!

got it.
Title: Re: Strange behaviour after Disk Full error while recording
Post by: petur on October 01, 2007, 08:19:17 AM
It isn't dircache related (it always happens with dircache disabled)

discussing this with jhMikeS, it would seem that the file isn't closed properly because the flushing of the write buffer of the filesystem fails.
Title: Re: Strange behaviour after Disk Full error while recording
Post by: Davide-NYC on October 12, 2007, 11:08:27 PM
I just ran a test to see if this was fixed after Petur's recent commit regarding this problem.

I nearly filled my disk and then recorded to WAV until I received the "Disk Full" warning.
I pressed stop, left the recording screen and was able to browse files.
[edit] I was even able to play the recording I had just made.
That is untrue. It just played the next file down the list. Which I think is yet another problem as it does not give the user any feedback that there is a problem.

I then plugged the player into USB but was unable to transfer the file to my PC.
I got a "file or directory corrupt" error.

Sorry.  :-\

[edit] I just realized this is totally the wrong place for this comment. I didn't read the full thread. Where should I post this feedback? I can't find the Disk-Full-Corrupt-Recording-File bug on the tracker anywhere!
Title: Re: Strange behaviour after Disk Full error while recording
Post by: petur on October 13, 2007, 06:35:41 AM
I nearly filled my disk and then recorded to WAV until I received the "Disk Full" warning.
I pressed stop, left the recording screen and was able to browse files.
I was even able to play the recording I had just made.

I then plugged the player into USB but was unable to transfer the file to my PC.
I got a "file or directory corrupt" error.

a more short reply because the forum ate my previous reply :(

- Using dircache or not?
- what does chkdsk say the problem is?
Title: Re: Strange behaviour after Disk Full error while recording
Post by: Davide-NYC on October 13, 2007, 02:41:08 PM
Petur, please read my post (above) again. I reported something incorrectly.

chkdsk says:
The size of the \recordings\R_MIC_071012-231825.wav entry is not valid.
dirchache is ON.

Hope this helps.

Rants & Ideas:

1) since the file's gonna get chopped anyway, why not throw away whatever is in the buffer and just write the end of the file politely?

2) Is there a way for the recording code to know how much space is left on Disk and simple report the amount of space available as {{ actual_freespace - 2*Buffer }}, or something similar? Essentially lie to the recording code about how much space is actually left.

3) If a file fails to play due to this type of corruption a splash screen should be displayed saying so instead of just playing the next file in the directory. In my case the files were of near silent background noise with very similar (date stamp) names so I thought the file played OK on the DAP when in fact it did not.

[edit] I jumped on IRC for a sec and had Mike S re-open FS#5852

Check it out: http://www.rockbox.org/tracker/task/5852
Title: Re: Strange behaviour after Disk Full error while recording
Post by: petur on October 14, 2007, 06:59:07 AM
chkdsk says:
The size of the \recordings\R_MIC_071012-231825.wav entry is not valid.

alright, that is a good hint where to look

dirchache is ON.

might have had that turned off in my last tests, will check...

1) since the file's gonna get chopped anyway, why not throw away whatever is in the buffer and just write the end of the file politely?

This is what happens in fact. What my fix does it write the header and close the file properly regardless of the failure.

3) If a file fails to play due to this type of corruption a splash screen should be displayed saying so instead of just playing the next file in the directory. In my case the files were of near silent background noise with very similar (date stamp) names so I thought the file played OK on the DAP when in fact it did not.

strange... mine played fine, even on PC.

[edit] I jumped on IRC for a sec and had Mike S re-open FS#5852

Saw that... will try to find time to look further into it.