Yellow-Dog-Man / Resonite-Issues

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

FreeType DllNotFoundExceptionon on Linux Headless #1264

Closed zahndy closed 7 months ago

zahndy commented 7 months ago

Describe the bug?

Similar to #1241 Instantly crashes upon launch on a fresh installation. Complains its missing freetype even though "freetype6.so" is present under "/Headless".

To Reproduce

/home/zahndy/steamcmd/steamcmd.sh +@sSteamCmdForcePlatformType linux \ +force_install_dir "/home/zahndy/resonite_test/" \ +login #redactedusername #redacteduserpass \ +app_license_request 2519830 \ +app_update 2519830 -beta headless -betapassword #redactedbetapassword validate \ +quit

mono Resonite.exe

Expected behavior

Headless client starting up without a world loaded.

Screenshots

No response

Resonite Version Number

Beta 2024.1.27.1114

What Platforms does this occur on?

Linux

What headset if any do you use?

No response

Log Files

5:17:33 PM.916 AppPath: /home/zahndy/resonite_test/Headless DataPath: /home/zahndy/resonite_test/Headless/Data CachePath: /home/zahndy/resonite_test/Headless/Cache 5:17:33 PM.928 Initializing App: Beta 2024.1.27.1114 OS Platform: Unix 6.6.8.200 (X64) Platform: Linux HeadDevice: Headless IsAOT: False OS: Fedora Linux CPU: Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz GPU: Iris Plus Graphics 640 (rev 06) PhysicalCores: 2 MemoryBytes: 7.62 GB VRAMBytes: 0.00 B MaxTextureSize: 16384 IsGPUTexturePOTByteAligned: True UsingLinearSpace: False XR Device Name: XR Device Model: StereoRenderingMode: Max GC Generation: 1, IsLittleEndian: True System.Numerics.Vectors HW accelerated: True, Vector.Count: 4 Brotli native encoding/decoding supported: True 5:17:33 PM.929 Supported Texture Formats: Unknown, Alpha8, R8, RGB24, ARGB32, RGBA32, BGRA32, RGB565, RGBAHalf, ARGBHalf, RHalf, RGHalf, RGBAFloat, ARGBFloat, RFloat, RGFloat, BC1, BC2, BC3, BC4, BC5, BC6H, BC7, ETC2_RGB, ETC2_RGBA1, ETC2_RGBA8, ASTC_4x4, ASTC_5x5, ASTC_6x6, ASTC_8x8, ASTC_10x10, ASTC_12x12 5:17:33 PM.930 Processing startup commands... 5:17:33 PM.935 Scanning locales... 5:17:33 PM.946 Available locales: cs, de, en, en-gb, eo, es, et, fi, fr, is, ja, ko, nl, no, pl, pt-br, ru, sv, tr, zh-cn, zh-tw 5:17:33 PM.960 Loading Config.json... 5:17:33 PM.961 Computing compatibility hash... 5:17:33 PM.965 Compatibility Hash: DOcBJ83qtG4iv5+V3TvRJw== 5:17:33 PM.966 Initializing FrooxEngine... 5:17:34 PM.933 FreeImage Version: 3.18.1 5:17:34 PM.944 BepuPhysics Version: 2.4.0.2-ydm-0.1.3 5:17:34 PM.992 Exception initializing FrooxEngine: System.TypeInitializationException: The type initializer for 'Elements.Assets.FreeTypeFont' threw an exception. ---> System.DllNotFoundException: freetype6 assembly: type: member:(null) at (wrapper managed-to-native) SharpFont.FT.FT_Init_FreeType(intptr&) at SharpFont.Library..ctor () [0x00007] in <8d8ff4c00f7b4b64a06f7d27e4ec6c0a>:0 at Elements.Assets.FreeTypeFont..cctor () [0x00000] in <9b0f7a77099b406d8eb812b7e3a52cfc>:0 --- End of inner exception stack trace --- at FrooxEngine.LibraryInitializer.Initialize (FrooxEngine.Engine engine) [0x0009c] in <48327c6b0be34252b0228a26a5f7e2f6>:0 at FrooxEngine.EngineInitializer.InitializeFrooxEngine (FrooxEngine.Engine engine) [0x0005f] in <48327c6b0be34252b0228a26a5f7e2f6>:0 at FrooxEngine.Engine.InitializeFrooxEngine () [0x00086] in <48327c6b0be34252b0228a26a5f7e2f6>:0

at System.Environment.get_StackTrace () [0x00000] in <8611ac11d22247aabb4fd94490032492>:0 at Elements.Core.UniLog.Error (System.String message, System.Boolean stackTrace) [0x00000] in <80229d1197cf49d988a8b637774ba61f>:0 at FrooxEngine.Engine.InitializeFrooxEngine () [0x00000] in <48327c6b0be34252b0228a26a5f7e2f6>:0 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <8611ac11d22247aabb4fd94490032492>:0 at FrooxEngine.Engine.InitializeFrooxEngine () [0x00000] in <48327c6b0be34252b0228a26a5f7e2f6>:0 at FrooxEngine.Engine.Initialize (System.String appPath, FrooxEngine.LaunchOptions options, FrooxEngine.ISystemInfo systemInfo, FrooxEngine.IInternalResource resources, FrooxEngine.IEngineInitProgress progress) [0x00000] in <48327c6b0be34252b0228a26a5f7e2f6>:0 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <8611ac11d22247aabb4fd94490032492>:0 at FrooxEngine.Engine.Initialize (System.String appPath, FrooxEngine.LaunchOptions options, FrooxEngine.ISystemInfo systemInfo, FrooxEngine.IInternalResource resources, FrooxEngine.IEngineInitProgress progress) [0x00000] in <48327c6b0be34252b0228a26a5f7e2f6>:0 at FrooxEngine.StandaloneFrooxEngineRunner.Initialize (FrooxEngine.LaunchOptions options) [0x00000] in <48327c6b0be34252b0228a26a5f7e2f6>:0 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <8611ac11d22247aabb4fd94490032492>:0 at FrooxEngine.StandaloneFrooxEngineRunner.Initialize (FrooxEngine.LaunchOptions options) [0x00000] in <48327c6b0be34252b0228a26a5f7e2f6>:0 at FrooxEngine.Headless.Program.Main (System.String[] args) [0x00000] in <9d5e4d86c7cb4368b5816924e2ace62f>:0 at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine] (TStateMachine& stateMachine) [0x00000] in <8611ac11d22247aabb4fd94490032492>:0 at FrooxEngine.Headless.Program.Main (System.String[] args) [0x00000] in <9d5e4d86c7cb4368b5816924e2ace62f>:0 at FrooxEngine.Headless.Program.

(System.String[] args) [0x00000] in <9d5e4d86c7cb4368b5816924e2ace62f>:0 5:17:34 PM.994 Unhandled Exception:

System.TypeInitializationException: The type initializer for 'Elements.Assets.FreeTypeFont' threw an exception. ---> System.DllNotFoundException: freetype6 assembly: type: member:(null) at (wrapper managed-to-native) SharpFont.FT.FT_Init_FreeType(intptr&) at SharpFont.Library..ctor () [0x00007] in <8d8ff4c00f7b4b64a06f7d27e4ec6c0a>:0 at Elements.Assets.FreeTypeFont..cctor () [0x00000] in <9b0f7a77099b406d8eb812b7e3a52cfc>:0 --- End of inner exception stack trace --- at FrooxEngine.LibraryInitializer.Initialize (FrooxEngine.Engine engine) [0x0009c] in <48327c6b0be34252b0228a26a5f7e2f6>:0 at FrooxEngine.EngineInitializer.InitializeFrooxEngine (FrooxEngine.Engine engine) [0x0005f] in <48327c6b0be34252b0228a26a5f7e2f6>:0 at FrooxEngine.Engine.InitializeFrooxEngine () [0x000ad] in <48327c6b0be34252b0228a26a5f7e2f6>:0 at FrooxEngine.Engine.Initialize (System.String appPath, FrooxEngine.LaunchOptions options, FrooxEngine.ISystemInfo systemInfo, FrooxEngine.IInternalResource resources, FrooxEngine.IEngineInitProgress progress) [0x00674] in <48327c6b0be34252b0228a26a5f7e2f6>:0 at FrooxEngine.StandaloneFrooxEngineRunner.Initialize (FrooxEngine.LaunchOptions options) [0x00111] in <48327c6b0be34252b0228a26a5f7e2f6>:0 at FrooxEngine.Headless.Program.Main (System.String[] args) [0x00396] in <9d5e4d86c7cb4368b5816924e2ace62f>:0 at FrooxEngine.Headless.Program.

(System.String[] args) [0x0000c] in <9d5e4d86c7cb4368b5816924e2ace62f>:0

Additional Context

No response

Reporters

No response

Nutcake commented 7 months ago

Can you try running the headless like this: MONO_LOG_LEVEL=debug mono Resonite.exe This will show where mono is looking for which library and why it can't load any given one and might help debug this issue quicker.

zahndy commented 7 months ago

You probably only need the end but here's the entire output. MonoDebugResonite.txt

Nutcake commented 7 months ago

Looks like freetype6 requires libbz2:

Mono: DllImport error loading library '/home/zahndy/resonite_test/Headless/libfreetype6.so': 'libbz2.so.1.0: cannot open shared object file: No such file or directory'.

Try installing the bzip2-libs package through dnf.

zahndy commented 7 months ago

That one already seems to be installed?


zahndy@fedora:~/resonite_test/Headless$ sudo dnf install bzip2-libs 
Last metadata expiration check: 1:20:11 ago on Sun 28 Jan 2024 05:06:38 PM CET.
Package bzip2-libs-1.0.8-16.fc39.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete! 
Nutcake commented 7 months ago

Looking at my own Fedora install here, it looks like there is a symbolic link for libbz2.so.1, however Resonite looks for libbz2.so.1.0 instead. Can you try creating a link between them like so: sudo ln -s /usr/lib64/libbz2.so.1 /usr/lib64/libbz2.so.1.0

zahndy commented 7 months ago

That fixes it, headless is running now. fedora - 2024.1.27.1114 - 2024-01-28 18_47_38.log Thanks~

Nutcake commented 7 months ago

Great! You should probably close this issue then, since it is resolved.

zahndy commented 7 months ago

Alright, just still wondering why it suddenly stopped working, If its a fedora specific issue and If I have to keep creating the link on clean fedora going forward.

Nutcake commented 7 months ago

It is a fedora specific issue, yes. Most other distributions create links to all different version formats like so: image

You likely wont have to recreate the link in the future, as it points to the *.1 link which automatically gets updated to point to the latest version by your package manager.