[1111448] [Fixed]Sharing violation while capturing and alt tabbing back into Unity

Hello,

I’m stumbling upon an error while trying to do a capture of our game from a Standalone Windows player. The error reads as follows.

This SEEMS to happen when i start capturing, then go into another application, and then alt tab back into Unity.

IOException: Sharing violation on path C:\work\unity\foo\MemoryCaptures\Snapshot-636808108952201212.snap
System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
(wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
UnityEditorInternal.Profiling.Memory.Experimental.MemorySnapshotFileReader.Open (System.String filePath) (at C:/buildslave/unity/build/Modules/ProfilerEditor/MemoryProfiler/MemorySnapshotFileReader.cs:120)
UnityEditorInternal.Profiling.Memory.Experimental.MemorySnapshotFileReader..ctor (System.String filePath) (at C:/buildslave/unity/build/Modules/ProfilerEditor/MemoryProfiler/MemorySnapshotFileReader.cs:99)
UnityEditor.Profiling.Memory.Experimental.PackedMemorySnapshot.Load (System.String path) (at C:/buildslave/unity/build/Modules/ProfilerEditor/MemoryProfiler/MemorySnapshot.cs:18)
Unity.MemoryProfiler.Editor.SnapshotFileData.LoadSnapshot () (at Library/PackageCache/com.unity.memoryprofiler@0.1.0-preview.3/Editor/UI/Workbench/SnapshotFileData.cs:179)
Unity.MemoryProfiler.Editor.SnapshotFileData..ctor (System.IO.FileInfo info) (at Library/PackageCache/com.unity.memoryprofiler@0.1.0-preview.3/Editor/UI/Workbench/SnapshotFileData.cs:147)
Unity.MemoryProfiler.Editor.SnapshotCollection.RefreshFileListInternal (System.IO.DirectoryInfo info) (at Library/PackageCache/com.unity.memoryprofiler@0.1.0-preview.3/Editor/UI/Workbench/SnapshotCollection.cs:93)
Unity.MemoryProfiler.Editor.SnapshotCollection.RefreshCollection () (at Library/PackageCache/com.unity.memoryprofiler@0.1.0-preview.3/Editor/UI/Workbench/SnapshotCollection.cs:157)
Unity.MemoryProfiler.Editor.SnapshotCollection.PoolForApplicationFocus () (at Library/PackageCache/com.unity.memoryprofiler@0.1.0-preview.3/Editor/UI/Workbench/SnapshotCollection.cs:177)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:200)

I can send a bug report, but it would be just an empty project with a memory profiler added in package.json, I guess - so not sure if that will have any real value?

Hello [pavelkouril]( [1111448] [Fixed]Sharing violation while capturing and alt tabbing back into Unity members/pavelkouril.1156383/),

We will look into this issue but I would still recommend you to open a bug report. This will allow us to track progress better and be in contact if we would need some extra information.

Hello, done.

Reported it as a Case 1111448.

1 Like

Allegedly, should be fixed in 0.1.0-preview.4. Thanks!

1 Like