Missing File confusion

Hi,

I’m getting a bunch “Missing File” instances in the Asset browser, and I’m generally confused by how Studio handles source assets. The file structure I’m working with is:
Source folder (wav files): C:\Audio\SFX
Project A folder: C:\Audio\ProjectA\ProjectA.fspro
Project B folder: C:\Audio\ProjectB\ProjectB.fspro

I also have my Asset folder location set to .. in the preferences, since it’s one level up from the project file locations. Any time I type ..\ or ../ into the field, Studio auto-changes it to ... Maybe this is related to these issues I’m encountering?

My workflow is: I’m dragging and dropping wav files from my SFX folder into events (as I create them). At one point I copied a whole folder of events from Project A to Project B, and it mostly worked fine, but then I noticed that any wav files that were used more than once were listed as missing. More specifically, the first instance was present in the event that used it, but any instances after that were missing. I tried changing the Asset folder location in case that was the problem, but that didn’t solve it, so i just copied the instance of each wav that Studio could locate and pasted it into the events that couldn’t find the wav. That fixed things up, but probably isn’t the correct solution.

Then I noticed that every wav file from the events that I copied over were now present in the root directory (C:\Audio), and if I deleted those wav files it caused both Project A and B to no longer be able to locate the source assets for those events. I.e. at some point Studio stopped using the original path of the wav assets.

I also noticed that a wav file had been copied and renamed from soundA.wav to soundA (2).wav at some point, and Studio was using that copy. My assumption is that Studio did this.

So my questions are:

  1. Is it clear what happened here? I.e. the missing duplicate instances of the same source file, and why Studio created copies of a bunch of wav files instead of just pointing the project to the source path?
  2. Is this all related to the copy and pasting of events from one project to another?
  3. Is there some tool to help Studio find the missing files? E.g have it scan the “Asset folder”. I’d rather not have it bloat the directory by making unnecessary copies of assets that are present in the “Asset folder”. I also don’t understand how both ProjectA and B had the path of these wav files changed to the root folder.

Having Studio create copies of assets and using those instead of the ones I originally dragged into the project is a bit worrisome to me. E.g. I might think I’m editing the source file and not realize that Studio is using a copy it created. Is there a setting to have things behave more akin to how things worked in Designer?

I’m using Studio version 1.10.11

Thanks,
Sean

What’s happening here is actually fairly complex, so this answer might end up being a little long.

  1. Is it clear what happened here? I.e. the missing duplicate instances of the same source file, and why Studio created copies of a bunch of wav files instead of just pointing the project to the source path?

You have discovered a previously-unknown bug. The bug’s direct consequences are fairly simple, but they can cause additional knock-on effects under some circumstances.

I’m getting a bunch “Missing File” instances in the Asset browser, and I’m generally confused by how Studio handles source assets. The file structure I’m working with is:
Source folder (wav files): C:\Audio\SFX
Project A folder: C:\Audio\ProjectA\ProjectA.fspro
Project B folder: C:\Audio\ProjectB\ProjectB.fspro

My workflow is: I’m dragging and dropping wav files from my SFX folder into events (as I create them). At one point I copied a whole folder of events from Project A to Project B, and it mostly worked fine, but then I noticed that any wav files that were used more than once were listed as missing. More specifically, the first instance was present in the event that used it, but any instances after that were missing.

I also noticed that a wav file had been copied and renamed from soundA.wav to soundA (2).wav at some point, and Studio was using that copy.

This is the bug: When you copy and paste an event that uses the same asset twice from one project to another project that shares the same external audio folder, a copy of the asset is created with a slightly different name and the original asset is deleted. This results in one of the instruments in the pasted event using the new copy of the asset and the other using the old deleted (and therefore missing) asset. I’ve added this issue to our bug tracker, and it will be fixed in an upcoming release of FMOD Studio.

For now, you should be able to work around this issue when it occurs by “consolidating” the missing assets with their non-missing versions: In the Assets browser, multi-select the missing and non-missing version of an asset, then right-click on the non-missing version and select “Consolidate…” from the context menu. You will have to do this in both projects.

I tried changing the Asset folder location in case that was the problem, but that didn’t solve it, so i just copied the instance of each wav that Studio could locate and pasted it into the events that couldn’t find the wav.

Then I noticed that every wav file from the events that I copied over were now present in the root directory (C:\Audio), and if I deleted those wav files it caused both Project A and B to no longer be able to locate the source assets for those events. I.e. at some point Studio stopped using the original path of the wav assets.

This behavior isn’t a bug in itself, but a consequence of the way you added new versions of the missing files to your project.

As I mentioned above, the bug you’ve discovered deletes affected audio files from your assets folder. When you paste an audio file into your project and the file isn’t already present in your assets folder, FMOD Studio automatically copies the file into your assets folder - and, since the files you were pasting had been deleted, they definitely weren’t present. FMOD Studio detected that they weren’t present, and did what it’s designed to do: Created copies of the pasted files in your assets folder, also known as “..”, also known as “C:\Audio”.

You only re-imported the files because they went missing due to the bug, so fixing the bug will prevent it from happening again. In the mean time, you should be able to avoid this issue by not dragging “missing” audio files directly onto events; instead, paste the missing files into the assets folder sub-directories they’re supposed to be in via Explorer, or drag the files from an Explorer window onto the folders they’re supposed to be in in the assets browser and choose “Replace” when prompted.

  1. Is this all related to the copy and pasting of events from one project to another?

Yes, though copying and pasting events from one project to another is usually safe, as it’s something we explicitly support. As far as I can tell, this particular bug only occurs when pasting an event that contains two references to the same asset file from one project to another when both projects share the same audio source directory.

You should be able to avoid this issue in future by giving each FMOD Studio project its own assets folder. We usually recommend doing this, partly because it reduces clutter and overhead and makes projects easier to manage, and partly because it allows you to rename and edit audio files used by one project without breaking other projects you might have. This bug you have discovered is another good reason.

  1. Is there some tool to help Studio find the missing files? E.g have it scan the “Asset folder”. I’d rather not have it bloat the directory by making unnecessary copies of assets that are present in the “Asset folder”. I also don’t understand how both ProjectA and B had the path of these wav files changed to the root folder.

Yes and no.

There is no way to scan a project for assets with identical filenames but different paths and consolidate them automatically, and there is definitely no way to scan for and automatically consolidate audio files with different filenames and paths, as is the case here.

However, the “Consolidate…” feature that I mentioned above allows you to replace a selection of assets with just one of those assets, and automatically updates all references to the replaced assets in the process. It’s primarily used for replacing redundant assets in large projects or outdated assets that have been replaced with new versions, but it’s also useful in this situation. Just make sure that the asset you right-click on to open the context menu is the non-missing asset, as that’s the asset that will replace the others.

As I mentioned above, the reason why the files paths were changed to the root folder is because you re-imported the files by adding the assets to events when they were missing. If you instead consolidate the missing files with their non-missing versions, copy the missing files into the locations they’re supposed to be in on your hard drive, or import the files into the correct folders in the assets browser, the paths will not be changed.

Having Studio create copies of assets and using those instead of the ones I originally dragged into the project is a bit worrisome to me. E.g. I might think I’m editing the source file and not realize that Studio is using a copy it created. Is there a setting to have things behave more akin to how things worked in Designer?

No, and we’re not going to add one. The behavior you have observed is the result of a bug, and we will fix the bug, but we have no plans to allow users to reference audio assets in more than one external directory.

The way FMOD Designer handled assets made FMOD Designer projects extremely fragile. A Designer project could make use of audio files scattered anywhere in a user’s directory structure. Moving any of those audio assets (or the project itself) would break the project in a way that wouldn’t be obvious until the project was opened and that particular asset was tested. This made Designer projects effectively non-portable, made archiving old projects so error-prone that it was almost impossible, and pointlessly punished anyone who reorganized their files, folders, drives, or network for any reason.

A user could potentially avoid all these issues by carefully copying all the audio files needed by a project into a single directory, and treating this asset directory and the project it was associated with as a single unit. When we made FMOD Studio, we therefore made this best practice the default. We still allow the assets folder to be an external to the project, as there are often good reasons to do that, but we have no interest in allowing a single project to make use of multiple external asset folders.

Any time I type ..\ or ../ into the field, Studio auto-changes it to .. . Maybe this is related to these issues I’m encountering?

The presence or absence of a terminating slash or backslash in your assets folder path has no effect on the folder targeted by that path; as far as FMOD Studio is concerned, there is no difference between “../” and “..”, nor between “C:\myFolder/” and “C:\myFolder”. There are rare applications that require a terminating slash in a path because of the way they concatenate paths and filenames, but FMOD Studio is not one of them.

Thanks a lot, Joseph. Glad you were able to make sense of my notes and determine I was experiencing a bug. The consolidate feature seems to be working well to tidy things up, so thanks for the details/instructions.

I imagine my concerns/confusion with how assets are managed will go away once that bug is no longer present. For Designer, I always made sure that every asset used in a project was present in the same folder as the .fdp, so it was easy for me to move the whole project over to a different drive/PC. However, it sounds like other people/companies work differently, and/or it’s simply not practical for them to do it the way I do.

Thanks again,
Sean

Hi Joseph,

Did the bug that manifests when copying events from one project to another by chance get fixed in version 1.10.12 or 2.00.00? I see in the release notes for 2.00.00 that “Various other issues have been fixed.”, so I figured it might be included in that?

Thanks,
Sean

As of the time of writing (April of 2019), that issue has not yet been fixed.

Until it is fixed, you should be able to avoid this issue giving each FMOD Studio project its own assets folder.

Thanks, Joseph.

Hi Joseph,

I may be in a situation where copying the source files to both “Assets” folders will not work. I’m not sure though. The project I’m copying from was already fully setup by the time I followed up on the status of this bug fix, so it’s using assets from an external folder. Therefore, I assume merely copying those assets to the “Assets” folder of both projects won’t work. I gave it a shot anyways and it broke a whole bunch of events in the source project (i.e. it added a “(2)” to the end of several wav files). After I finish repairing the source project, is there a way to make this work without the bug fix?

Thanks,
Sean

The issue is caused by both projects having the same assets directory, so the only way to make this work without the bug fix would be to set each project’s assets directory to a different directory, neither of which is nested within the other. Changing the assets directory in this way will necessitate manually copying the files from the old assets directory into both of the new assets directories.

Ok, thanks for clarifying, Joseph. I ended up just fixing the missing file instances and consolidating as needed. I didn’t want to end up with two or more sets of the same assets in multiple locations. It would complicate things if I ever needed to revise the source files.

Thanks again,
Sean