BDF file failed to save due to insufficient disk space
I collected sleep data for one night, usually a temp.txt file is generated when I start recording, and it will be saved as bdf when I close the software, but my data is not all saved successfully, only part of it is saved, after I checked the console data Found out that it is due to insufficient disk space, I want to know now that I have cleaned up the disk space, but how can I save the previous temp data as a bdf file, I did not find related similar problems on the forum, I hope to be able to get help, thank you very much !


Comments
Hello Hiking,
My understanding is that this mishap occurred because your Windows system ran out of free disk space as you were recording a BDF file. And the partial
temp.txtfile is left in the folder, thus was not converted to the proper BDF file.My suggestion would be to examine the BDF writing code in the GUI source. And see if you can replicate what happens when the BDF / txt file is properly closed and terminated. My guess is that that BDF 'header' portion is not written until the file is complete.
https://github.com/OpenBCI/OpenBCI_GUI/blob/master/OpenBCI_GUI/DataWriterBDF.pde
The
closeFile()function is located at line 270:https://github.com/OpenBCI/OpenBCI_GUI/blob/master/OpenBCI_GUI/DataWriterBDF.pde#L270
It's remotely possible that Richard @retiutut may have some further insights on how to recover your partial file. But really, since this was an error caused by your hard drive being full, the GUI has no 'built-in' means of recovering that. You will need to look at the code above and see if you can create some GUI source code mods that will recover your file. Since this type of disk-full situation occurs so very rarely, it would be a lower priority for the developers to work on. And may not even be possible to address at the moment of disk-full error, since disk writes must occur to finalize the BDF header.
You can log an issue on this page:
https://github.com/OpenBCI/OpenBCI_GUI/issues
Finally, the EDFBrowser has a file header editing mode. That may be able to read / modify the txt file you have, but not sure until you try it:
https://www.teuniz.net/edfbrowser/EDFbrowser manual.html
https://openbci.com/forum/index.php?p=/discussion/2168/bdf-fix-coming-in-gui-4-1-3
William
For BDF, we have to write the temporary file to the primary hard drive for the operating system. There should be at least 10 GB free for a 12hr recording. Though, when your hard drive is this full, it degrades the performance of the entire computer. It's best to have at least 50-100GB free space on the drive that your operating system runs from. I would consider this recording lost and try again. We're sorry this recording didn't work out, but in every failure is a chance to learn and the opportunity to try again with better results.