Unity-Technologies / ml-agents

The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning.
https://unity.com/products/machine-learning-agents
Other
17.26k stars 4.17k forks source link

no_graphics=True causes poll_for_timeout #5963

Closed Mr-Bright closed 1 year ago

Mr-Bright commented 1 year ago

Describe the bug Using "no_graphics=True" brings poll_for_timeout Exception and throw Environment shut down with return code -6 (SIGABRT).

To Reproduce Steps to reproduce the behavior:

  1. copy the code in the colab tutorial train-2
  2. modify the code and change to "env = default_registry["GridWorld"].make(no_graphics=True)" cos I run it on a server following headless instrution
  3. run and see the env.reset() throw the error
  4. See error

Console logs / stack traces

Found path: /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup.x86_64
Mono path[0] = '/tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Managed'
Mono config path = '/tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/MonoBleedingEdge/etc'
PlayerConnection initialized from /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data (debug = 0)
PlayerConnection initialized network socket : 0.0.0.0 55116
Multi-casting "[IP] 192.168.0.101 [Port] 55116 [Flags] 2 [Guid] 2460229834 [EditorId] 429131514 [Version] 1048832 [Id] LinuxPlayer(172.21.139.22) [Debug] 0 [PackageName] LinuxPlayer [ProjectName] UnityEnvironment" to [225.0.0.222:54997]...
Started listening to [0.0.0.0:55116]
Preloaded 'libgrpc_csharp_ext.x64.so'
Unable to preload the following plugins:
        lib_burst_generated.so
PlayerConnection already initialized - listening to [0.0.0.0:55116]
Initialize engine version: 2019.3.0f5 (44796c9d3c2c)
[Subsystems] Discovering subsystems at path /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/UnitySubsystems
Forcing GfxDevice: Null
GfxDevice: creating device client; threaded=0
NullGfxDevice:
    Version:  NULL 1.0 [1.0]
    Renderer: Null Device
    Vendor:   Unity Technologies
Begin MonoManager ReloadAssembly
- Completed reload, in  0.151 seconds
UnloadTime: 2.286098 ms
Command line arguments passed: /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup.x86_64 -nographics -batchmode --mlagents-port 5005 --mlagents-scene-name Assets/ML-Agents/Examples/GridWorld/Scenes/GridWorld.unity
Unloading 8 Unused Serialized files (Serialized files now loaded: 0)
WARNING: Shader Unsupported: 'Autodesk Interactive' - Pass 'FORWARD' has no vertex shader
WARNING: Shader Unsupported: 'Autodesk Interactive' - Pass 'FORWARD_DELTA' has no vertex shader
WARNING: Shader Unsupported: 'Autodesk Interactive' - Pass 'ShadowCaster' has no vertex shader
UnloadTime: 0.294302 ms
Plugins: Couldn't open libcoreclr, error: libcoreclr: cannot open shared object file: No such file or directory
Grpc.Core.Internal.UnmanagedLibrary:.ctor(String[])
Grpc.Core.Internal.NativeExtension:Load()
Grpc.Core.Internal.NativeExtension:.ctor()
Grpc.Core.Internal.NativeExtension:Get()
Grpc.Core.Internal.NativeMethods:Get()
Grpc.Core.GrpcEnvironment:GrpcNativeInit()
Grpc.Core.GrpcEnvironment:.ctor()
Grpc.Core.GrpcEnvironment:AddRef()
Grpc.Core.Channel:.ctor(String, ChannelCredentials, IEnumerable`1)
Grpc.Core.Channel:.ctor(String, ChannelCredentials)
Unity.MLAgents.RpcCommunicator:Initialize(UnityOutputProto, UnityInputProto&) (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs:211)
Unity.MLAgents.RpcCommunicator:Initialize(CommunicatorInitParameters) (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs:119)
Unity.MLAgents.Academy:InitializeEnvironment() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:378)
Unity.MLAgents.Academy:LazyInitialize() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:218)
Unity.MLAgents.Academy:.ctor() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:206)
Unity.MLAgents.<>c:<.cctor>b__80_0() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:78)
System.Lazy`1:CreateValue()
System.Lazy`1:LazyInitValue()
System.Lazy`1:get_Value()
Unity.MLAgents.Academy:get_Instance() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:93)
GridSettings:Awake() (at /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridSettings.cs:10)

[./Runtime/Misc/Plugins.cpp line 306] 
(Filename: /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs Line: 211)

Fallback handler could not load library /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Mono/libcoreclr.so
Fallback handler could not load library /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Mono/libcoreclr.so
Fallback handler could not load library /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Mono/libcoreclr.so
Plugins: Couldn't open libdl, error: libdl: cannot open shared object file: No such file or directory
Grpc.Core.Internal.UnmanagedLibrary:.ctor(String[])
Grpc.Core.Internal.NativeExtension:Load()
Grpc.Core.Internal.NativeExtension:.ctor()
Grpc.Core.Internal.NativeExtension:Get()
Grpc.Core.Internal.NativeMethods:Get()
Grpc.Core.GrpcEnvironment:GrpcNativeInit()
Grpc.Core.GrpcEnvironment:.ctor()
Grpc.Core.GrpcEnvironment:AddRef()
Grpc.Core.Channel:.ctor(String, ChannelCredentials, IEnumerable`1)
Grpc.Core.Channel:.ctor(String, ChannelCredentials)
Unity.MLAgents.RpcCommunicator:Initialize(UnityOutputProto, UnityInputProto&) (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs:211)
Unity.MLAgents.RpcCommunicator:Initialize(CommunicatorInitParameters) (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs:119)
Unity.MLAgents.Academy:InitializeEnvironment() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:378)
Unity.MLAgents.Academy:LazyInitialize() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:218)
Unity.MLAgents.Academy:.ctor() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:206)
Unity.MLAgents.<>c:<.cctor>b__80_0() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:78)
System.Lazy`1:CreateValue()
System.Lazy`1:LazyInitValue()
System.Lazy`1:get_Value()
Unity.MLAgents.Academy:get_Instance() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:93)
GridSettings:Awake() (at /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridSettings.cs:10)

[./Runtime/Misc/Plugins.cpp line 306] 
(Filename: /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs Line: 211)

Fallback handler could not load library /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Mono/libdl.so
Fallback handler could not load library /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Mono/libdl.so
Fallback handler could not load library /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Mono/libdl.so
Plugins: Couldn't open libSystem, error: libSystem: cannot open shared object file: No such file or directory
Grpc.Core.Internal.UnmanagedLibrary:.ctor(String[])
Grpc.Core.Internal.NativeExtension:Load()
Grpc.Core.Internal.NativeExtension:.ctor()
Grpc.Core.Internal.NativeExtension:Get()
Grpc.Core.Internal.NativeMethods:Get()
Grpc.Core.GrpcEnvironment:GrpcNativeInit()
Grpc.Core.GrpcEnvironment:.ctor()
Grpc.Core.GrpcEnvironment:AddRef()
Grpc.Core.Channel:.ctor(String, ChannelCredentials, IEnumerable`1)
Grpc.Core.Channel:.ctor(String, ChannelCredentials)
Unity.MLAgents.RpcCommunicator:Initialize(UnityOutputProto, UnityInputProto&) (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs:211)
Unity.MLAgents.RpcCommunicator:Initialize(CommunicatorInitParameters) (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs:119)
Unity.MLAgents.Academy:InitializeEnvironment() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:378)
Unity.MLAgents.Academy:LazyInitialize() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:218)
Unity.MLAgents.Academy:.ctor() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:206)
Unity.MLAgents.<>c:<.cctor>b__80_0() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:78)
System.Lazy`1:CreateValue()
System.Lazy`1:LazyInitValue()
System.Lazy`1:get_Value()
Unity.MLAgents.Academy:get_Instance() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:93)
GridSettings:Awake() (at /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridSettings.cs:10)

[./Runtime/Misc/Plugins.cpp line 306] 
(Filename: /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs Line: 211)

Fallback handler could not load library /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Mono/libSystem.dylib
Fallback handler could not load library /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Mono/libSystem.dylib.so
Fallback handler could not load library /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Mono/libSystem.dylib
Plugins: Couldn't open libcoreclr, error: libcoreclr: cannot open shared object file: No such file or directory
Grpc.Core.Internal.UnmanagedLibrary:GetNativeMethodDelegate(String)
Grpc.Core.Internal.NativeMethods:GetMethodDelegate(UnmanagedLibrary)
Grpc.Core.Internal.NativeMethods:.ctor(UnmanagedLibrary)
Grpc.Core.Internal.NativeExtension:.ctor()
Grpc.Core.Internal.NativeExtension:Get()
Grpc.Core.Internal.NativeMethods:Get()
Grpc.Core.GrpcEnvironment:GrpcNativeInit()
Grpc.Core.GrpcEnvironment:.ctor()
Grpc.Core.GrpcEnvironment:AddRef()
Grpc.Core.Channel:.ctor(String, ChannelCredentials, IEnumerable`1)
Grpc.Core.Channel:.ctor(String, ChannelCredentials)
Unity.MLAgents.RpcCommunicator:Initialize(UnityOutputProto, UnityInputProto&) (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs:211)
Unity.MLAgents.RpcCommunicator:Initialize(CommunicatorInitParameters) (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs:119)
Unity.MLAgents.Academy:InitializeEnvironment() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:378)
Unity.MLAgents.Academy:LazyInitialize() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:218)
Unity.MLAgents.Academy:.ctor() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:206)
Unity.MLAgents.<>c:<.cctor>b__80_0() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:78)
System.Lazy`1:CreateValue()
System.Lazy`1:LazyInitValue()
System.Lazy`1:get_Value()
Unity.MLAgents.Academy:get_Instance() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:93)
GridSettings:Awake() (at /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridSettings.cs:10)

[./Runtime/Misc/Plugins.cpp line 306] 
(Filename: /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs Line: 211)

Fallback handler could not load library /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Mono/libcoreclr.so
Fallback handler could not load library /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Mono/libcoreclr.so
Fallback handler could not load library /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Mono/libcoreclr.so
Plugins: Couldn't open libdl, error: libdl: cannot open shared object file: No such file or directory
Grpc.Core.Internal.UnmanagedLibrary:GetNativeMethodDelegate(String)
Grpc.Core.Internal.NativeMethods:GetMethodDelegate(UnmanagedLibrary)
Grpc.Core.Internal.NativeMethods:.ctor(UnmanagedLibrary)
Grpc.Core.Internal.NativeExtension:.ctor()
Grpc.Core.Internal.NativeExtension:Get()
Grpc.Core.Internal.NativeMethods:Get()
Grpc.Core.GrpcEnvironment:GrpcNativeInit()
Grpc.Core.GrpcEnvironment:.ctor()
Grpc.Core.GrpcEnvironment:AddRef()
Grpc.Core.Channel:.ctor(String, ChannelCredentials, IEnumerable`1)
Grpc.Core.Channel:.ctor(String, ChannelCredentials)
Unity.MLAgents.RpcCommunicator:Initialize(UnityOutputProto, UnityInputProto&) (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs:211)
Unity.MLAgents.RpcCommunicator:Initialize(CommunicatorInitParameters) (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs:119)
Unity.MLAgents.Academy:InitializeEnvironment() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:378)
Unity.MLAgents.Academy:LazyInitialize() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:218)
Unity.MLAgents.Academy:.ctor() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:206)
Unity.MLAgents.<>c:<.cctor>b__80_0() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:78)
System.Lazy`1:CreateValue()
System.Lazy`1:LazyInitValue()
System.Lazy`1:get_Value()
Unity.MLAgents.Academy:get_Instance() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:93)
GridSettings:Awake() (at /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridSettings.cs:10)

[./Runtime/Misc/Plugins.cpp line 306] 
(Filename: /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs Line: 211)

Fallback handler could not load library /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Mono/libdl.so
Fallback handler could not load library /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Mono/libdl.so
Fallback handler could not load library /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Mono/libdl.so
Plugins: Couldn't open libSystem, error: libSystem: cannot open shared object file: No such file or directory
Grpc.Core.Internal.UnmanagedLibrary:GetNativeMethodDelegate(String)
Grpc.Core.Internal.NativeMethods:GetMethodDelegate(UnmanagedLibrary)
Grpc.Core.Internal.NativeMethods:.ctor(UnmanagedLibrary)
Grpc.Core.Internal.NativeExtension:.ctor()
Grpc.Core.Internal.NativeExtension:Get()
Grpc.Core.Internal.NativeMethods:Get()
Grpc.Core.GrpcEnvironment:GrpcNativeInit()
Grpc.Core.GrpcEnvironment:.ctor()
Grpc.Core.GrpcEnvironment:AddRef()
Grpc.Core.Channel:.ctor(String, ChannelCredentials, IEnumerable`1)
Grpc.Core.Channel:.ctor(String, ChannelCredentials)
Unity.MLAgents.RpcCommunicator:Initialize(UnityOutputProto, UnityInputProto&) (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs:211)
Unity.MLAgents.RpcCommunicator:Initialize(CommunicatorInitParameters) (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs:119)
Unity.MLAgents.Academy:InitializeEnvironment() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:378)
Unity.MLAgents.Academy:LazyInitialize() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:218)
Unity.MLAgents.Academy:.ctor() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:206)
Unity.MLAgents.<>c:<.cctor>b__80_0() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:78)
System.Lazy`1:CreateValue()
System.Lazy`1:LazyInitValue()
System.Lazy`1:get_Value()
Unity.MLAgents.Academy:get_Instance() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:93)
GridSettings:Awake() (at /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridSettings.cs:10)

[./Runtime/Misc/Plugins.cpp line 306] 
(Filename: /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs Line: 211)

Fallback handler could not load library /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Mono/libSystem.dylib
Fallback handler could not load library /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Mono/libSystem.dylib.so
Fallback handler could not load library /tmp/ml-agents-binaries/binaries/GridWorld-b1b94a0ae13eef9d91f9d8db1e5770c5/Startup/Startup_Data/Mono/libSystem.dylib
GridWorld environment created.
WARNING: The communication API versions between Unity and python differ at the minor version level. Python API: 1.5.0, Unity API: 1.0.0 Python Library Version: 0.30.0 .
This means that some features may not work unless you upgrade the package with the lower version.Please find the versions that work best together from our release page.
https://github.com/Unity-Technologies/ml-agents/releases
UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:LogFormat(LogType, String, Object[])
UnityEngine.Debug:LogWarningFormat(String, Object[])
Unity.MLAgents.RpcCommunicator:CheckCommunicationVersionsAreCompatible(String, String, String) (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs:87)
Unity.MLAgents.RpcCommunicator:Initialize(CommunicatorInitParameters) (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs:130)
Unity.MLAgents.Academy:InitializeEnvironment() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:378)
Unity.MLAgents.Academy:LazyInitialize() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:218)
Unity.MLAgents.Academy:.ctor() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:206)
Unity.MLAgents.<>c:<.cctor>b__80_0() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:78)
System.Lazy`1:CreateValue()
System.Lazy`1:LazyInitValue()
System.Lazy`1:get_Value()
Unity.MLAgents.Academy:get_Instance() (at /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Academy.cs:93)
GridSettings:Awake() (at /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridSettings.cs:10)

(Filename: /Users/vincentpierre/Documents/ml-agents/com.unity.ml-agents/Runtime/Communicator/RpcCommunicator.cs Line: 87)

System memory in use before: 46.0 MB.
System memory in use after: 46.1 MB.

Unloading 5 unused Assets to reduce memory usage. Loaded Objects now: 1543.
Total: 2.362872 ms (FindLiveObjects: 1.470558 ms CreateObjectMapping: 0.110798 ms MarkObjects: 0.742152 ms  DeleteObjects: 0.033363 ms)

RenderTexture.Create failed: format unsupported - RGBA4 (142).
UnityEngine.Camera:Render()
GridAgent:WaitTimeInference() (at /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs:152)
GridAgent:FixedUpdate() (at /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs:145)

[./Runtime/Graphics/RenderTexture.cpp line 429] 
(Filename: /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs Line: 152)

Requested RenderTexture format RGBA4 (142) is not supported on this platform, using RGBA8 UNorm (8) fallback format
UnityEngine.Camera:Render()
GridAgent:WaitTimeInference() (at /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs:152)
GridAgent:FixedUpdate() (at /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs:145)

[./Runtime/Graphics/RenderTexture.cpp line 829] 
(Filename: /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs Line: 152)

Requested RenderTexture format RGBA4 (142) is not supported on this platform, using RGBA8 UNorm (8) fallback format
UnityEngine.Camera:Render()
GridAgent:WaitTimeInference() (at /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs:152)
GridAgent:FixedUpdate() (at /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs:145)

[./Runtime/Graphics/RenderTexture.cpp line 829] 
(Filename: /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs Line: 152)

Requested RenderTexture format RGBA4 (142) is not supported on this platform, using RGBA8 UNorm (8) fallback format
UnityEngine.Camera:Render()
GridAgent:WaitTimeInference() (at /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs:152)
GridAgent:FixedUpdate() (at /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs:145)

[./Runtime/Graphics/RenderTexture.cpp line 829] 
(Filename: /Users/vincentpierre/Documents/ml-agents/Project/Assets/ML-Agents/Examples/GridWorld/Scripts/GridAgent.cs Line: 152)

Caught fatal signal - signo:11 code:1 errno:0 addr:0x8
Obtained 36 stack frames.
#0  0x007fb3bf5549fb in GfxDevice::DrawSharedGeometryJobs(DynamicVBOBuffer const&, unsigned int, DynamicVBOBuffer const&, unsigned int, GeometryJobFence, DrawBuffersRange const*, unsigned long, VertexDeclaration*)
#1  0x007fb3bf53125b in RenderDynamicBatch(GfxDevice&, RenderNodeQueue const&, BatchInstanceData const*, unsigned long, unsigned long, unsigned long, VertexInputMasks, ShaderChannelMask, VertexAttributeFormats const&, GfxPrimitiveType)
#2  0x007fb3bf5300fb in RenderMultipleMeshes(RenderNodeQueue const&, RenderMultipleData const&, VertexInputMasks)
#3  0x007fb3bee9b1cc in BatchRenderer::RenderBatch(BatchInstanceData const*, unsigned long, VertexInputMasks) const
#4  0x007fb3bee9b0c0 in BatchRenderer::Flush(BatchBreakCause)
#5  0x007fb3bee035e4 in RenderCasters(int, Vector3f const&, ShadowJobData const&, ShaderPassContext&, dynamic_array<ShadowCasterData const, 0ul> const&, unsigned char const*, dynamic_array<ShadowCasterData const, 0ul> const&, dynamic_array<ShadowCasterPartData, 0ul> const&, RenderNodeQueue const&, bool, BatchRendererCullingOutputs*)
#6  0x007fb3bee02077 in ShadowMapJob(GfxDeviceAsyncCommand::ArgScratch*, GfxDeviceAsyncCommand::Arg const*)
#7  0x007fb3bf5583a1 in GfxDevice::ExecuteAsync(int, void (*)(GfxDeviceAsyncCommand::ArgScratch*, GfxDeviceAsyncCommand::Arg const*), GfxDeviceAsyncCommand::ArgScratch**, GfxDeviceAsyncCommand::Arg const*, JobFence const&)
#8  0x007fb3bee0130d in RenderShadowMaps(ShadowMapJobHeader const*, ShaderPassContext&, RenderTexture::SetActiveFlags)
#9  0x007fb3bee9d9e2 in ForwardShaderRenderLoop::RenderLightShadowMaps(ForwardShadowMap&, bool, bool, ShaderPassContext&)
#10 0x007fb3bee9d802 in ForwardShaderRenderLoop::RenderForwardShadowMaps(ActiveLight const*, bool, Camera::RenderFlag, ShadowJobData const&, ShaderPassContext&)
#11 0x007fb3bee9fc31 in ForwardShaderRenderLoop::PerformRendering(JobFence&, ActiveLight const*, ShadowJobData const&, bool, bool, bool, Camera::RenderFlag)
#12 0x007fb3beea11fd in DoForwardShaderRenderLoop(RenderLoopContext const&, dynamic_array<RenderObjectData, 0ul>&, CullResults const&, bool, bool, bool, Camera::RenderFlag)
#13 0x007fb3bee965c8 in DoRenderLoop(RenderLoop&, RenderingPath, CullResults&, ShadowMapCache&)
#14 0x007fb3bee446ce in Camera::DoRender(CullResults&, Camera::RenderFlag, Camera::PerformRenderFunction*)
#15 0x007fb3bee45e8f in Camera::CustomRender(CullResults&, ShaderPassContext&, CameraRenderingParams const*, Camera::RenderFlag, Camera::PerformRenderFunction*, void (*)(), void (*)())
#16 0x007fb3bee450b8 in Camera::StandaloneCustomRender(Camera::RenderFlag, Shader*, core::basic_string<char, core::StringStorageDefault<char> > const&, Camera::PerformRenderFunction*)
#17 0x007fb3bee50181 in CameraScripting::Render(Camera*)
#18 0x007fb3bf639376 in Camera_CUSTOM_Render(ScriptingBackendNativeObjectPtrOpaque*)
#19 0x000000410f9e76 in (wrapper managed-to-native) UnityEngine.Camera:Render (UnityEngine.Camera)
#20 0x007fb2dce5d8f9 in mono_print_method_from_ip
#21 0x007fb2dcfca0af in mono_perfcounter_foreach
#22 0x007fb2dcfcaf5c in mono_runtime_invoke
#23 0x007fb3bf5a6142 in scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
#24 0x007fb3bf5a418f in ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
#25 0x007fb3bf5852c7 in MonoBehaviour::CallUpdateMethod(int)
#26 0x007fb3bf09a2cd in void BaseBehaviourManager::CommonUpdate<FixedBehaviourManager>()
#27 0x007fb3bf09a17e in FixedBehaviourManager::Update()
#28 0x007fb3bf33bcdf in InitPlayerLoopCallbacks()::FixedUpdateScriptRunBehaviourFixedUpdateRegistrator::Forward()
#29 0x007fb3bf32f1fe in ExecutePlayerLoop(NativePlayerLoopSystem*)
#30 0x007fb3bf32f26a in ExecutePlayerLoop(NativePlayerLoopSystem*)
#31 0x007fb3bf32f7d2 in PlayerLoop()
#32 0x007fb3bf614b90 in PlayerMain(int, char**)
#33 0x007fb3bde29d90 in __libc_init_first
#34 0x007fb3bde29e40 in __libc_start_main
#35 0x00000000400569 in _start
Traceback (most recent call last):
  File "/home/mr_bright/Desktop/MARL/contractual_gifting/URL_Benchmark_Mingliang/ml-agents/test_example.py", line 9, in <module>
    env.reset()
  File "/home/mr_bright/micromamba/envs/urlb/lib/python3.8/site-packages/mlagents_envs/environment.py", line 318, in reset
    outputs = self._communicator.exchange(
  File "/home/mr_bright/micromamba/envs/urlb/lib/python3.8/site-packages/mlagents_envs/rpc_communicator.py", line 142, in exchange
    self.poll_for_timeout(poll_callback)
  File "/home/mr_bright/micromamba/envs/urlb/lib/python3.8/site-packages/mlagents_envs/rpc_communicator.py", line 111, in poll_for_timeout
    poll_callback()
  File "/home/mr_bright/micromamba/envs/urlb/lib/python3.8/site-packages/mlagents_envs/environment.py", line 418, in _poll_process
    raise UnityEnvironmentException(exc_msg)
mlagents_envs.exception.UnityEnvironmentException: Environment shut down with return code -6 `(SIGABRT).

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

NOTE: We are unable to help reproduce bugs with custom environments. Please attempt to reproduce your issue with one of the example environments, or provide a minimal patch to one of the environments needed to reproduce the issue.

miguelalonsojr commented 1 year ago

Unfortunately, we can't support headless server builds as this time. However, if you're running on a server, similar to running this on google colab, you'll have to setup XVFB, since any ML-Agents environment that uses camera sensors for visual observations, as GridWorld does, needs a framebuffer to render to. Closing as this is not a bug in our current feature set. If you need further assistance on setting this up, please refer to our forums: https://forum.unity.com/forums/ml-agents.453. Closing as this is not a bug.