[2018.2] ECS + IL2CPP for Windows Desktop build crashes

I tried building BoidDemo from GitHub - Unity-Technologies/EntityComponentSystemSamples using 2018.2.0b1 and IL2CPP (with .NET 4.x) and while it builds, when you run the actual executable it crashes once you get past Unity splash.

If I don’t enable IL2CPP, it builds and runs fine on standalone. Is this issue related to Burst?

Can you provide any details about the crash? If you have a call stack, that might help track down the cause of the issue.

1 Like

I’ll try to build the project myself with sln version and see if I can get more info out of it while I have debugger attached.

It looks like the code might be throwing a managed exception. Note that you can debug managed code with IL2CPP using VSTU in 2018.2. That might be helpful for tracking down the cause of this issue as well.

When I run the project with debug build, it throws MissingMethodException: Constructor on type ‘Unity.Entities.EntityManager’ not found. Demo doesn’t crash there but boid fishes are missing (obviously).
Same example works without issues on Editor, no warnings. Also works if I don’t do IL2CPP but Mono build, like mentioned.

Do you mind submitting a bug report for this? It looks like something we should investigate more. I would like to be able to get feedback to you properly when this is fixed.

This should be pretty easy to repro:

  1. clone GitHub - Unity-Technologies/EntityComponentSystemSamples (it’s been same since GDC so only one version there)
  2. open BoidExample.unity from Samples/Assets/Scenes and set it into Scene in Build on top of Build Settings
  3. change to IL2CPP in Player Settings (c++: release, .NET 4.x)
  4. build and run

Sure, I’ll clean this up and push a new bug report

Bug report case number 1028041

Thanks!

This also happens on mac
I tried with the TwoStickShooter project from GitHub - Unity-Technologies/EntityComponentSystemSamples
Seems like the same issue

@Enrico-Monese

Thanks! It looks like we are investigating the original bug report filed from this thread. If you would like to submit another bug report, that would be great as well. Having more data always helps track down the cause of issues like this.

1 Like

If you update to the latest ECSJobDemos and packages which was released yesterday this issue should be resolved for the Samples project.

In the case of TwoStickShooter there is a fix for that coming in the next release.
As a temporary workaround you might try to copy over Samples/Assets/link.xml in the most current ECSJobDemos into the Assets folder of the TwoStickShooter projects you want to run and then build it with il2cpp again.

3 Likes

Thanks! Using the link.xml file solved my issues, looks like the original issue from this thread may be different though

What does link.xml do, @Enrico-Monese / @henrikpAtUnity ? I found this thread from Google that’s getting pretty much the same last few stacktraces before the errors:

0x06CE07BB (GameAssembly) [c:\program files\unity\hub\editor\2018.2.12f1\editor\data\il2cpp\libil2cpp\vm\runtime.cpp:513] il2cpp::vm::Runtime::Invoke
0x06CEEDE6 (GameAssembly) [c:\program files\unity\hub\editor\2018.2.12f1\editor\data\il2cpp\libil2cpp\il2cpp-api.cpp:957] il2cpp_runtime_invoke
  ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 10207C66)
0x10207C66 (UnityPlayer) (function-name not available)

Only my issue is from Facepunch.Steamworks rather than ECS. However, I’m also building with il2cpp and this seems linked.

@henrikpAtUnity could you link to the ECSJobDemos your referring to?
I’m unable to find any link.xml file, and building through IL2CPP is still failing (on the Transform-System) on Unity 2018.2.18f1 AND Unity 2019.1.0a14 (latest).
BugReport: Unity Issue Tracker - [IL2CPP] ECS Transforms break on IL2CPP backend
This also means that you cannot build (with working ECS) to iOS whatsoever.

Hi, I faced a crash problem when building BoTD for standalone.It crashes only on the built version, it runs fine in the editor

il2cpp master build constantly crashes everywhere, while any non master build works.

the example freezes in il2cpp master build

for more than a 10 days i try to build the ECS build. Currently I do not have success.
ECS mono build successfully runs on mobile devices.
ECS development build (mono and il2ccp) successfully runs on mobile devices.
ECS il2cpp is not working on mobile devices. Do you have any idea what il2ccp build crash on mobile device after unity logo??
Can you help to solve this issue??
i also try to build unity sample project but is still crash

ECS il2cpp is not working on windows
ECS mono working well on windows