Slate Style crash the editor


i’m trying to use my own style to build an HUD. I followed how it was done in the ShooterGame and StrategyGame. I got it working with some STextBlock and put a bunch of letter within a grid in the center of the screen, toggling it on and off with a keyboard event. Now i’m trying to change those STextBlock into a custom widget with a Picture, its basically the same as the button widget from the StrategyGame.

I explained in details in the forum : Slate Style path crash the editor - C++ Programming - Unreal Engine Forums

Since then I tried many things and simplify the code as much as possible in order to identify my problem. As soon as i access any ressource with a “GetBrush” or “GetFontStyle” the editor crash instantly and all i get in the log is :

[2014.03.31-05.52.09:735][655]LogWindows: === Critical error: === [2014.03.31-05.52.09:735]
[655]LogWindows: Fatal error!

i added my last log : log
and the dump file : dump

If i just comment those calls everything work, but obviously with no pictures. I’m pertty much stuck, i tried many many things for hours, looking at different sources from example and within the editor. That style class always seems to be more or less the same so i can’t find out what i’m doing wrong.

Thanks for your help !

From reading the forum post, I can see that you’re doing the correct thing with your style set (you shouldn’t keep random styles in random variables like Rama suggested, a style set is the correct solution and you’re already using it).

It seems that you’ve just not initialised your style set before you access it. I’ve replied to your forum post with more information about how to do this:

Yes correcting my game module class fixed most of the problems :slight_smile:

Thanks to both of you for taking time to check this problem !