Smartkin / twinsanity-editor

Crash Twinsanity editor rewrite from the original code by Neo_Kesha
MIT License
21 stars 6 forks source link

Editor failing to load freetype library #28

Closed Smartkin closed 1 year ago

Smartkin commented 1 year ago

Reported by Parisek#8356

Editor seems to fail to load the freetype library due to mismatching of the OS's architecture. TwinsanityEditor.cs has the detection of either 32 or 64-bit to load the correct library at runtime but sometimes it seems to fail even though no error is given by the WinAPI. Seems to only happen on some systems though.

System specs that this occurred on:

Windows 10 64-bit

Steps to reproduce:

  1. Open any chunk
  2. Attempt to open the viewer

Stack trace:

System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
   at SharpFont.FT.FT_Init_FreeType(IntPtr& alibrary)
   at SharpFont.Library..ctor()
   at TwinsaityEditor.FontWrapper.FontService..ctor()
   at TwinsaityEditor.ThreeDViewer..cctor()
Smartkin commented 1 year ago

Added a requirement of needing Visual C++ 2013 Redistributable to readme, should help solve issues if anyone else encounters this. Commit closing this 891b487d69de62dc31f65d1a9a34ccfb8bdca78f