The behavior is very inconsistent for AudioClip.ReadData. Sometimes it works. Sometimes I get errors like this:
Which in the Editor log looks like:
[Worker2] Assertion failed on expression: 'length <= m_PCMReadArrayOrigLength'
[Worker2] Received signal SIGSEGV
[Worker2] Obtained 45 stack frames
0x00007ff6187d6135 (Unity) FMOD::SoundI::readData
0x00007ff6187d5b31 (Unity) FMOD::SoundI::read
0x00007ff6187b9e26 (Unity) FMOD::SystemI::createSoundInternal
0x00007ff6187b7510 (Unity) FMOD::SystemI::createSound
0x00007ff6187b1933 (Unity) FMOD::System::createSound
0x00007ff616f02c64 (Unity) LoadFMODSound
0x00007ff616effdeb (Unity) SoundManager::CreateSoundInternal
0x00007ff616ee34bb (Unity) AudioClip::CreateSound
0x00007ff616ee36ca (Unity) AudioClip::CreateUserSound
0x00007ff615cc1b01 (Unity) AudioClip_CUSTOM_CreateUserSound
0x0000020f0920f8be (Mono JIT Code) (wrapper managed-to-native) UnityEngine.AudioClip:CreateUserSound (UnityEngine.AudioClip,string,int,int,int,bool)
0x0000020f0920f4bb (Mono JIT Code) UnityEngine.AudioClip:Create (string,int,int,int,bool,UnityEngine.AudioClip/PCMReaderCallback,UnityEngine.AudioClip/PCMSetPositionCallback)
0x0000020f0920f303 (Mono JIT Code) UnityEngine.AudioClip:Create (string,int,int,int,bool)
0x0000020f0920e893 (Mono JIT Code) [SoundEffectAuthoring.cs:67] Lsss.Authoring.SoundEffectBaker:Bake (Lsss.Authoring.SoundEffectAuthoring)
And sometimes I get hard crashes like this:
[Worker2] FMOD was unable to select requested output: 4: "Cannot call this command after System::init. " (32)
[Worker2] FMOD was unable to select requested output: 4: "Cannot call this command after System::init. " (32)
[Worker2] FMOD was unable to select requested output: 2: "Cannot call this command after System::init. " (32)
[Worker2] Unable to initalize any audio device (even FMOD nosound device), please check your audio drivers and/or hardware for malfunction
Cancelling DisplayDialog because it was run from a thread that is not the main thread: Fatal Error! [Worker2] Unable to initalize any audio device (even FMOD nosound device), please check your audio drivers and/or hardware for malfunction
Aborting batchmode due to fatal error:
Unable to initalize any audio device (even FMOD nosound device), please check your audio drivers and/or hardware for malfunction
UnityEngine.AudioClip:GetData (single[],int)
Latios.Myri.Authoring.Systems.AudioClipSmartBlobberSystem:ReadClip (UnityEngine.AudioClip,Unity.Collections.LowLevel.Unsafe.UnsafeList`1<single>&) (at Packages/com.latios.latios-framework/MyriAudio/Authoring/AudioClipSmartBlobberSystem.cs:222)
Latios.Myri.Authoring.Systems.AudioClipSmartBlobberSystem:OnUpdate () (at Packages/com.latios.latios-framework/MyriAudio/Authoring/AudioClipSmartBlobberSystem.cs:121)
Unity.Entities.SystemBase:Update () (at Library/PackageCache/com.unity.entities@1.0.0-exp.8/Unity.Entities/SystemBase.cs:406)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems () (at Library/PackageCache/com.unity.entities@1.0.0-exp.8/Unity.Entities/ComponentSystemGroup.cs:670)
Unity.Entities.ComponentSystemGroup:OnUpdate () (at Library/PackageCache/com.unity.entities@1.0.0-exp.8/Unity.Entities/ComponentSystemGroup.cs:628)
Unity.Entities.SystemBase:Update () (at Library/PackageCache/com.unity.entities@1.0.0-exp.8/Unity.Entities/SystemBase.cs:406)
Unity.Entities.ComponentSystemGroup:UpdateAllSystems () (at Library/PackageCache/com.unity.entities@1.0.0-exp.8/Unity.Entities/ComponentSystemGroup.cs:670)
Unity.Entities.ComponentSystemGroup:OnUpdate () (at Library/PackageCache/com.unity.entities@1.0.0-exp.8/Unity.Entities/ComponentSystemGroup.cs:628)
Unity.Entities.SystemBase:Update () (at Library/PackageCache/com.unity.entities@1.0.0-exp.8/Unity.Entities/SystemBase.cs:406)
Unity.Entities.BakingUtility:PostprocessBake (Unity.Entities.World,Unity.Entities.BakingSettings,Unity.Entities.BakingSystem) (at Library/PackageCache/com.unity.entities@1.0.0-exp.8/Unity.Entities.Hybrid/Baking/BakingUtility.cs:102)
Unity.Entities.BakingUtility:BakeScene (Unity.Entities.World,UnityEngine.SceneManagement.Scene,Unity.Entities.BakingSettings,bool,Unity.Entities.IncrementalBakingChangeTracker) (at Library/PackageCache/com.unity.entities@1.0.0-exp.8/Unity.Entities.Hybrid/Baking/BakingUtility.cs:78)
Unity.Scenes.Editor.EditorEntityScenes:BakeAndWriteEntityScene (UnityEngine.SceneManagement.Scene,Unity.Entities.BakingSettings,System.Collections.Generic.List`1<Unity.Scenes.ReferencedUnityObjects>,Unity.Scenes.Editor.WriteEntitySceneSettings) (at Library/PackageCache/com.unity.entities@1.0.0-exp.8/Unity.Scenes.Editor/EditorEntityScenes.cs:73)
Unity.Scenes.Editor.SubSceneImporter:ImportBaking (UnityEditor.AssetImporters.AssetImportContext,UnityEngine.SceneManagement.Scene,Unity.Scenes.SceneWithBuildConfigurationGUIDs,Unity.Entities.Build.DotsPlayerSettings,Unity.Build.BuildConfiguration,UnityEngine.GameObject) (at Library/PackageCache/com.unity.entities@1.0.0-exp.8/Unity.Scenes.Editor/SubSceneImporter.cs:150)
Unity.Scenes.Editor.SubSceneImporter:OnImportAsset (UnityEditor.AssetImporters.AssetImportContext) (at Library/PackageCache/com.unity.entities@1.0.0-exp.8/Unity.Scenes.Editor/SubSceneImporter.cs:250)
UnityEditor.AssetImporters.ScriptedImporter:GenerateAssetData (UnityEditor.AssetImporters.AssetImportContext)
Crash!!!
========== OUTPUTTING STACK TRACE ==================
0x00007FFCFD784FD9 (KERNELBASE) RaiseException
0x00007FF617A9E80E (Unity) LaunchBugReporter
0x00007FF617461EA4 (Unity) EditorMonoConsole::LogToConsoleImplementation
0x00007FF617462753 (Unity) EditorMonoConsole::LogToConsoleImplementation
0x00007FF61811CFCF (Unity) DebugStringToFilePostprocessedStacktrace
0x00007FF61811C72D (Unity) DebugStringToFile
0x00007FF617D7F9B9 (Unity) OnDemandScheduler::OnLogToConsoleEntry
0x00007FF617E620DA (Unity) ImportWorkerManager::OnMessageReceived
0x00007FF617E62BEC (Unity) WorkerManagerASIO::OnMessageReceived
0x00007FF617E6AF7D (Unity) MessageReader::ReadMessage
0x00007FF617E6AD64 (Unity) MessageReader::Read
0x00007FF617E6C52B (Unity) TcpMessagingSession::OnReceiveCompleted
0x00007FF617E31567 (Unity) asio::asio_handler_invoke<asio::detail::binder2<<lambda_7bb410c7c74bfc0040fa015a32e4550e>,std::error_code,unsigned __int64> >
0x00007FF617E33EEA (Unity) asio::detail::executor_function::complete<asio::detail::binder2<<lambda_7bb410c7c74bfc0040fa015a32e4550e>,std::error_code,unsigned __int64>,std::allocator<void> >
0x00007FF617E295C1 (Unity) asio::io_context::basic_executor_type<std::allocator<void>,4>::execute<asio::detail::executor_function>
0x00007FF617E35323 (Unity) asio::detail::handler_work_base<asio::any_io_executor,void,asio::io_context,asio::executor,void>::dispatch<asio::detail::binder2<<lambda_7bb410c7c74bfc0040fa015a32e4550e>,std::error_code,unsigned __int64>,<lambda_7bb410c7c74bfc0040fa015a32e4550e> >
0x00007FF617E42F75 (Unity) asio::detail::win_iocp_socket_recv_op<asio::mutable_buffers_1,<lambda_7bb410c7c74bfc0040fa015a32e4550e>,asio::any_io_executor>::do_complete
0x00007FF617E2D46E (Unity) asio::detail::win_iocp_io_context::do_one
0x00007FF617E2F0D4 (Unity) asio::detail::win_iocp_io_context::run
0x00007FF617E3F91C (Unity) IOService::Run
0x00007FF617E408CB (Unity) IOService::Impl::ThreadFunction
0x00007FF61681D017 (Unity) Thread::RunThreadWrapper
0x00007FFCFE847034 (KERNEL32) BaseThreadInitThunk
0x00007FFCFFD62651 (ntdll) RtlUserThreadStart
========== END OF STACKTRACE ===========
Also, now I am getting these every second, even after a restart of Unity:
Edit: New Report 18952