Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 11-05-2019, 11:03 AM   #1
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 26,282
Default If a Serial Storage Device drops during recording, Reaper doesn't know it = data loss

[REPRO STEPS]

1. Create a project.
2. Set the record path so that the media is written to an external serial device aka USB drive.
3. Begin recording a track.
4. Once the track is recording, unplug the USB cable (to replicate what occurs if the connection drops on it's own for various reasons).

Expected behavior: Reaper throws an error or otherwise informs the user that the media has failed etc.

Actual behavior: Reaper continues "recording" as if nothing is wrong though the file is no longer accessible. Reaper could record for hours with the user assuming everything is OK.


[DETAILS]

See this post/thread...

https://forum.cockos.com/showpost.ph...1&postcount=33

It appears that while recording is in progress, if the serial drive/device inadvertently blips or disappears after record is pressed, Reaper either doesn't see or ignores the fact that the storage media no longer exists and continues to report to the user that everything is just fine and that the recording is still occurring - but it isn't...



It appears there are a couple of possibilities...

1. Being External the OS (Win) uses IRP_MJ_WRITE, when the drive is no longer present, the return value switches to FILE INVALID and Reaper isn't actually informed that the write failed, possibly due to caching/lazy writes.

2. The same as above but Reaper is informed and it is a missed case.

In all cases, IF Reaper can detect this, it probably should because someone theoretically can (and actually has per other thread), record for hours thinking everything is fine when in reality no data is being written to disk. It's also possible it went somewhere else (memory/page et al), but too much work to investigate further when the devs likely already know the answer.

Can the devs look into this and comment? We are a little concerned with risk of users losing hours of recording since Reaper doesn't give any clues that something went wrong. Even if recording external USB media is a bad idea, would be nice to know if Reaper can detect this.

Confirmed on Windows and Mac (and linux based on clepsydrae's reply below).
__________________
There are no problems, only solutions. - John Lennon

Last edited by karbomusic; 11-09-2019 at 10:16 AM.
karbomusic is offline   Reply With Quote
Old 11-05-2019, 11:10 AM   #2
clepsydrae
Human being with feelings
 
clepsydrae's Avatar
 
Join Date: Nov 2011
Posts: 2,769
Default

Just confirmed on linux, too. Same behavior: recording appears to continue without issue.
clepsydrae is offline   Reply With Quote
Old 11-09-2019, 10:12 AM   #3
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 26,282
Default

Bumping since I added repro steps to the first post.
__________________
There are no problems, only solutions. - John Lennon
karbomusic is offline   Reply With Quote
Old 12-20-2019, 11:36 AM   #4
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 26,282
Default

Bump!
__________________
There are no problems, only solutions. - John Lennon
karbomusic is offline   Reply With Quote
Old 12-21-2019, 03:13 AM   #5
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 1,607
Default

Bumping also this serious topic.

Devs, please?
akademie is offline   Reply With Quote
Old 01-06-2020, 08:46 AM   #6
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 26,282
Default

bump.
__________________
There are no problems, only solutions. - John Lennon
karbomusic is offline   Reply With Quote
Old 01-06-2020, 11:45 PM   #7
Thonex
Human being with feelings
 
Join Date: May 2018
Location: Los Angeles
Posts: 1,200
Default

Thanks for posting this. One more thing for my OCD to worry about during recording sessions. A solution to this would definitely add peace of mind and potentially avert disaster.
__________________
Cheers,
Andrew K
v6.03+dev0114 - January 14 2020 • Mac 10.12.+ • i7 Quad 2.9GHz • 24GB
Thonex is online now   Reply With Quote
Old 01-16-2020, 12:23 PM   #8
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 26,282
Default Hey Devs...

Bumping hoping for a dev comment - I'm pretty resilient myself, but since someone could run in record for hours and lose every minute of that audio without warning, seems important for chiming in.
__________________
There are no problems, only solutions. - John Lennon
karbomusic is offline   Reply With Quote
Old 01-16-2020, 12:54 PM   #9
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 5,821
Default

Similar thing happens when rendering to a disk that becomes full. Reaper just keeps on rendering, when the graceful thing would be to stop rendering and inform the user that something went astray.

https://forum.cockos.com/showthread.php?t=221562
https://forum.cockos.com/showthread.php?t=120185
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is offline   Reply With Quote
Old 01-17-2020, 09:15 AM   #10
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 1,607
Default

Quote:
Originally Posted by Fabian View Post
Similar thing happens when rendering to a disk that becomes full. Reaper just keeps on rendering, when the graceful thing would be to stop rendering and inform the user that something went astray.

https://forum.cockos.com/showthread.php?t=221562
https://forum.cockos.com/showthread.php?t=120185
YES :-(

So another bump. Please...
akademie is offline   Reply With Quote
Old 02-19-2020, 06:26 PM   #11
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 26,282
Default

Bump - cuz data loss - thanks!
__________________
There are no problems, only solutions. - John Lennon
karbomusic is offline   Reply With Quote
Old 02-29-2020, 07:47 AM   #12
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 1,607
Default

Another bump
akademie is offline   Reply With Quote
Old 06-11-2020, 08:27 PM   #13
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 26,282
Default

Bump, due to potential data loss - thank you!
__________________
There are no problems, only solutions. - John Lennon
karbomusic is offline   Reply With Quote
Old 06-12-2020, 07:49 AM   #14
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 658
Default

Bumperony
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1200 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper - Donate, if you wish
Meo-Ada Mespotine is offline   Reply With Quote
Old 06-12-2020, 07:52 AM   #15
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 658
Default

I would add, that Reaper seems to have issues as well, with recording to a volume that's full.
So if you run out of space, Reaper keeps on recording without writing it, as there's no space available anymore.
This could cause broken recording-files.
Maybe that is linked to the problem above, that Reaper does not check if writing itself is possible at all.
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1200 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper - Donate, if you wish
Meo-Ada Mespotine is offline   Reply With Quote
Old 06-12-2020, 07:55 AM   #16
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 26,282
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
I would add, that Reaper seems to have issues as well, with recording to a volume that's full.
Just an FYI there is a setting to warn you if the disk has less than the amount of space you configure but I'm not sure it is enabled by default?

Edit: it is enabled by default @ 1GB.
__________________
There are no problems, only solutions. - John Lennon
karbomusic is offline   Reply With Quote
Old 06-12-2020, 09:36 AM   #17
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 1,607
Default

Quote:
Originally Posted by karbomusic View Post
Just an FYI there is a setting to warn you if the disk has less than the amount of space you configure but I'm not sure it is enabled by default?

Edit: it is enabled by default @ 1GB.
But question is if it checks for the space only at the moment of starting recording..?

I mean, if Reaper finds you have e.g. 1.2GB free space at the time of pressing REC button, so everything is OK, but few minutes later something is triggered in OS or other app and making a big file download, backup, tempfile or whatsoever, then Reaper does not check periodically if there is still some free space (while still performing recording task, or rendering task, or any file saving task in general!!!). Too bad then. It happens with rendering, too
akademie is offline   Reply With Quote
Old 06-12-2020, 09:53 AM   #18
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 26,282
Default

Quote:
Originally Posted by akademie View Post
But question is if it checks for the space only at the moment of starting recording..?
Correct, but once recording has started, I assumed trapping the failed return value would still fall under this bug?
__________________
There are no problems, only solutions. - John Lennon
karbomusic is offline   Reply With Quote
Old 06-12-2020, 10:09 AM   #19
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 1,607
Default

Quote:
Originally Posted by karbomusic View Post
Correct, but once recording has started, I assumed trapping the failed return value would still fall under this bug?
Yes, I would say.
akademie is offline   Reply With Quote
Old 06-12-2020, 10:17 AM   #20
clepsydrae
Human being with feelings
 
clepsydrae's Avatar
 
Join Date: Nov 2011
Posts: 2,769
Default

Some discussion on disk space cases here...

IMO we could really use options:

[x] alert when disk fills up while recording
[x] alert on recording stop if disk filled while recording
[x] do not create zero-length items if recording to full disk
clepsydrae is offline   Reply With Quote
Old 06-12-2020, 10:44 AM   #21
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 5,821
Default

Quote:
Originally Posted by clepsydrae View Post
Some discussion on disk space cases here...

IMO we could really use options:

[x] alert when disk fills up while recording
[x] alert on recording stop if disk filled while recording
[x] do not create zero-length items if recording to full disk
I don't see any reason for these to be options. This is just part of graceful exit/degradation. When would anyone not have those turned on?

It is amazing to me that the devs, as great programmens as they apparently are, let this slip by. Could there be some technical reason for not checking the return code of a write operation and gracefully terminate the writing if the write fails?
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is offline   Reply With Quote
Old 06-12-2020, 10:57 AM   #22
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 26,282
Default

Quote:
Originally Posted by Fabian View Post
It is amazing to me that the devs, as great programmens as they apparently are, let this slip by. Could there be some technical reason for not checking the return code of a write operation and gracefully terminate the writing if the write fails?
Not unless the API call that Reaper calls doesn't return the failure, but based on the procmon in my first post it does at that lower level and I'd expect that to bubble up - but I don't know the Reaper code and there could be another call, that reaper makes that I can't see, which is likely... so there could be other reasons but if so...

A dev comment would be nice so we could inform others, workaround whathaveyou.

There is another investigatory action I could take to help answer, maybe later if I have time.
__________________
There are no problems, only solutions. - John Lennon
karbomusic is offline   Reply With Quote
Old 06-12-2020, 11:01 AM   #23
clepsydrae
Human being with feelings
 
clepsydrae's Avatar
 
Join Date: Nov 2011
Posts: 2,769
Default

Quote:
Originally Posted by Fabian View Post
When would anyone not have those turned on?
Yeah that probably makes more sense. I think I was just being conservative in case devs or users didn't want the pop-ups.

Quote:
Could there be some technical reason for not checking the return code of a write operation and gracefully terminate the writing if the write fails?
If it's not just an oversight or something not-yet-implemented, then my only guess is that the philosophy is in the vein of "professional tools let the user hang themselves if they want; let the user handle their own business without nagging them about stuff". But seems more likely that it's just that "warn if disk space < X" is enough to cover most cases so the others haven't been dealt with.

Given the stakes (e.g. lost data) I do hope these features (and the bugs mentioned in this thread) can get implemented/fixed some day soon.
clepsydrae is offline   Reply With Quote
Old 06-12-2020, 11:04 AM   #24
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 26,282
Default

Quote:
Originally Posted by clepsydrae View Post

If it's not just an oversight or something not-yet-implemented, then my only guess is that the philosophy is in the vein of "professional tools let the user hang themselves if they want; let the user handle their own business without nagging them about stuff". But seems more likely that it's just that "warn if disk space < X" is enough to cover most cases so the others haven't been dealt with.
I agree likely a missed case, especially since it falls out of the testing most would think of doing while testing in a dev environment. Actually, most of the debugging I do in the real world, is catching things people don't think to test when running test cases on code - then customers hit it.
__________________
There are no problems, only solutions. - John Lennon
karbomusic is offline   Reply With Quote
Old 06-12-2020, 11:18 AM   #25
Justin
Administrator
 
Justin's Avatar
 
Join Date: Jan 2005
Location: NYC
Posts: 12,915
Default

We should definitely notify, I agree, this is overdue. We'll be adding this in the next cycle (with an option to stop audio processing if this occurs in order to draw attention to the issue).
Justin is offline   Reply With Quote
Old 06-12-2020, 11:23 AM   #26
clepsydrae
Human being with feelings
 
clepsydrae's Avatar
 
Join Date: Nov 2011
Posts: 2,769
Default

Awesome, thanks!
clepsydrae is offline   Reply With Quote
Old 06-12-2020, 12:16 PM   #27
karbomusic
Human being with feelings
 
karbomusic's Avatar
 
Join Date: May 2009
Posts: 26,282
Default

Yip, Yip, Yippieeeee.

Thanks Justin!


Edit: Once a pre-release build lands, someone let me know if I miss so I can add (fixed) to the title.
__________________
There are no problems, only solutions. - John Lennon
karbomusic is offline   Reply With Quote
Old 06-12-2020, 12:17 PM   #28
akademie
Human being with feelings
 
Join Date: Mar 2007
Posts: 1,607
Default

Nice, thanx.
akademie is offline   Reply With Quote
Old 06-12-2020, 12:56 PM   #29
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 5,821
Default

Quote:
Originally Posted by Justin View Post
We should definitely notify, I agree, this is overdue. We'll be adding this in the next cycle (with an option to stop audio processing if this occurs in order to draw attention to the issue).
Great!
Thanks.
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is offline   Reply With Quote
Old 06-12-2020, 03:12 PM   #30
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 658
Default

Awesome!
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1200 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper - Donate, if you wish
Meo-Ada Mespotine is offline   Reply With Quote
Old 06-19-2020, 02:07 PM   #31
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: Apr 2020
Location: Leipzig
Posts: 658
Default

Quote:
Originally Posted by karbomusic View Post
Yip, Yip, Yippieeeee.

Thanks Justin!


Edit: Once a pre-release build lands, someone let me know if I miss so I can add (fixed) to the title.
It is now added.
__________________
Use you/she/her, when contacting me, please. Thanks :) Not mentoring via PMs, sorry.
Ultraschall-API - 1200 ReaScript functions for Reaper - Reaper Internals - Developerdocs4Reaper - Donate, if you wish
Meo-Ada Mespotine is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:22 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.