 |
|
|
06-16-2022, 05:57 PM
|
#1
|
Human being with feelings
Join Date: Dec 2010
Location: Hampstead, NC
Posts: 189
|
Reaper Saves WAV Files with Filenames It Can't Open
Bad form when recording and not catching it will result in wav files that won't be found when the project is reopened.
Bad Form? Working with tracks that have no names.
- Create a track
- Don't give the track a name at all - leave it blank
- Do whatever (MIDI, wave, doesn't matter, add something that will play and can be rendered) Render that track as a stem
- The new track name will be " - stem" as it is the original track name with " - stem" appended.
- The resulting wav will be named something like "myprojectname_stems-001.wav" (this is irrelevant mostly)
- Right-click, and glue the items in that track, even if just the one stem
- The underlying glued wav(s) will be named " - stem-glued.wav", " - stem-glued-01.wav", " - stem-glued-02.wav", etc, as they will be the track name and "-glued"
- Save and close the project
- Reopen the project
- Or copy the entire folder, all files to another machine and try to open it. No dice.
- Any wav files with names like " - stem-glued.wav" cannot be found.
This may be a long unnecessary repro (sorry - this is how I hit it)
Maybe it's as simple as any WAV files that have a space as the first character of the filename can't be opened which these steps will set up.
Easy to avoid. Always name tracks SOMETHING.
But, the bug is that Reaper can and will save out files with filenames it can't open later.
|
|
|
06-16-2022, 06:08 PM
|
#2
|
Administrator
Join Date: Mar 2007
Location: NY
Posts: 14,449
|
What OS is this? I can't reproduce any problem following these steps, or generally opening a file named " - stem.wav" on Windows.
|
|
|
06-16-2022, 06:49 PM
|
#3
|
Human being with feelings
Join Date: Dec 2010
Location: Hampstead, NC
Posts: 189
|
Windows 10.
A filename with a leading space is perfectly acceptable in Windows. The issue seems to be specific to cold opening a project that has references these files.
I copied the whole project folder, all files, from the desktop to the laptop and the laptop Reaper barfed on those files. All files are in the folder.
Browsing for the files and selecting them one at a time WILL allow them to open.
Heck, it's debatable what the bug is.
Reaper can't find them when the project is opened. Browsing for them works, so you are correct that the file names are legal.
Is there a bug in the initial file opening code? Is something in there stripping the space, looking for the correct file if that space is removed? (Trivial to test and I will.) Maybe, but the track itself references the filename with the space. Testing will let us know what happens if the initial load works but the filename referenced is different.
Is the bug that creating a stem track from an unnamed track results in a track that is named with a leading space? That's the root of the repro. There's nothing wrong with a leading space on a track if nothing else depends on it.
But, in spite of that, a naming convention to blindly uses the track name as-is and appends "-glued" may be a potential bug, as it doesn't check for leading spaces in the track name. Changing this would fix the problem.
Just pondering what-ifs.
|
|
|
06-16-2022, 07:00 PM
|
#4
|
Human being with feelings
Join Date: Dec 2010
Location: Hampstead, NC
Posts: 189
|
AH AH AH!!!!!!
FOUND A PROBLEM! (the?)
Reaper is NOT saving the glued files with leading spaces.
Reaper IS saving them with NO leading space but when the project is saved and reopened it is looking for the file WITH the leading space.
Full path reference in the project:
"C:\reaper_default\phoo_three\phoo_22_06_12\ - stem-glued.wav"
Full path to the files in the project folder:
"C:\reaper_default\phoo_three\phoo_22_06_12\- stem-glued.wav"
|
|
|
06-17-2022, 04:59 AM
|
#5
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,223
|
How are you transferring the files from system to system?
Can you follow the minimal steps to reproduce, and when you go to copy the files from the source machine make a zip of the directory, and include a copy of your reaper.ini? Then email a copy of that zip to support at cockos dot com? thanks!
Last edited by Justin; 06-17-2022 at 05:39 AM.
|
|
|
06-17-2022, 08:56 AM
|
#6
|
Human being with feelings
Join Date: Dec 2018
Posts: 37
|
Quote:
Originally Posted by phoo
Windows 10.
A filename with a leading space is perfectly acceptable in Windows
|
Yes and no. Technically you CAN NOT create files that begin with the ascii space character (0x20). But you CAN create files that LOOK LIKE they have spaces. The things you think are spaces are actually called “unicode whitespace characters”.
But wait!
There’s more!
If you use the undocumented function NtCreateFile() in NtDll.dll to create the file then you can do all kinds of weird shit - including creating files that begin with 0x20. You can also create files that begins with ascii null (0x00), and those file will be invisible.
https://docs.microsoft.com/en-us/tro...ace-characters
https://docs.microsoft.com/en-us/win...l-ntcreatefile
|
|
|
06-17-2022, 11:43 AM
|
#7
|
Administrator
Join Date: Jan 2005
Location: NYC
Posts: 15,223
|
Ah, Windows removes the leading spaces if you copy the file via explorer. We'll make REAPER automatically not create files with leading spaces on Windows.
Quote:
If you use the undocumented function NtCreateFile() in NtDll.dll to create the file then you can do all kinds of weird shit - including creating files that begin with 0x20. You can also create files that begins with ascii null (0x00), and those file will be invisible.
|
Looks like if you use the \\?\ syntax for file openings (REAPER does, it allows for long filenames too) you can use spaces as the first character of filenames.
Last edited by Justin; 06-17-2022 at 12:05 PM.
|
|
|
06-17-2022, 02:07 PM
|
#8
|
Human being with feelings
Join Date: Dec 2010
Location: Hampstead, NC
Posts: 189
|
YES, YES and YES.....
Thanks for getting to this before I did. It is in fact the "copy from system to system" step that horked the project.
The steps to create an unnamed track, stem, and glue, did create a referenced WAV what had what looked like a leading space, regardless of what that character is under the hood. Reaper is happy with that file, as-is.
Copy that project on Windows 10 and the leading space (that non-printable character) on the filename gets stripped off. At that point Reaper can't find it because Windows renamed it to something else. Well...duh!
That was a totally unexpected behavior when moving projects from the desktop in the studio to the laptop.
Let me know if a project is still needed. I assume not.
THANK YOU!!!
|
|
|
06-18-2022, 08:26 AM
|
#9
|
Human being with feelings
Join Date: Dec 2018
Posts: 37
|
Quote:
Originally Posted by Justin
Looks like if you use the \\?\ syntax for file openings (REAPER does, it allows for long filenames too) you can use spaces as the first character of filenames.
|
Aha! That makes sense. It never occurred to me.
Fwiw I learned about NtCreateFile() years ago when writing a DirectShow filter to read Sound Designer II files. It allows you read the dot-underscore side-car files that hold the resource fork metadata.
|
|
|
06-18-2022, 09:10 AM
|
#10
|
Human being with feelings
Join Date: Dec 2010
Location: Hampstead, NC
Posts: 189
|
I'll leave y'all alone to discuss after this (and this is nothing terribly useful and yes, I am being redundant)
- Reaper can currently create filenames with leading non-printable characters and save projects referencing them as such
- Windows will trim any leading non-printable characters during file copy thereby changing the filename (when moving a project for example)
- Reaper can't find those files when the project is reopen as the referenced files in the project are not there AS-ORIGINALLY-NAMED
That's a lot simpler than originally thought, even if getting there is a bit out there. Knowing these three things will make it easy to avoid, and will make fixing the projects easier if it happens again (if I forget to name a track again, and I know I will at some point).
THANKS for getting to the bottom of this so quickly.
|
|
|
06-19-2022, 03:35 AM
|
#11
|
Human being with feelings
Join Date: Mar 2007
Posts: 3,289
|
Well, this has been fixed in v6.61+dev0618.
Quote:
Originally Posted by Sexan
v6.61+dev0618 - June 18 2022- ...
- + Windows: avoid creating filenames that start with a space character [t=267882]
...
|
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 10:31 AM.
|