BUG: Importing lots of sound assets

I tried to import about 1200 sounds by copying over to a subdirectory of the Assets directory of my project, but got an error about Temp files when getting about 70% the way through.

“Opening file Temp/importedAudioTempPrimary:”

If I “try again,” it continues to fail.

If I then press cancel, it complains about not being able to open a file that actually exists on the hard drive even after the crash.
…
Temp/UnityTempFile-a797aca3a85b144b7b4c9fc82a39849e

I had the same problem a few times with a lot of sounds as well. The Universal Sound FX is probably a good package to use for testing this issue as it has 1000’s of sound files.

1 Like

Update: If I delete some of the files, it works fine.

I have plenty of space and memory available.

Thanks for the input too, Nathan. :slight_smile:

We’ll investigate, thanks.

Confirmed, fixed for an upcoming build.
As a workaround, you should be able to import audio files in smaller groups.

3 Likes

Thanks Tak!!! you guys rock!

Thanks Tak, I can’t wait for the next build :slight_smile:

No problem Jacob, thanks for reporting it in the first place, because once I had my project imported I forgot the issue even existed.

1 Like

Hi Tak,

Things look better in 5.2.2f for the importing, but I still have trouble. Somehow the files aren’t getting closed or something. I am importing about 500162 files.

Here’s the exception.

IOException: Too many open files
at System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs) [0x0015b] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/Directory.cs:525
at System.IO.Directory.GetFiles (System.String path, System.String searchPattern) [0x00000] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/Directory.cs:308
at System.IO.DirectoryInfo.GetFiles (System.String searchPattern) [0x00011] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/DirectoryInfo.cs:165
at System.IO.DirectoryInfo.GetFilesSubdirs (System.Collections.ArrayList l, System.String pattern) [0x00002] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/DirectoryInfo.cs:279
at System.IO.DirectoryInfo.GetFiles (System.String searchPattern, SearchOption searchOption) [0x00025] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/DirectoryInfo.cs:300
at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:GetFiles (string,System.IO.SearchOption)
at VoxelBusters.Utility.StrippingBlacklistGenerator.FindAndMergeLinkFiles () [0x00017] in /home/martin/Research/Unity/FarSaid/FarSaidUnity/Assets/VoxelBusters/Common/Utility/Automators/Script/StrippingBlacklist/StrippingBlacklistGenerator.cs:117
at VoxelBusters.Utility.StrippingBlacklistGenerator.OnPostprocessAllAssets (System.String[ ] importedAssets, System.String[ ] deletedAssets, System.String[ ] movedAssets, System.String[ ] movedFromAssetPaths) [0x00006] in /home/martin/Research/Unity/FarSaid/FarSaidUnity/Assets/VoxelBusters/Common/Utility/Automators/Script/StrippingBlacklist/StrippingBlacklistGenerator.cs:47
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[ ],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) [0x000d0] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) [0x000eb] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[ ] parameters) [0x00000] in /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115
at UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[ ] importedAssets, System.String[ ] addedAssets, System.String[ ] deletedAssets, System.String[ ] movedAssets, System.String[ ] movedFromPathAssets) [0x0004d] in /home/builduser/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:27

(Filename: /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.IO/Directory.cs Line: 525)

Hope that helps!

Best,
Jake

Levi, I can confirm this as well that the bug is still there. After running Unity a few times it finally goes through. From the error message, it seams to get hung up with the Temp directory.

“Opening file Temp/importedAudioTempPrimary:”

This is while importing the same sound pack that I mentioned above. I’m on Linux Mint 14.2 and it happened earlier on Ubuntu Mate 15.04

Hm, jacobgmartin’s error looks like it could actually be something different - if you’ve got the repro project for that, I’d like to use it for testing.

NathanWarden - that’s odd, I used that package for finding the issue and testing the fix. I’d better doublecheck and make sure the fix actually landed in the release branch.

I also got the audio temp errors sometimes but the stacktrace i posted did happen once also. It is probably related I guess.

I am guessing the fix didnt make it into the release because it isnt fixed at all and also because the fix was confirmed on 10/20 and the new buid has a 10/18 date. I dont know if these dates mean anything but i was hoping it was something simple like that and a repackaging would include your new fix. .

Thanks Levi, much appreciated. Almost everything else is running great.