Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug RegisterMesh causes Crash in Build

Discussion in 'Graphics for ECS' started by StefanWo, Dec 14, 2022.

  1. StefanWo

    StefanWo

    Joined:
    May 24, 2015
    Posts:
    124
    Hi,
    i'm registering my mesh and materials via the RegisterMesh function in the EntitiesGraphicsSystem. Everything seems working fine in the Editor. But in the compiled version the game crash with the following error. Any idea why? Any libraries that are missing maybe?

    Code (CSharp):
    1. ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 00007FFEA619D80B)
    2. 0x00007FFEA619D80B (UnityPlayer) (function-name not available)
    3. 0x0000018164F8EF7F (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Rendering.BatchRendererGroup:RegisterMesh_Injected (UnityEngine.Rendering.BatchRendererGroup,UnityEngine.Mesh,UnityEngine.Rendering.BatchMeshID&)
    4. 0x0000018164F8EE93 (Mono JIT Code) UnityEngine.Rendering.BatchRendererGroup:RegisterMesh (UnityEngine.Mesh)
    5. 0x0000018164F8EE13 (Mono JIT Code) Unity.Rendering.EntitiesGraphicsSystem:RegisterMesh (UnityEngine.Mesh)
    ps.: Translated German message from OS: "An attempt was made to access an invalid address"

    i'm using the Entities and Entities.Graphics 1.0.0-pre.15 with Unity 2022.2.0f1

    Update: After playing around with Debugging values, i found that the mesh and materials are very corrupted. E.g. i also get this memory error when trying to access material.GetPropertyNames in my code. The mesh and materials get empty names and randomly using the error shader, failing in accessing textures and so on. I have no idea where all of this comes from, but i have to downgrade again to the old 0.51 version now, to continue my development :( Hope this problems get fixed soon. Anyway, i like the new APIs and architecture. Good Job so far.
     
    Last edited: Dec 14, 2022
  2. JussiKnuuttila

    JussiKnuuttila

    Unity Technologies

    Joined:
    Jun 7, 2019
    Posts:
    352
    It would be very helpful if you could submit us a bug with a repro project, so we can take a look at what's going wrong.

    It might also be a good idea try running the compiled build with the
    -debugallocator
    command line parameter, to see if that uncovers new information about what's going wrong.
     
  3. StefanWo

    StefanWo

    Joined:
    May 24, 2015
    Posts:
    124
    Sry, i have no time to spend another half day to try to reproduce that in a separate repo. Even worse, that i have another bug that i need several restarts to get the build successful, but no dev reacts on that: https://forum.unity.com/threads/202...obalgamemanagers-assets.1343288/#post-8658081
    and already on the way to downgrade again :(


    I have still my last executable with the bug and tried to launch with that parameter, but it seems the same log entries as before. I tried "MyGame.exe -debugallocator".

    I uploaded the crash log here. Hope it can help. https://easyupload.io/m/cuwdvr
    Ps.: I added some logging to it that log it before calling the register methods.