Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Random crashes during ResolveSceneSections when loading scenes (0.31)

Discussion in 'Project Tiny' started by BlaiseRoth, Dec 6, 2020.

  1. BlaiseRoth

    BlaiseRoth

    Joined:
    Oct 11, 2016
    Posts:
    8
    This crash occurs when loading the scene sections for any scenes in the build. It seems to be random, happens about 50% of the time for me when loading 10 scenes. Also happens even for the sample projects like Tiny3D. Here I run Tiny3D (the latest update for it, for 0.31) twice, with no change in between, and the second time it crashes:

    PS C:\Users\Me\ProjectTinySamples-master\Tiny3D - Copy\Builds\tiny3d-win-dotnet> .\Tiny3D.exe
    Streamed scene with 58ms latency from Data/SubScenes/46b433b264c69cbd39f04ad2e5d12be8.0.entities
    Streamed scene with 7ms latency from Data/SubScenes/1b436f617d6d3bb49aba65ff9f2581c7.0.entities
    PS C:\Users\Me\ProjectTinySamples-master\Tiny3D - Copy\Builds\tiny3d-win-dotnet> .\Tiny3D.exe
    Streamed scene with 58ms latency from Data/SubScenes/46b433b264c69cbd39f04ad2e5d12be8.0.entities

    Unhandled Exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
    at Unity.Collections.LowLevel.Unsafe.UnsafeUtility.MemCpy(Void* dst, Void* src, Int64 n)
    at Unity.Entities.Serialization.MemoryBinaryReader.ReadBytes(Void* data, Int32 bytes)
    at Unity.Entities.BlobAssetReference`1.TryRead(Byte* data, Int32 version, BlobAssetReference`1& result)
    at Unity.Scenes.ResolveSceneSectionUtility.ResolveSceneSections(EntityManager EntityManager, Entity sceneEntity, Hash128 sceneGUID, RequestSceneLoaded requestSceneLoaded, Hash128 artifactHash)
    at Unity.Scenes.ResolveSceneReferenceSystem.<OnUpdate>b__0_1(Entity sceneEntity, SceneReference& scene, RequestSceneLoaded& requestSceneLoaded)
    at Unity.Scenes.ResolveSceneReferenceSystem.Unity.Scenes.<>c__DisplayClass_OnUpdate_LambdaJob1.PerformLambda(Void* jobStructPtr, Void* runtimesPtr, Entity entity)
    at Unity.Entities.CodeGeneratedJobForEach.StructuralChangeEntityProvider.IterateEntities(Void* jobStruct, Void* runtimes, PerformLambdaDelegate action)
    at Unity.Scenes.ResolveSceneReferenceSystem.Unity.Scenes.<>c__DisplayClass_OnUpdate_LambdaJob1.Execute(ComponentSystemBase componentSystem, EntityQuery query)
    at Unity.Scenes.ResolveSceneReferenceSystem.OnUpdate()
    at Unity.Entities.SystemBase.Update()
    at Unity.Entities.ComponentSystemGroup.UpdateAllSystems()
    at Unity.Entities.ComponentSystem.Update()
    at Unity.Tiny.UnityInstance.UpdateLoading()
    at Unity.Tiny.UnityInstance.Update(Double timestampInSeconds)
    at Unity.Tiny.EntryPoint.Program.<>c__DisplayClass0_0.<Main>b__0(Double timestampInSeconds)
    at Unity.Platforms.RunLoopImpl.EnterMainLoop(RunLoopDelegate runLoopDelegate)
    at Unity.Tiny.EntryPoint.Program.Main()

    I haven't attached a sample project, because like I say, this happens for any project. I'm building with the Win-DotNet target (happens in Debug, Develop, and Release).
     
    Last edited: Dec 7, 2020
  2. AbdulAlgharbi

    AbdulAlgharbi

    Unity Technologies

    Joined:
    Jul 27, 2018
    Posts:
    319
    Thanks for reporting this issue
    I've created an internal bug (DOTSR-2447) to track this