Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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

Discussion in 'Profiler Previews' started by pavelkouril, Dec 19, 2018.

  1. pavelkouril

    pavelkouril

    Joined:
    Jul 22, 2016
    Posts:
    129
    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.

    Code (CSharp):
    1. IOException: Sharing violation on path C:\work\unity\foo\MemoryCaptures\Snapshot-636808108952201212.snap
    2. 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)
    3. 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)
    4. System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
    5. (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)
    6. UnityEditorInternal.Profiling.Memory.Experimental.MemorySnapshotFileReader.Open (System.String filePath) (at C:/buildslave/unity/build/Modules/ProfilerEditor/MemoryProfiler/MemorySnapshotFileReader.cs:120)
    7. UnityEditorInternal.Profiling.Memory.Experimental.MemorySnapshotFileReader..ctor (System.String filePath) (at C:/buildslave/unity/build/Modules/ProfilerEditor/MemoryProfiler/MemorySnapshotFileReader.cs:99)
    8. UnityEditor.Profiling.Memory.Experimental.PackedMemorySnapshot.Load (System.String path) (at C:/buildslave/unity/build/Modules/ProfilerEditor/MemoryProfiler/MemorySnapshot.cs:18)
    9. Unity.MemoryProfiler.Editor.SnapshotFileData.LoadSnapshot () (at Library/PackageCache/com.unity.memoryprofiler@0.1.0-preview.3/Editor/UI/Workbench/SnapshotFileData.cs:179)
    10. 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)
    11. 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)
    12. Unity.MemoryProfiler.Editor.SnapshotCollection.RefreshCollection () (at Library/PackageCache/com.unity.memoryprofiler@0.1.0-preview.3/Editor/UI/Workbench/SnapshotCollection.cs:157)
    13. Unity.MemoryProfiler.Editor.SnapshotCollection.PoolForApplicationFocus () (at Library/PackageCache/com.unity.memoryprofiler@0.1.0-preview.3/Editor/UI/Workbench/SnapshotCollection.cs:177)
    14. UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/Editor/Mono/EditorApplication.cs:200)
    15.  
    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?
     
  2. G_Wojo

    G_Wojo

    Unity Technologies

    Joined:
    Feb 8, 2017
    Posts:
    44
    Hello pavelkouril,

    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.
     
  3. pavelkouril

    pavelkouril

    Joined:
    Jul 22, 2016
    Posts:
    129
    Hello, done.

    Reported it as a Case 1111448.
     
    LeonhardP likes this.
  4. pavelkouril

    pavelkouril

    Joined:
    Jul 22, 2016
    Posts:
    129
    Allegedly, should be fixed in 0.1.0-preview.4. Thanks!
     
    MartinTilo likes this.