Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeType DllNotFoundExceptionon on Linux Headless #1264

Closed
zahndy opened this issue Jan 28, 2024 · 9 comments
Closed

FreeType DllNotFoundExceptionon on Linux Headless #1264

zahndy opened this issue Jan 28, 2024 · 9 comments
Labels
bug Something isn't working as intended. linux Issues specific to the Linux native build.

Comments

@zahndy
Copy link

zahndy commented Jan 28, 2024

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

  • Install fedora linux and update packages.
  • Install mono-devel.
  • Install steamcmd.
  • Install Headless:

/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

  • Run Headless:

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

@zahndy zahndy added the bug Something isn't working as intended. label Jan 28, 2024
@Nutcake
Copy link

Nutcake commented Jan 28, 2024

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
Copy link
Author

zahndy commented Jan 28, 2024

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

@Nutcake
Copy link

Nutcake commented Jan 28, 2024

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
Copy link
Author

zahndy commented Jan 28, 2024

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
Copy link

Nutcake commented Jan 28, 2024

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
Copy link
Author

zahndy commented Jan 28, 2024

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

@Nutcake
Copy link

Nutcake commented Jan 29, 2024

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

@zahndy
Copy link
Author

zahndy commented Jan 29, 2024

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.

@shiftyscales shiftyscales removed their assignment Jan 29, 2024
@shiftyscales shiftyscales added the linux Issues specific to the Linux native build. label Jan 29, 2024
@zahndy zahndy closed this as completed Jan 30, 2024
@Nutcake
Copy link

Nutcake commented Jan 30, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as intended. linux Issues specific to the Linux native build.
Projects
None yet
Development

No branches or pull requests

3 participants