UMG blueprint unresolved compile error when i run my game

Hello, i’ve upgraded to 4.8 and since then, every time i run the editor with my project i get unresolved compile error on some UMG widgets i use to draw the slots of my inventory. If i go to the slot parent class, it has the green checkbox on the compile button, so it has been compiled. If i press it again and run the game he no longer gives me error on the child widgets. If i restart the editor, the problem happens again. On the output window of Visual Studio i get this error for the 4 umg widgets:

[2015.06.11-15.20.00:398][  0]LogBlueprint:Error: [compiler GearSlot] Error This blueprint (self) is not a TRASHCLASS_BaseSlot_253, therefore ' Target ' must have a connection.
[2015.06.11-15.20.00:408][  0]LogBlueprint:Warning: [compiler GearSlot] Warning [0015.57] Compile of GearSlot failed. 1 Fatal Issue(s) 0 Warning(s) [in 21 ms]
[2015.06.11-15.20.00:409][  0]LogBlueprint:Warning: [compiler GearSlot] Warning [0015.57] Compile of GearSlot failed. 1 Fatal Issue(s) 1 Warning(s) [in 0 ms]

Hello Rudy, i believe i won’t be able to reproduce this in a clean project. Looks like it’s some kind of backwards incompatibility that happens after an upgrade. Right now i had to roll back to 4.7 to continue development, but i believe that log is the best information i have about the issue.

Hello xlar8or,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?
  2. If so, could you provide a detailed set of steps in order to reproduce this issue on our end?
  3. Could you provide screen shots of the blueprints involved with this issue?

I was able to create a 4.8 copy of my project, so i can follow my 4.8 issues and still be able to develop safely in the 4.7 version, so i can try to perform some tests, or get some additional you might need.

Hello xlar8or,

Please let me know if you are able to provide a detailed set of steps to reproduce this issue on our end.

It seems like a issue hard to replicate, i can try to look at the output window to try to find more useful information. What is a TRASHCLASS? Why would it be using that instead of my BaseClass UMG widget?

I do get the same problem in 4.8, I believe it’s one of the cyclical dependendcy problems. Do you reference anything in your widget that references any other blueprint that references back to your widget which get’s the error? Its even enough if you reference the gamemode, the gamemode references the playercontroller and the playercontroller references your UI which references your widget again.

Hello xlar8or,

Do you have a copy of the project that is giving you the issue? If so, could you zip it down and sent it to me so that I can take a closer look at the issue? I also believe that could have a point. While 4.8 has been improved in the way of handling cyclical dependencies, it’s possible that we did not catch everything.

I can’t send the project and the migrate of umg widgets doesn’t appear to work properly to send them to a fresh project to see if i get the same error. Any other suggestion?

Hello xlar8or,

When you say that you cannot send the project, is the due to size or privacy issues? If it is because of size you can post a link from drop box or google drive. Could you dig through your reference viewer to see if there are any circular dependency issues. You can right click an asset to bring up a reference viewer.

It’s because of privacy issues :frowning: I didn’t find anything on the reference viewer, but maybe i’ve missed something, i’ll look deeper.

Hello xlar8or,

Does updating to 4.81 cause the same issue as updating to 4.8? Is it possible to get a screen shot of the issues/ blueprints involved?

Hey Rudy, i will update to 4.8.1 now and will let you know.

Edit: The problem still persists in 4.8.1. What screenshots do you need ? I have a BaseSlot widget that derives from UserWidget, from that class i derive into SingleSlot (for slots with room for 1 item) and ItemTableSlot (for slots in a table of items). SingleSlot has 3 widgets that derive from it and ItemTableSlot has 1 widget. When i run the game i get this error:

47721-umg+error.png

I have to press the Compile button in both SingleSlot and ItemTableSlot to get it working, even though i have the green check on it from the beginning.

Hello xlar8or,

I would need screen shots of the blueprints that are throwing the errors. Seeing the errors in context would help narrow down what issue it is that you are experiencing.

Since i just have to recompile the SingleSlot and ItemTableSlot for it to work, shouldn’t they be the cause for the problem? The error is the same for every widget, i’ll share a screenshot of it:

Update 1: I’ve been doing some tests. I created a new widget that derives from SingleSlot, on the construct script i add a Load call (which calls the parent’s implementation). If i use that new widget instead of the GearSlot on the CreateWidget and restart the editor, when i press play the new widget appears on the list of umg compile errors. If i do the same but parent it to BaseSlot i don’t get an error, so there’s something wrong SingleSlot and ItemTableSlot. The error is always on the load, but the load comes from BaseSlot.

Update 2: I deleted the load override functions from SingleSlot and ItemTableSlot, restarted the engine, the errors were gone. If i override Load again, even with an empty function i get the errors again, so it’s definitely something related to Load.

Hello xlar8or,

In the image that is show it looks like the node is looking for a widget called item table slot. That is was the function is used for. If you place a reference to the item table slot, does the error go away?

Item Table Slot is the parent class of the current widget, so i’m calling Load on self, because even if my class doesn’t have an override of Load, Item Table Slot has an implementation, so it should just call that one, the problem is that for some reason he’s using a TRASHCLASS_BaseSlot as the target. The current widget is a Base Slot not a TRASHCLASS_BaseSlot, that’s why i was asking what is TRASHCLASS?

Any news on this? :slight_smile:

Hello xlar8or,

The TrashClass that you are seeing appears to be the work of a garbage collection function like CleanAndSanitizeClass() for example. As you said before this may be due to changing engine versions. What I normally do in this type of situation (if I need to update to the newer version of the engine) is go through and remake any blueprints that are giving me difficulties. This also has the benefit of giving me a chance to improve my old code, iron out any potential issues and incorporate new features. I find that this sort of approach can prevent head aches in the future. I hope that this information helps.

Make it a great day

I’ll try to do that, but it’s still a lot of work, but shouldn’t be like this, because imagine i had a huge project, it would be a big setback having to redo that :frowning: