Search Unity

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

[NetCode] Server-only build launched on cloud VM - Crashes In Release Mode works in Debug Mode

Discussion in 'NetCode for ECS' started by adammpolak, Feb 2, 2021.

  1. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    I have run both this both on windows and linux and ran it -batchmode -nographics as well as normally

    - Run the build in a VM with all ports open
    - Client is able to connect to the server (connect on port)
    - The connection triggers the server to send RPC to client (which works)
    - Clients send back RPC to server
    - Server receives RPC and adds "NetworkStreamInGame" component to RPC
    - Server starts generating asteroids with Job.WithCode()
    - Crash

    @timjohansson For some reason the stand alone build crashes when in release mode but in debug mode it limps along

    Debug Info
    Config:
    upload_2021-2-2_22-28-54.png
    upload_2021-2-2_21-53-20.png
    Staring Linx Server Build:
    Code (CSharp):
    1. adampolak@moetsi-asteroids-xr-server:~/asteroids$ ./Sample -batchmode -nographics
    2. Set current directory to /home/adampolak/asteroids
    3. Found path: /home/adampolak/asteroids/Sample
    4. PlayerConnection initialized from /home/adampolak/asteroids/Sample_Data (debug = 0)
    5. PlayerConnection initialized network socket : 0.0.0.0 55421
    6. Multi-casting "[IP] 10.0.0.5 [Port] 55421 [Flags] 2 [Guid] 2501959266 [EditorId] 4261281278 [Version] 1048832 [Id] LinuxPlayer(10.0.0.5) [Debug] 1 [PackageName] LinuxPlayer [ProjectName] Sample" to [225.0.0.222:54997]...
    7. Started listening to [0.0.0.0:55421]
    8. Starting managed debugger on port 56266
    9. Preloaded 'lib_burst_generated.so'
    10. PlayerConnection already initialized - listening to [0.0.0.0:55421]
    11. Initialize engine version: 2020.1.17f1 (9957aee8edc2)
    12. [Subsystems] Discovering subsystems at path /home/adampolak/asteroids/Sample_Data/UnitySubsystems
    13. Forcing GfxDevice: Null
    14. GfxDevice: creating device client; threaded=0
    15. NullGfxDevice:
    16.     Version:  NULL 1.0 [1.0]
    17.     Renderer: Null Device
    18.     Vendor:   Unity Technologies
    19. FMOD initialized on nosound output
    20. ERROR: Shader Sprites/Default shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
    21. XRGeneral Settings awakening...
    22. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    23. UnityEngine.Logger:Log(LogType, Object)
    24. UnityEngine.Debug:Log(Object)
    25. UnityEngine.XR.Management.XRGeneralSettings:Awake()
    26.  
    27. (Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)
    Able to connect to the IP address and get super stuttering response:


    Release Build
    Config:
    upload_2021-2-2_21-55-13.png
    upload_2021-2-2_21-55-29.png
    Running Linux Server Build:

    It crashes
     

    Attached Files:

    Last edited: Feb 3, 2021
  2. timjohansson

    timjohansson

    Unity Technologies

    Joined:
    Jul 13, 2016
    Posts:
    473
    You don't need to change anything in the builtin build dialog, just the build config files. It shouldn't look at the settings you change there - which also means that selecting "server build" doesn't do anything. You should instead add a `Player Scripting Defines` component to the build config and define "UNITY_SERVER".
    We have used linux servers many times and I am not aware of any open bugs related to them.
    I would suggest running the server in gdb / lldb to see where it crashes.
     
  3. adammpolak

    adammpolak

    Joined:
    Sep 9, 2018
    Posts:
    450
    Appreciate the heads up!

    Before I go on the long road of trying to understand the differences between a "debug" LinuxIL2CPP build and a "release" LinuxIL2CPP, any tips on what I should be looking for?

    So just to double check these settings also don't matter for the final build?
    upload_2021-2-3_9-22-59.png