Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[2018.2] ECS + IL2CPP for Windows Desktop build crashes

Discussion in 'Entity Component System' started by rz_0lento, Apr 18, 2018.

  1. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    I tried building BoidDemo from https://github.com/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?
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    Can you provide any details about the crash? If you have a call stack, that might help track down the cause of the issue.
     
    optimise likes this.
  3. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    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.
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    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.
     
  5. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    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.
     
  6. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    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.
     
  7. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    This should be pretty easy to repro:

    1) clone https://github.com/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
     
  8. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Sure, I'll clean this up and push a new bug report
     
  9. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Bug report case number 1028041
     
  10. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
  11. Enrico-Monese

    Enrico-Monese

    Joined:
    Dec 18, 2015
    Posts:
    77
    This also happens on mac
    I tried with the TwoStickShooter project from https://github.com/Unity-Technologies/EntityComponentSystemSamples
    Seems like the same issue
     
  12. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,920
    @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.
     
    optimise likes this.
  13. henrikpAtUnity

    henrikpAtUnity

    Unity Technologies

    Joined:
    Jan 6, 2017
    Posts:
    37
    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.
     
    Enrico-Monese, rz_0lento and optimise like this.
  14. Enrico-Monese

    Enrico-Monese

    Joined:
    Dec 18, 2015
    Posts:
    77
    Thanks! Using the `link.xml` file solved my issues, looks like the original issue from this thread may be different though
     
  15. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    962
    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:

    Code (CSharp):
    1. 0x06CE07BB (GameAssembly) [c:\program files\unity\hub\editor\2018.2.12f1\editor\data\il2cpp\libil2cpp\vm\runtime.cpp:513] il2cpp::vm::Runtime::Invoke
    2. 0x06CEEDE6 (GameAssembly) [c:\program files\unity\hub\editor\2018.2.12f1\editor\data\il2cpp\libil2cpp\il2cpp-api.cpp:957] il2cpp_runtime_invoke
    3.   ERROR: SymGetSymFromAddr64, GetLastError: 'Attempt to access invalid address.' (Address: 10207C66)
    4. 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.
     
  16. FrankvHoof

    FrankvHoof

    Joined:
    Nov 3, 2014
    Posts:
    258
  17. Pranav_Redstoneinvente

    Pranav_Redstoneinvente

    Joined:
    Apr 13, 2018
    Posts:
    121
    Hi, I faced a crash problem when building BoTD for standalone.It crashes only on the built version, it runs fine in the editor
     
  18. peeka

    peeka

    Joined:
    Dec 3, 2014
    Posts:
    113
  19. Brothers-Studio

    Brothers-Studio

    Joined:
    Jul 4, 2018
    Posts:
    4
    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
     
  20. Tiffanyx0515

    Tiffanyx0515

    Joined:
    Oct 18, 2018
    Posts:
    1
    ECS il2cpp is not working on windows
    ECS mono working well on windows