space-wizards / RobustToolbox

Robust multiplayer game engine, used by Space Station 14
https://spacestation14.io
Other
551 stars 410 forks source link

Unable to load DLL 'freetype6' (not found) #835

Closed tukib closed 5 years ago

tukib commented 5 years ago

Error while launching SS14.Launcher.exe. This occurs even when the exe is run as administrator. Using Windows 10 1809 17763.615. I have not installed the Visual C++ Redistributable yet, so that may be the issue. Perhaps check for this and offer a warning to the user or give an option to download and install it?

stack trace:

Unhandled Exception: Robust.Shared.IoC.Exceptions.ImplementationConstructorException: Robust.Client.Graphics.FontManager threw an exception inside its constructor. ---> System.DllNotFoundException: Unable to load DLL 'freetype6': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
  at SharpFont.FT.FT_Init_FreeType(IntPtr& alibrary)
  at SharpFont.Library..ctor()
  at Robust.Client.Graphics.FontManager..ctor() in /var/lib/jenkins/workspace/SS14 Content/RobustToolbox/Robust.Client/Graphics/FontManager.cs:line 32
  --- End of inner exception stack trace ---
  at Robust.Shared.IoC.DependencyCollection.BuildGraph() in /var/lib/jenkins/workspace/SS14 Content/RobustToolbox/Robust.Shared/IoC/DependencyCollection.cs:line 146
  at Robust.Client.GameController.InitIoC(DisplayMode mode) in /var/lib/jenkins/workspace/SS14 Content/RobustToolbox/Robust.Client/GameController/GameController.IoC.cs:line 75
  at Robust.Client.GameController.Main() in /var/lib/jenkins/workspace/SS14 Content/RobustToolbox/Robust.Client/GameController/GameController.Standalone.cs:line 40        
PJB3005 commented 5 years ago

We should be bundling freetype with the client. Can you checkt that freetype6.dll exists inside %APPDATA%/Space Station 14/launcher/client_bin?

tukib commented 5 years ago

%APPDATA%/Space Station 14/launcher/client_bin/freetype6.dll exists. I also tried running client_bin/Robust.Client.exe, but I was met with the same error.

PJB3005 commented 5 years ago

This is because the freetype6 dll depends on Visual Studio 2013 Redistributable. I'll work on recompiling the library to use 2015 though which I believe should make you not have to install anything else.