Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
141 stars 2 forks source link

.NET 8 Headless fails to load Steamworks on Linux aarch64 (ARM) #2545

Closed ticpu closed 4 months ago

ticpu commented 4 months ago

Describe the bug?

For the same revision, using the .NET 8.0 instead of the Mono version of the Headless on Linux on ARM results in the process crashing after the following messages:

System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Could not load file or assembly 'Steamworks.NET, Version=20.2.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

To Reproduce

Run /usr/bin/dotnet /opt/Resonite/Headless/net8.0/Resonite.dll on Ubuntu 22.04 on aarch64 architecture.

I can provide an environment for testing if needed.

Expected behavior

Steamworks should load just as well using Dotnet than Mono.

Screenshots

No response

Resonite Version Number

2024.7.12.12

What Platforms does this occur on?

Linux

What headset if any do you use?

No response

Log Files

resonite-headless-net8.0.log

Additional Context

$ lscpu

Architecture:           aarch64
  CPU op-mode(s):       32-bit, 64-bit
  Byte Order:           Little Endian
CPU(s):                 4
  On-line CPU(s) list:  0-3
Vendor ID:              ARM
  Model name:           Neoverse-N1
    Model:              1
    Thread(s) per core: 1
    Core(s) per socket: 4
    Socket(s):          1
    Stepping:           r3p1
    BogoMIPS:           50.00
    Flags:              fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp ssbs

$ lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:    22.04
Codename:   jammy

Reporters

@tiky

ticpu commented 4 months ago

Furthermore, strace shows that the process isn't even trying to load a file before failing.

getcwd("/opt/Resonite/Headless", 256)   = 23
readlinkat(AT_FDCWD, "/opt", 0xffffc7f57e20, 1023) = -1 EINVAL (Invalid argument)
readlinkat(AT_FDCWD, "/opt/Resonite", 0xffffc7f57e20, 1023) = -1 EINVAL (Invalid argument)
readlinkat(AT_FDCWD, "/opt/Resonite/Headless", 0xffffc7f57e20, 1023) = -1 EINVAL (Invalid argument)
newfstatat(AT_FDCWD, "/opt/Resonite/Headless/ProtoFlux.Nodes.FrooxEngine.dll", {st_mode=S_IFREG|0775, st_size=277504, ...}, 0) = 0
openat(AT_FDCWD, "/opt/Resonite/Headless/ProtoFlux.Nodes.FrooxEngine.dll", O_RDONLY) = 164
mkdirat(AT_FDCWD, "/opt/Resonite/Headless/net8.0/RuntimeData\\AssemblyMetadata", 0777) = -1 EEXIST (File exists)
newfstatat(AT_FDCWD, "/opt/Resonite/Headless/net8.0/RuntimeData\\AssemblyMetadata", {st_mode=S_IFDIR|0755, st_size=468, ...}, 0) = 0
Scanning assemblies
openat(AT_FDCWD, "/proc/self/task/67337/comm", O_RDWR) = 166
Data Model Assembly: ProtoFlux.Nodes.FrooxEngine, Type Count: 155 (total: 784, Compatibility Hash: w5eT+VlkgtJngh/EZmrhfg==, Type: Core)
Data Model Assembly: SkyFrost.Base.Models, Type Count: 4 (total: 193, Compatibility Hash: pi+qiFhdImZ42rvy8ybJnQ==, Type: Core)
Data Model Assembly: Elements.Core, Type Count: 51 (total: 557, Compatibility Hash: 3XaWAwwz7srqNA3kWPtREA==, Type: Core)
Data Model Assembly: FrooxEngine.Store, Type Count: 1 (total: 103, Compatibility Hash: K22/sKfODKjKTdTi7M/GnQ==, Type: Core)
Data Model Assembly: Elements.Assets, Type Count: 84 (total: 440, Compatibility Hash: 24V+N5WFzjcN116FRTKEug==, Type: Core)
Data Model Assembly: SkyFrost.Base, Type Count: 3 (total: 405, Compatibility Hash: te30htqkPqTW/nEKuspZsA==, Type: Core)
Data Model Assembly: ProtoFlux.Nodes.Core, Type Count: 10 (total: 2172, Compatibility Hash: XxMkLAc6ulemxNEOJo7IOQ==, Type: Core)
Exception getting types from assembly FrooxEngine, Version=2024.7.12.12, Culture=neutral, PublicKeyToken=null:
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Frooxius commented 4 months ago

We do not support ARM with headless.

ticpu commented 4 months ago

I see, leaves me curious as to why it works with mono.

I'll try to find a workaround and post it here if anything.