Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Entities 0.17 windows build error: "The scene catalog has not been loaded yet"

Discussion in 'Entity Component System' started by LudiKha, Feb 3, 2021.

  1. LudiKha

    LudiKha

    Joined:
    Feb 15, 2014
    Posts:
    138
    I get the following error in a windows build:

    How to reproduce:
    - Install entities 0.17
    - Build development build to windows
    - See error
     
    Shinyclef and argibaltzi like this.
  2. AlexHolderDev

    AlexHolderDev

    Joined:
    Jul 2, 2014
    Posts:
    35
    Wow, timing here is wild. I just encountered this while testing out a build on Nintendo Switch for another thread's issue. I get some other messages related to DOTS but the final one seems to be this exact same error.


    Unity 2020.2.2f1
    Hybrid Renderer 011.0-preview.42 (dependent on Entities 0.17.0-preview.41)

    I just made a project with the URP template, installed the Hybrid Renderer package, enabled the V2 renderer, and did a build & run for the Switch platform.
     
    LudiKha likes this.
  3. argibaltzi

    argibaltzi

    Joined:
    Nov 13, 2014
    Posts:
    215
    I have the same problem with unity 2020.2.2 and the latest entities, physics, hdrp and hybrid renderer
     
  4. maxxa05

    maxxa05

    Joined:
    Nov 17, 2012
    Posts:
    186
    I got the same here, anybody found a way to fix this?
     
  5. maxxa05

    maxxa05

    Joined:
    Nov 17, 2012
    Posts:
    186
    In fact I misread, on my end it crashes a standalone build with IL2CPP at startup. It seems to be linked to a catalog.bin file that should be created during the build in the StreamingAssets folder, I guess it happens when we're not using a feature which creates this file, but I can't find which.
     
  6. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,626
    Are you building it with the new build configuration pipeline?
     
    MNNoxMortem likes this.
  7. argibaltzi

    argibaltzi

    Joined:
    Nov 13, 2014
    Posts:
    215
    should we build it with the new config pipeline or not? if so what package is that
     
  8. PublicEnumE

    PublicEnumE

    Joined:
    Feb 3, 2019
    Posts:
    729
    Oh, I had assumed everyone was getting this.

    Is there a new approach required to make DOTS builds now? If so, that was not well communicated.
     
    Last edited: Feb 10, 2021
    Shinyclef and AlexHolderDev like this.
  9. maxxa05

    maxxa05

    Joined:
    Nov 17, 2012
    Posts:
    186
    Oh well, that's probably it, I have no build configuration pipeline setupped right now. I have a hard time determining how to do this though, I can't find clear documentation on this.
     
  10. Kowarenai

    Kowarenai

    Joined:
    May 27, 2019
    Posts:
    14
    Bas-Smit, Shinyclef, LudiKha and 2 others like this.
  11. tommox86

    tommox86

    Joined:
    Apr 30, 2015
    Posts:
    81
    any fix for this?
     
  12. argibaltzi

    argibaltzi

    Joined:
    Nov 13, 2014
    Posts:
    215
    follow the instructions on the link kowarenai posted
    you need install a package and use that package to build and run, the old way of build and run is over
     
  13. Qhuhuit

    Qhuhuit

    Joined:
    Feb 17, 2018
    Posts:
    39
    Hello, I do have this error too,
    but my project only uses entities and jobs for an optimized A* pathfinding, otherwise everything is classic monobehaviour,
    do I need the build configuration asset nonetheless ?
     
  14. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,292
    Unfortunately, yes. Conversion and subscenes are embedded into Entities package, so there seems to be no way of stripping them.
     
  15. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,626
    I don't think that's true.

    We've never had any issue in our main project using the old build pipeline (even latest entities 0.17) without build configuration (it's old, before conversion existed so doesn't make any use of it.)
     
  16. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,292
    Well, it depends I guess.
    Haven't tested myself, but if conversion / subscenes is used - those probably will not work correctly.
     
  17. maxxa05

    maxxa05

    Joined:
    Nov 17, 2012
    Posts:
    186
    I actually successfully built without the build configuration by removing the automatic bootstrap. You need to define the UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP symbol, then make your own bootstrap, something like:

    Code (CSharp):
    1.     [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
    2.     private static void Initialize()
    3.     {
    4. #if UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP
    5.         DefaultWorldInitialization.Initialize("Default World", false);
    6. #endif
    7.     }
    We don't use subscenes though, and they won't work without the DOTS build configuration stuff. It's not really a documented way of doing things, but for now it works fine.
     
    Last edited: Apr 9, 2021
  18. Qhuhuit

    Qhuhuit

    Joined:
    Feb 17, 2018
    Posts:
    39
    Please can you elaborate ? I have no idea what a bootstrap is in the unity context, and I don't know in what class / file to put your code snippet in.
    My Android release build is not working anymore on Unity 2021, though the debug build is working fine.
    The release build crash on load, with an obscur SIGSEGV so the only error I can pull of is from the debug build logcat, which is
    Code (CSharp):
    1. Error Unity AssertionException: The scene catalog has not been loaded yet
    2. Error Unity Assertion failure. Value was False
    3. Error Unity Expected: True
    4. Error Unity   at UnityEngine.Assertions.Assert.Fail (System.String message, System.String userMessage) [0x00000] in <00000000000000000000000000000000>:0
    5. Error Unity   at Unity.Scenes.SceneSystem.GetSceneGUID (System.String scenePath) [0x00000] in <00000000000000000000000000000000>:0
    6. Error Unity   at Unity.Scenes.GameObjectSceneUtility.AddGameObjectSceneReferences () [0x00000] in <00000000000000000000000000000000>:0
    7.  
    otherwise everything is working and the debug build don't crash so I'm assuming this is the cause of the release build crash. I do not use the new build configuration and the exact same DOTS code was working on Unity 2020 Android release build !
    > Edit : I've isolated my DOTS code into a blank project and the release build is working despite the same error is present, so this should not be the cause of the crash, and my code does still work without build configurations
    > Edit 2 : disabling IL2CPP makes the Android release build working, but I cannot rely on mono to release my build, I need ARM x64 support
     
    Last edited: Apr 21, 2021
  19. maxxa05

    maxxa05

    Joined:
    Nov 17, 2012
    Posts:
    186
    Just create a static class, put this method in it, and add UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP to your scripting symbols. this will remove the default DOTS bootstrap calling the function that is crashing, and using the one you just created instead.
     
    AdamBebko likes this.
  20. Qhuhuit

    Qhuhuit

    Joined:
    Feb 17, 2018
    Posts:
    39
    Haven't tried your fix but find another one!
    I've rolled back entities package to 0.16.0 and the crash disappeared :)
    First I though it was because of Unity 2021 not supporting Entities 0.17 (as written here : https://forum.unity.com/threads/notice-on-dots-compatibility-with-unity-2021-1.1091800/).
    But rolling back to Unity 2020 didn't fix the crash,
    Only rolling back entities package to 0.16.0 (Even with Unity 2021) is working for building IL2CPP Android x64 build.
     
  21. maxxa05

    maxxa05

    Joined:
    Nov 17, 2012
    Posts:
    186
    Yeah that's a new bug with 0.17.0. My fix is a workaround to make that run without using the DOTS build pipeline.
     
  22. AdamBebko

    AdamBebko

    Joined:
    Apr 8, 2016
    Posts:
    161

    Thanks so much, this saved me.

    just a note, I was experiencing this problem only on IOS builds, so I added an #if UNITY_IOS surrounding the entire static class.
     
  23. fatihkranlootcopter

    fatihkranlootcopter

    Joined:
    Nov 20, 2020
    Posts:
    7
    Thank you, i was struggling with this for two days
     
  24. nikk98

    nikk98

    Joined:
    Mar 8, 2021
    Posts:
    43
    I've recently discovered DOTS recently and I'd love to use it for my project.

    I'm building with the new configuration system and I'm having the same exception on Android builds:

    2021-06-01 03:12:48.710 22055-22116/com.HelloEntities2020.HelloEntities2020 E/Unity: AssertionException: The scene catalog has not been loaded yet
    Assertion failure. Value was False
    Expected: True
    at UnityEngine.Assertions.Assert.Fail (System.String message, System.String userMessage) [0x0003c] in /Users/bokken/buildslave/unity/build/Runtime/Export/Assertions/Assert/AssertBase.cs:29
    at UnityEngine.Assertions.Assert.IsTrue (System.Boolean condition, System.String message) [0x00009] in /Users/bokken/buildslave/unity/build/Runtime/Export/Assertions/Assert/AssertBool.cs:20
    at Unity.Assertions.Assert.IsTrue (System.Boolean condition, System.String message) [0x00008] in .../games/SimpleEntities2020/Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Entities/Stubs/Unity.Assertions/Assert.cs:24
    at Unity.Scenes.SceneSystem.GetSceneGUID (System.String scenePath) [0x00001] in .../games/SimpleEntities2020/Library/PackageCache/com.unity.entities@0.17.0-preview.42/Unity.Scenes/SceneSystem.cs:97
    at Unity.Scenes.GameObjectSceneUtility.AddGameObjectScene

    I've run the code on 60+ devices on Firebase, I get the exception everywhere. I've also seen crashes in some devices, that did go away after using the trick mentioned here - even though I'm building with the new system. I'm also on the latest com.unity.rendering.hybrid as well as com.unity.platforms.android.

    How benign this exception is? I'd hate to have random exceptions in production masking real problems but if this can cause crashes unfortunately I'd have to abandon my DOTS ambitions.
     
  25. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    943
    I'm in the process of fixing this on our project. I still don't get it. First right of the bat is installing the package com.unity.platforms.windows. I can't find it in Package Manager. I can only only find com.unity.platforms. Is this it?

    Next step is to create the Build Configuration. So I clicked Assets > Create > Build but I don't know what to do with this asset.
    upload_2021-7-10_15-53-2.png

    Tried clicking Build, but shows up this error:
    No valid build pipeline found for BuildConfiguration. At least one component that derives from IBuildPipelineComponent must be present.

    So I made a test class BuildPipeline but couldn't find the interface IBuildPipelineComponent. Maybe I installed the wrong platforms? How did you guys do it? Please share step by step.

    Edit: Tried clicking Add Component and I saw different components for building. I thought I needed to code my own. But anyways, still confusing. I don't know which components to add. Tried adding Classic Build Profile but again requires the package com.unity.platforms.windows but I can't find it in Package Manager.
     
    Last edited: Jul 10, 2021
  26. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,626
    com.unity.platforms.windows works fine for me in 2020.3. What version of unity are you using?

    com.unity.platforms is just the base package, you need the platform specific ones to build for them which are

    com.unity.platforms.android@0.10.0-preview.10
    com.unity.platforms.desktop@0.10.0-preview.10
    com.unity.platforms.ios@0.10.0-preview.10
    com.unity.platforms.linux@0.10.0-preview.10
    com.unity.platforms.macos@0.10.0-preview.10
    com.unity.platforms.web@0.10.0-preview.10
    com.unity.platforms.windows@0.10.0-preview.10

    Then you just go
    Create -> Build -> Windows Classic Build Configuration

    Then will look like this
    upload_2021-7-10_18-44-37.png

    Or just look at the samples? https://github.com/Unity-Technologi.../master/ECSSamples/Assets/BuildConfigurations
     
    davenirline likes this.
  27. wlssing

    wlssing

    Joined:
    Jul 24, 2021
    Posts:
    8
    #UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP_RUNTIME_WORLD Disable automatic create World。

    #UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP_EDITOR_WORLD Disable automatic editor create World。

    #UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP It is forbidden to automatically create the above two types World。

    ecs will automatically create the world
    you need add UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP
    Macro definition to your project
    upload_2021-7-27_20-46-16.png
     

    Attached Files:

    tommox86 and Baggers_ like this.
  28. AlexHolderDev

    AlexHolderDev

    Joined:
    Jul 2, 2014
    Posts:
    35
    Just got this error on a fresh DOTS 0.51 project, trying to build with the regular old-fashioned build window instead of a Build Config. It was resolved by using Build Configs to build.

    But hey, Build Configs are meant to be killed by the time DOTS 1.0 comes around - so I'm posting this here as a "if you also figured learning Build Configs was a waste of time, you still need to use them for now" note.
     
  29. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,337
    The issue still persist witn Entities 0.51 in 2020.3.36f1, seems like UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP is not defined and somehow Entities requires to be defined. This is a regression from Entities 0.16 where it was first reported.
    The work around is to define the scripting symbol in the Player Settings manually: UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP.
     
    exsurgo_ankit and Emanx140 like this.