Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Resolved HybridRenderer 0.11 V2 crashes player but works in play mode

Discussion in 'Graphics for ECS' started by GameDeveloper1111, Jan 28, 2021.

  1. GameDeveloper1111

    GameDeveloper1111

    Joined:
    Jul 24, 2020
    Posts:
    100
    Resolved:

    When using HybridRenderer 0.11.0-preview.42 V2, use a build configuration asset instead of using File --> Build Settings --> Build.

    not-this.png

    this-instead-0.png

    this-instead.png

    Original post:

    On Windows,

    Steps to reproduce:

    1. Create a new 2020.2.2f1 HDRP project.

    2. Add the following lines to manifest.json:

        "com.unity.rendering.hybrid": "0.11.0-preview.42",
    "com.unity.platforms.windows": "0.10.0-preview.10",


    3. Add
    ENABLE_HYBRID_RENDERER_V2
    to scripting define symbols.

    4. Build, run, and observe crash.

    upload_2021-1-28_2-29-26.png

    Why 2020.2:

    Using lightmaps with the HybridRenderer requires HybridRenderer 0.11.0 V2 (reference), which requires at least HDRP 10.1.0 (reference), which requires Unity 2020.2 (reference). (The DOTS 0.17 target is 2020.1.9f1 (reference))

    Why "Help Wanted":

    Maybe this is a user error. Maybe my setup is wrong. Please let me know if I should create a bug report or change the tag to "Bug".

    Why "com.unity.platforms.windows":

    I included this so that it wouldn't be a question later. However, I've been successfully building with DOTS (without the hybrid renderer) without com.unity.platforms.windows on 2020.2.0f1. I haven't tried building with DOTS without the hybrid renderer on 2020.2.2f1.
     
    Last edited: Jan 28, 2021
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,763
    I just went through from scratch and setup a default project with hybrid renderering and made a build and it loaded fine.

    I didn't setup anything to render with HRv2 because your post seemed to suggest just having HRv2 caused issues.

    I've attached my project.
     

    Attached Files:

    GameDeveloper1111 likes this.
  3. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,763
    The things I did

    Unity
    2020.2.2f1

    Packages i added were
    "com.unity.platforms.windows": "0.10.0-preview.10",
    "com.unity.render-pipelines.high-definition": "10.2.2",
    "com.unity.rendering.hybrid": "0.11.0-preview.42",

    I set ENABLE_HYBRID_RENDERER_V2
    I switched to window x64_86
    I setup HDRP using default wizard

    My build config looks like this

    upload_2021-1-28_20-1-43.png
     
    GameDeveloper1111 likes this.
  4. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    Hi,

    Do you have a callstack for the crash?
     
  5. GameDeveloper1111

    GameDeveloper1111

    Joined:
    Jul 24, 2020
    Posts:
    100
    Hello, yes, it's below. Also, I've attached crash.dmp to this reply.
    Code (error.log):
    1. Stack Trace of Crashed Thread 23780:
    2. 0x79128DC0 (GameAssembly) [C:\Google Drive\Unity\Projects\minimal-dots\Library\Il2cppBuildCache\Windows\x86\il2cppOutput\Unity.Scenes.cpp:32680] ResourceCatalogData_GetGUIDFromPath_m1DFC599FF027918D5B17B7ACE8367724DD250B7D
    3. 0x7912D5A4 (GameAssembly) [C:\Google Drive\Unity\Projects\minimal-dots\Library\Il2cppBuildCache\Windows\x86\il2cppOutput\Unity.Scenes.cpp:37615] SceneSystem_GetSceneGUID_m3E6EA7E734CC2412113CE37B99AAEB8231716FEC
    4. 0x7911DB33 (GameAssembly) [C:\Google Drive\Unity\Projects\minimal-dots\Library\Il2cppBuildCache\Windows\x86\il2cppOutput\Unity.Scenes.cpp:23329] GameObjectSceneUtility_AddGameObjectSceneReferences_mCA24ACDDBE1FB3CE50403880BFA3FC7D85564C27
    5. 0x791EE693 (GameAssembly) [C:\Google Drive\Unity\Projects\minimal-dots\Library\Il2cppBuildCache\Windows\x86\il2cppOutput\Unity.Entities.Hybrid.cpp:19513] AutomaticWorldBootstrap_Initialize_m4F061B0E0169BE83532543C686DD702FA0930EF3
    6. 0x78CA689F (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2020.2.2f1\Editor\Data\il2cpp\libil2cpp\vm\Runtime.cpp:568] il2cpp::vm::Runtime::Invoke
    7. 0x78C6EA56 (GameAssembly) [C:\Program Files\Unity\Hub\Editor\2020.2.2f1\Editor\Data\il2cpp\libil2cpp\il2cpp-api.cpp:1117] il2cpp_runtime_invoke
    8. 0x51B27807 (UnityPlayer) UnityMain
    9. 0x51B36AB6 (UnityPlayer) UnityMain
    10. 0x51A2D28D (UnityPlayer) UnityMain
    11. 0x51A2E6FA (UnityPlayer) UnityMain
    12. 0x51A431C5 (UnityPlayer) UnityMain
    13. 0x51A4279E (UnityPlayer) UnityMain
    14. 0x51A42D85 (UnityPlayer) UnityMain
    15. 0x51A44D30 (UnityPlayer) UnityMain
    16. ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 5185AF29)
    17. 0x5185AF29 (UnityPlayer) (function-name not available)
    18. ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 51859CB5)
    19. 0x51859CB5 (UnityPlayer) (function-name not available)
    20. ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 5185D957)
    21. 0x5185D957 (UnityPlayer) (function-name not available)
    22. 0x5185E555 (UnityPlayer) UnityMain
    23. ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00EF1015)
    24. 0x00EF1015 (minimal-dots) (function-name not available)
    25. ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 00EF11D9)
    26. 0x00EF11D9 (minimal-dots) (function-name not available)
    27. 0x766AFA29 (KERNEL32) BaseThreadInitThunk
    28. 0x776975F4 (ntdll) RtlGetAppContainerNamedObjectPath
    29. 0x776975C4 (ntdll) RtlGetAppContainerNamedObjectPath
    EDIT: Removed crash.dmp.zip now that there's a solution.
     
    Last edited: Jan 28, 2021
  6. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    Thanks.

    We have a bug logged on this already. A possible workaround is to disable IL2CPP.
     
    optimise and GameDeveloper1111 like this.
  7. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Is that Case 1308787?
     
  8. joelv

    joelv

    Unity Technologies

    Joined:
    Mar 20, 2015
    Posts:
    203
    GameDeveloper1111 likes this.
  9. GameDeveloper1111

    GameDeveloper1111

    Joined:
    Jul 24, 2020
    Posts:
    100
    I was able to build and run without a crash using tertle's 64bit project. I'll poke at this some more with the 64bit-vs-32bit distinction in mind and will submit a bug report if the bug persists. I'll post here either way.

    tertle's post:
     
  10. GameDeveloper1111

    GameDeveloper1111

    Joined:
    Jul 24, 2020
    Posts:
    100
    Resolved:

    I was able to build and run the "minimal-dots" project mentioned in the original post with the following changes (provided by tertle):

    1. Switch to Windows x86_64
    2. Use a build configuration asset (don't use File --> Build settings --> Build) (tertle provided an example in the quote below)

    This also worked for my original, larger project. I'll include the solution in the original post.

    Using a build config was the change I needed in my project. During my attempt to create a minimal project I decided to keep as many defaults as possible, including the default Build Settings architecture, which added to the original problem.

    Thank you @tertle
    Thank you @joelv
    Thank you @optimise
     
    Last edited: Jan 28, 2021
    joelv likes this.