RegisterMesh causes Crash in Build

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?

ERROR: SymGetSymFromAddr64, GetLastError: 'Es wurde versucht, auf eine unzulässige Adresse zuzugreifen.' (Address: 00007FFEA619D80B)
0x00007FFEA619D80B (UnityPlayer) (function-name not available)
0x0000018164F8EF7F (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Rendering.BatchRendererGroup:RegisterMesh_Injected (UnityEngine.Rendering.BatchRendererGroup,UnityEngine.Mesh,UnityEngine.Rendering.BatchMeshID&)
0x0000018164F8EE93 (Mono JIT Code) UnityEngine.Rendering.BatchRendererGroup:RegisterMesh (UnityEngine.Mesh)
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 :frowning: Hope this problems get fixed soon. Anyway, i like the new APIs and architecture. Good Job so far.

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.

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: 2022.02.0b9 Asset has disappeared while building player to 'globalgamemanagers.assets'
and already on the way to downgrade again :frowning:

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. Upload Files | Free File Upload and Transfer Up To 20 GB
Ps.: I added some logging to it that log it before calling the register methods.