Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct here to familiarize yourself with the rules and how to post constructively.

  2. Unity 2022.1 is now available as the latest Tech release.
    Dismiss Notice

Bug Unity 2021.2.8f1: Standalone Game crashes to Desktop but not in Play Editor

Discussion in 'Editor & General Support' started by Tornar, Jan 16, 2022.

  1. Tornar

    Tornar

    Joined:
    Dec 28, 2020
    Posts:
    39
    Hello,

    After update to Unity 2021.2.8f1 and update "toolchain linux x64" to 1.0.0, I have started to get crashes to Desktop in standalone App, but it doesn't fail when I run it from Unity Editor, or even when I run it in standalone but with Unity Profiler connected. And I don't get any information about the crash in "Player.log".

    Any idea what could be happening or how could I debug the problem?

    Thanks!
     
  2. Tornar

    Tornar

    Joined:
    Dec 28, 2020
    Posts:
    39
    Just for add some more information, I am using Ubuntu 20.04 LTS, and I get this error in linux terminal when game crashes:

    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. Segmentation fault (core dumped)
     
  3. Tornar

    Tornar

    Joined:
    Dec 28, 2020
    Posts:
    39
    Another info, if I run the game from terminal with sudo privileges, it crashes immediately. While If I run the game without sudo privileges, it crashes after character selection when I'm going to enter the world.

    And I have tested the same code in Mac, and everything works without problems, play editor mode and standalone too.

    I suspect it could be related to "toolchain linux package", because I was using previous package version of "toolchain linux package" and I never had that problems.
     
    Last edited: Jan 17, 2022
  4. Tornar

    Tornar

    Joined:
    Dec 28, 2020
    Posts:
    39
    I have created a new URP project and without modify anything, I have build a version for linux, then I run it from terminal with sudo privileges and I'm getting same error "segmentation fault":

    Code (CSharp):
    1. $ sudo ./test.x86_64
    2. [UnityMemory] Configuration Parameters - Can be set up in boot.config
    3.     "memorysetup-bucket-allocator-granularity=16"
    4.     "memorysetup-bucket-allocator-bucket-count=8"
    5.     "memorysetup-bucket-allocator-block-size=4194304"
    6.     "memorysetup-bucket-allocator-block-count=1"
    7.     "memorysetup-main-allocator-block-size=16777216"
    8.     "memorysetup-thread-allocator-block-size=16777216"
    9.     "memorysetup-gfx-main-allocator-block-size=16777216"
    10.     "memorysetup-gfx-thread-allocator-block-size=16777216"
    11.     "memorysetup-cache-allocator-block-size=4194304"
    12.     "memorysetup-typetree-allocator-block-size=2097152"
    13.     "memorysetup-profiler-bucket-allocator-granularity=16"
    14.     "memorysetup-profiler-bucket-allocator-bucket-count=8"
    15.     "memorysetup-profiler-bucket-allocator-block-size=4194304"
    16.     "memorysetup-profiler-bucket-allocator-block-count=1"
    17.     "memorysetup-profiler-allocator-block-size=16777216"
    18.     "memorysetup-profiler-editor-allocator-block-size=1048576"
    19.     "memorysetup-temp-allocator-size-main=4194304"
    20.     "memorysetup-job-temp-allocator-block-size=2097152"
    21.     "memorysetup-job-temp-allocator-block-size-background=1048576"
    22.     "memorysetup-job-temp-allocator-reduction-small-platforms=262144"
    23.     "memorysetup-temp-allocator-size-background-worker=32768"
    24.     "memorysetup-temp-allocator-size-job-worker=262144"
    25.     "memorysetup-temp-allocator-size-preload-manager=262144"
    26.     "memorysetup-temp-allocator-size-nav-mesh-worker=65536"
    27.     "memorysetup-temp-allocator-size-audio-worker=65536"
    28.     "memorysetup-temp-allocator-size-cloud-worker=32768"
    29.     "memorysetup-temp-allocator-size-gfx=262144"
    30. Segmentation fault
    31.  
     
  5. Tornar

    Tornar

    Joined:
    Dec 28, 2020
    Posts:
    39
    I have used gdb to debug error, and I'm getting these logs:

    Code (CSharp):
    1. Starting program: /home/user/Downloads/game/linux/game.x86_64
    2. [Thread debugging using libthread_db enabled]
    3. Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
    4. [New Thread 0x7ffff5a72700 (LWP 38962)]
    5. [New Thread 0x7ffff5271700 (LWP 38963)]
    6. [New Thread 0x7ffff4a70700 (LWP 38964)]
    7. [New Thread 0x7ffff426f700 (LWP 38965)]
    8. [New Thread 0x7ffff3a6e700 (LWP 38966)]
    9. [New Thread 0x7ffff326d700 (LWP 38967)]
    10. [New Thread 0x7ffff2a6c700 (LWP 38968)]
    11. [New Thread 0x7ffff226b700 (LWP 38969)]
    12. [New Thread 0x7ffff1a6a700 (LWP 38970)]
    13. [New Thread 0x7ffff1269700 (LWP 38971)]
    14. [New Thread 0x7ffff0a68700 (LWP 38972)]
    15. [New Thread 0x7fffbffff700 (LWP 38973)]
    16. [New Thread 0x7fffbf7fe700 (LWP 38974)]
    17. [New Thread 0x7fffbeffd700 (LWP 38975)]
    18. [New Thread 0x7fffbe7fc700 (LWP 38976)]
    19. [UnityMemory] Configuration Parameters - Can be set up in boot.config
    20.     "memorysetup-bucket-allocator-granularity=16"
    21.     "memorysetup-bucket-allocator-bucket-count=8"
    22.     "memorysetup-bucket-allocator-block-size=4194304"
    23.     "memorysetup-bucket-allocator-block-count=1"
    24.     "memorysetup-main-allocator-block-size=16777216"
    25.     "memorysetup-thread-allocator-block-size=16777216"
    26.     "memorysetup-gfx-main-allocator-block-size=16777216"
    27.     "memorysetup-gfx-thread-allocator-block-size=16777216"
    28.     "memorysetup-cache-allocator-block-size=4194304"
    29.     "memorysetup-typetree-allocator-block-size=2097152"
    30.     "memorysetup-profiler-bucket-allocator-granularity=16"
    31.     "memorysetup-profiler-bucket-allocator-bucket-count=8"
    32.     "memorysetup-profiler-bucket-allocator-block-size=4194304"
    33.     "memorysetup-profiler-bucket-allocator-block-count=1"
    34.     "memorysetup-profiler-allocator-block-size=16777216"
    35.     "memorysetup-profiler-editor-allocator-block-size=1048576"
    36.     "memorysetup-temp-allocator-size-main=4194304"
    37.     "memorysetup-job-temp-allocator-block-size=2097152"
    38.     "memorysetup-job-temp-allocator-block-size-background=1048576"
    39.     "memorysetup-job-temp-allocator-reduction-small-platforms=262144"
    40.     "memorysetup-temp-allocator-size-background-worker=32768"
    41.     "memorysetup-temp-allocator-size-job-worker=262144"
    42.     "memorysetup-temp-allocator-size-preload-manager=262144"
    43.     "memorysetup-temp-allocator-size-nav-mesh-worker=65536"
    44.     "memorysetup-temp-allocator-size-audio-worker=65536"
    45.     "memorysetup-temp-allocator-size-cloud-worker=32768"
    46.     "memorysetup-temp-allocator-size-gfx=262144"
    47. [New Thread 0x7fffbdffb700 (LWP 38977)]
    48. [New Thread 0x7fffb4e96700 (LWP 38978)]
    49.  
    50. Thread 18 "GC Finalizer" received signal SIGPWR, Power fail/restart.
    51. [Switching to Thread 0x7fffb4e96700 (LWP 38978)]
    52. futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x575738) at ../sysdeps/nptl/futex-internal.h:183
    53. 183    ../sysdeps/nptl/futex-internal.h: No such file or directory.
    54. (gdb)
     
  6. TOES2

    TOES2

    Joined:
    May 20, 2013
    Posts:
    132
    A shot in the dark really, but often crashes in the runtime happens because some materials you use is not included in the final build since Unity found no reference to them automatically, while in the editor the player has access to all materials. In project settings / graphics make sure to add all shaders to the Always Include list.
     
  7. Tornar

    Tornar

    Joined:
    Dec 28, 2020
    Posts:
    39
    Thanks for the tip, but it unfortunately doesn't seem be the case.

    I have been doing tests and I think the problem is the upgrade Universal RP from 12.1.2 to 12.1.3
     
unityunity