Search Unity

Bug IL2CPP build for Steam Deck crashes with "Aborted (core dumped)", but Mono build works fine

Discussion in 'Linux' started by JesseSTG, Nov 16, 2022.

  1. JesseSTG

    JesseSTG

    Joined:
    Jan 10, 2019
    Posts:
    236
    I'm building my game for Linux, and decided to test a build of it on my Steam Deck (which runs a modified version of Arch Linux). However, I don't get very far with IL2CPP builds; when I run my game, I get the following output:

    Code (csharp):
    1. [UnityMemory] Configuration Parameters - Can be set up in boot.config
    2.     "memorysetup-bucket-allocator-granularity=16"
    3.     "memorysetup-bucket-allocator-bucket-count=8"
    4.     "memorysetup-bucket-allocator-block-size=4194304"
    5.     "memorysetup-bucket-allocator-block-count=1"
    6.     "memorysetup-main-allocator-block-size=16777216"
    7.     "memorysetup-thread-allocator-block-size=16777216"
    8.     "memorysetup-gfx-main-allocator-block-size=16777216"
    9.     "memorysetup-gfx-thread-allocator-block-size=16777216"
    10.     "memorysetup-cache-allocator-block-size=4194304"
    11.     "memorysetup-typetree-allocator-block-size=2097152"
    12.     "memorysetup-profiler-bucket-allocator-granularity=16"
    13.     "memorysetup-profiler-bucket-allocator-bucket-count=8"
    14.     "memorysetup-profiler-bucket-allocator-block-size=4194304"
    15.     "memorysetup-profiler-bucket-allocator-block-count=1"
    16.     "memorysetup-profiler-allocator-block-size=16777216"
    17.     "memorysetup-profiler-editor-allocator-block-size=1048576"
    18.     "memorysetup-temp-allocator-size-main=4194304"
    19.     "memorysetup-job-temp-allocator-block-size=2097152"
    20.     "memorysetup-job-temp-allocator-block-size-background=1048576"
    21.     "memorysetup-job-temp-allocator-reduction-small-platforms=262144"
    22.     "memorysetup-temp-allocator-size-background-worker=32768"
    23.     "memorysetup-temp-allocator-size-job-worker=262144"
    24.     "memorysetup-temp-allocator-size-preload-manager=262144"
    25.     "memorysetup-temp-allocator-size-nav-mesh-worker=65536"
    26.     "memorysetup-temp-allocator-size-audio-worker=65536"
    27.     "memorysetup-temp-allocator-size-cloud-worker=32768"
    28.     "memorysetup-temp-allocator-size-gfx=262144"
    29. Aborted (core dumped)
    This is the output from Player.log:

    Code (csharp):
    1. Found 1 interfaces on host : 0) 192.168.0.135
    2. Multi-casting "[IP] 192.168.0.135 [Port] 55000 [Flags] 2 [Guid] 142416256 [EditorId] 2880511612 [Version] 1048832 [Id] LinuxPlayer(13,192.168.0.135) [Debug] 1 [PackageName] LinuxPlayer [ProjectName] Chromavaders" to [225.0.0.222:54997]...
    3. Starting managed debugger on port 56256
    4. free(): invalid pointer
    It seems to crash very early on, before anything useful is spit out.

    Here are some relevant facts:
    • Mono builds work fine.
    • The output of uname -a on the Deck returns Linux steamdeck 5.13.0-valve21.3-1-neptune #1 SMP PREEMPT Mon, 03 Oct 2022 23:17:36 +0000 x86_64 GNU/Linux.
    • I produced the build with Unity 2022.2.0b15 on Windows 10. Note that I'm not using the editor on the Deck, nor do I intend to.
    • I'm using version 2.0.3 of the com.unity.toolchain.win-x86_64-linux-x86_64 package, plus version 2.0.4 of com.unity.sysroot.
    • The build was produced with the following BuildOptions flags set:
      • AllowDebugging
      • DetailedBuildReport
      • Development
      • StrictMode
    • Managed stripping is set to Low.
    • IL2CPP code generation is set to Optimize Size.
    • IL2CPP compiler configuration is set to Debug.
    Running ldd on the game's binary produces the following output:

    Code (csharp):
    1.         linux-vdso.so.1 (0x00007ffeff4e9000)
    2.         UnityPlayer.so => /home/deck/Builds/Chromavaders/Debug/StandaloneLinux64/IL2CPP/./UnityPlayer.so (0x00007f015b785000)
    3.         libm.so.6 => /usr/lib/libm.so.6 (0x00007f015b623000)
    4.         libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f015b608000)
    5.         libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f015b5e7000)
    6.         libc.so.6 => /usr/lib/libc.so.6 (0x00007f015b41b000)
    7.         libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f015b414000)
    8.         librt.so.1 => /usr/lib/librt.so.1 (0x00007f015b407000)
    9.         /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f015e851000)
    Any tips? Is this a bug, or am I doing something wrong?
     
  2. tylerinthezoo

    tylerinthezoo

    Unity Technologies

    Joined:
    Jun 15, 2022
    Posts:
    91
    do you get a crash with you use il2cpp release ?