[RESOLVED] Beginner issue involving font loading (Edit: Broken dll dependencies? Please advise)

Hey!

I’m new to Monogame and game development in general. I’m currently experimenting with the basics involved in getting a 2D game setup up and running.

It’s going fairly well so far, but I’ve just run into an issue when attempting to utilize SpriteFonts for the first time. I have my program to set up to load in a SpriteFont from the content pipeline and then use it to print game text. However upon attempting to build my project I get the following error:

Severity Code Description Project File Line Suppression State
Error Processor ‘FontDescriptionProcessor’ had unexpected failure! Game1 c:/users/blackhole/documents/visual studio 2017/Projects/Game1/Game1/Content/Fonts/Default.spritefont

Severity Code Description Project File Line Suppression State
Error The command ““C:\Program Files (x86)\MSBuild\MonoGame\v3.0\Tools\MGCB.exe” /@:“c:\users\blackhole\documents\visual studio 2017\Projects\Game1\Game1\Content\Content.mgcb” /platform:DesktopGL /outputDir:“c:\users\blackhole\documents\visual studio 2017\Projects\Game1\Game1\Content\bin\DesktopGL” /intermediateDir:“c:\users\blackhole\documents\visual studio 2017\Projects\Game1\Game1\Content\obj\DesktopGL” /quiet” exited with code -532462766. Game1

I don’t doubt that this is probably caused by something fairly simple that I have overlooked, but as I’m unfamiliar with creating software using MonoGame I’m unsure as to exactly what it might be!

I’d appreciate it if anybody could help me resolve this issue.

Thanks!

1 Like

Take a look at this post:

You will find:

-Putting text onscreen NEW
http://www.geekswithblogs.net/cwilliams/archive/2017/02/22/243041.aspx

Give it a go, it is very recently posted…

Hope it helps…

Additional info: Attempting to build the SpriteFont directly within the Monogame content pipeline application gives a different and more specific error message:

System.DllNotFoundException: Unable to load DLL ‘freetype6.dll’: The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Thank you for the link, MrValentine, but it didn’t contain much that I wasn’t already aware of!

1 Like

Possibly related to this issue: https://github.com/MonoGame/MonoGame/issues/4485

1 Like

Pursuing this line of inquiry and relevant threads lead to me opening freetype6.dll with Dependency Walker, which is a method through which another user was able to get to the bottom of the above problem that you reference.

Sure enough, Dependency Walker appears to be flagging up some sort of issue with freetype6.dll

Error: At least one required implicit or forwarded dependency was not found.
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.
Warning: At least one delay-load dependency module was not found.

Above this is a long list of files that could apparently not be found on the system. All of these files’ names start with either the string “API-MS-WIN” or “EXT-MS-WIN”.

I will admit that I’m a little out of my depth here. Could anybody hazard a fix? Could the fact that I’m running 64 bit Windows be relevant (it seemed to be a factor in one of the threads I was reading).

Okay, so I gather I probably have to install some sort of distributable, but I’m not sure which one, as multiple versions are being thrown around. Again, please advise! I would be grateful.:slight_smile:

Are you using Downloaded, NuGet or Dev Branch MonoGame?

3.5.1 or 3.6.0?

3.6, I believe. (Edit: I initially thought I was using 3.5.1, but it appears that I had two versions of the installer downloaded, and one was 3.6 and the other is 3.5.1. I am… hoping I installed the 3.6 one. Let me just check that actually).

Edit 2: Yes, it’s definitely 3.6.

I downloaded the installer via the website download links, so I guess downloaded.

Hopefully someone can help further, night :slight_smile:

Bumping this. Anyone know anything more?

I found installing the 2012 c++ redist for Visual Studio fixed this issue.

http://www.microsoft.com/en-NZ/download/details.aspx?id=30679

At first I was running 3.6, and after installing 3.7 (dev branch) it still didn’t work, at which point I installed the above redist.

3 Likes

Worked like a charm. Thank you kindly! :smiley:

Worked perfectly!

I just wanted to add that you will only need to download 1 of the 3 files listed in that link, vcredist_x64.exe, since that is for 64-bit systems. vcredist_x86.exe is for 32-bit systems (which can’t be used for Monogame development) and vcredist_IA64.exe is for Itanium systems which are Server Systems.

1 Like

Hi! I’m still having this problem, and installing Visual C++ 2012 redistributable didn’t help. Since this thread is two years old, has something changed since then?

This worked on my old computer, but I bought a new one a couple of months ago, and I can’t get monogame to work on this computer.


This is still a perplexing thing for me, maybe I am not currently doing certain things, but I have these installed, maybe try each one and feedback which one if they did, solved the issue:

I also have:

I don’t have any issues loading spritefonts, and nobody seems willing to explore the process to find an exact solution, so, this may persist unfortunately.

Out of curiosity, is this an OpenGL project? Just noticed this was an issue with the OP in an OpenGL project… can you try setting up a DX project and see if you still have said issue before installing anything else?

Sorry, I might have been a bit rash, but this thread really helped me nevertheless! Now I tried building the font with the monogame content pipeline too, and got this error:

I might have installed this font on my old computer five years ago, but I really can’t remember. Changing the font to “Arial” fixed the issue. Now I only need to figure out where I got the font from…

It might be nice if visual studio gave a bit more info than just the “unexpected failure”, for noobs like me.

1 Like

These are two different tools and as such requires the third party - I suppose in this case, MonoGame - to provide the additional data, but then we get into the issue of whether the information is available for such an interaction or whether it was implemented or not.

It is one reason I suggest keeping the Pipeline Tool completely separate and why I created a guide on setting it up.

Glad to see you figured it out, Welcome to Programming :slight_smile:.

Oh and also, Welcome to the forums @Pecco

Happy Coding!

1 Like

If you already have the free image dll installed and this isn’t working its due to the Env variable not being correctly set.

Install the optional sdk’s thru visual studio installer and it will set up the environmental variables itself.
If you forgot were it is… Hit your start menu and type in visual studio installer it should pop up.
I suggest you install all the optional c++ sdks if you have space and time to just to be done with it.

1 Like

I’m also having the same issue on my computer. I don’t think there’s any luck in solving this problem is there?

This is quick annoying since the project I’m working on is very large and bottlenecked right now.

I’ve installed all the redistribution packages and nothing has worked for me.