Lots of bugs. Need help... (with short video)

I was following some official tutorial series: https://www.youtube.com/watch?v=uFc0DgOzR50 All worked fine at first. But then I was getting unexpected value changes in my struct InventoryItems. Then at some point I got these warnings (all over the place):
Warning: Wire-trace was not injected ...? - Blueprint - Epic Developer Community Forums

I can/could literally place a print-string-node between the constructor and the event-begin-play and the value of the variable (that I just created, a new variable called TEST of the type InventoryItems (=struct)). The variable isn’t used ANYWHERE. I only set it once and I see it’s value change back to default values. I set it properly:

Then I restarted again and found myself into an even larger pile of bugs.

LogProperty:Error:
UStructProperty::Serialize Loading:
Property ‘StructProperty
/Game/Blueprints/MyCharacter.MyCharacter_C:InventoryItems.InventoryItems’.
Unknown structure.

The struct exists, it’s a valid variable in MyCharacter. And it just so happens to be that very same variable that keeps resetting some of it’s values to default values.

I could not recreate the problem in a blank project. But this project does have a lot of weird errors and warnings that popup ‘randomly’. I mean, all I have to do sometimes is just restart the engine, and voila, plus or minus 20 new errors and compiler failures…

So okay, I try to fix the compiler errors. It seems that the lines between the array of that specific struct broke in some BP’s. I fix them, I compile&save all. Everything is fine. I exit the project. Launch the project again. Guess what? All lines are gone again. I repeat this 3x and finally the editor just crashes on the compile…

Here is a video of what I did. Note that if it does not crash, it will just disconnect the lines to all arrays of this struct again over and over again… And I’m stuck again…

Recording:


There is another possible bug in this project. Namely the fact that there is a ‘compile-loop’. Compiling blueprint A may ‘de-compile’ (= shows the gear on the compile button again) blueprint B. And if I compile blueprint B, it ‘de-compiles’ Blueprint C, etc, etc…

And then there is this annoying “There is no such upload” when attempting to upload a file here when you experience a lot of traffic…

While I’m at it anyway, I also find it hard to debug enums: Watch Value: Enum - Programming & Scripting - Epic Developer Community Forums Is that intended or do I do something wrong? It’s almost as if the Engine forgot to override some ToString() for the enum and instead just prints out the class name :frowning:

Now I can’t proceed with the project :frowning:

[link text][2]

Hello ,

It appears that you have a lot going on. I would like to try and break things up a bit and tackle these issues one at a time. With that being said I believe that your compiling issues are due to circular dependency. Could you go through your blueprints and make sure that this is not the case?

Compiling either BP will indeed ‘de-compile’ the other one. So I believe that, that is a circular reference. But it was done in the tutorial (from Epic). But it is very possible that I misunderstood something and did something wrong myself this time.

Anyway, the inventory items are stored in the MyCharacter BP, which the HUD requires to render the inventory and so it references the MyCharacter. But it also needs it for the Hitpoints and many other things.

In the tutorial he made a variable MyCharacter in the HUD-widget. You can see the variable on the left here: http://www.youtube.com/watch?v=uFc0DgOzR50&t=18m15s And he also made a variable in the MyCharacter BP that contains the reference to the HUD-widget on EventBeginPlay. I tested it in a blank project with only just one blank UMG and a single variable here and one in the MyCharacter. And yes, this already is a circular reference and causes the same ‘de-compile’ issues.

Is this a mistake from the tutorial or did I miss something? And how does one solve this with blueprints? Do we need some kind of singleton BP in between the HUD & MyCharacter that communicates between the other classes with event dispatchers (totally dirty workaround)? Or am I totally confused? How are we supposed to do this?

However, I found out that my blank test where I had only 2 blueprints with a reference to each other, are marked as properly compiled AFTER I restart the project. But w/o a restart they will loop endlessly… Compiling either one again will start the loop again until next restart (or until I break the circular reference). But the fact that a project restart marks them both as properly compiled even though they are not, must be a bug. It can’t be anything else. Regardless of whether or not my blueprints are properly designed by me or not.

[4.5.1] Compiling interface blueprint will always crash - Blueprint - Unreal Engine Forums Scroll down to “Tim Lincoln :diamonds::diamonds: STAFF”'s post.

So… That does still create a circular reference for me. The moment I pass the character reference through a function/event/interface, a circular reference is immediately created.

However, as soon as I cast anything to MyCharacter (or SideScrollerCharacter) the blueprint automatically creates a circular reference back to the player…

And eventdispatchers don’t work either because they still require a SideScrollerCharacter reference.

And interfaces also seem to behave exactly the same as eventdispatchers.

Wow… I just can’t figure out how to get rid of a circular reference without creating a gigantic mess of globals and ‘in-between-objects’ or loads of structures and other extremely dirty workarounds that will eventually break your project through other means…

Hello ,

After getting to the end of your post I would like to clarify what it is exactly you would like me to assist you with or if you still require assistance with the circular reference issue. Please let me know. If you still require assistance I will be more than happy to help.

Yes I still need help I’m still stuck at the exact same point where I was about a week ago :(. I can’t figure it out.

What I need help with:

[1] Is the tutorial correct or incorrect about how to interact between the HUD and the player? (it creates a circular reference)

[2] I still can not figure out how to NOT get a circular reference between 2 classes that both need data from one another. Howto fix: circular references - World Creation - Unreal Engine Forums
Even with a blank project with a VERY simple hud-widget, I can not get it done. I added the 3 steps to reproduce it in my last comment there. And the Epic tutorials/documentation also create '‘infinite compile loops’.

[3] Then, if the above 2 steps work, then I need to test if the editor still bugs on me regarding compile-loops and assigning default values to variables even though it should not. And then test if the links to the arrays no longer break.

I’m still completely stuck on this.

My conclusion from that other topic is, that circular references should not cause any problems (in theory). So my problems/bugs should be caused by something else. But what, I have no idea. Also communicating over the forum is not very efficient.

Also I assume that “circular dependency” = “circular reference”?

Hello ,

I have a couple of questions for you. To help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this in a clean project (not just a clean blueprint)
  2. If so, could you provide a detailed list of steps to reproduce this issue?

Note: In general circular dependencies should be avoided as it is good programming practice.

  1. The video on the other topic was a clean blank project with nothing added but the 2 classes that were shown in the video and the SideScrollerCharacter class (- YouTube)
  2. Here are some example steps

Steps:

  1. create blank project (sidescroller 3D) in 4.6.1 or 4.7.2 (I tested both)
  2. Add a new HUD widget (other classes also work as long as you can create or spawn it somehow)
  3. open the SideScrollerCharacter class and create the widget in the eventbeginplay.
  4. open the widget BP, and add a CastToSideScrollerCharacter node with a GetPlayerPawn (so it compiles) to the EventConstruct node.

That should be the most basic & simple way of recreating the problem. Or look at one of the setups below. They both recreate the problem as well. Or the video.

Or

I also would like to know answers to these questions. Especially “I still can not figure out how to NOT get a circular reference between 2 classes that both need data from one another.” - because a common ‘global’ classes, etc. are not a good solution… I remember when i was doing logic in C# in Unity, i’ve had a lot of circular references and this never caused any problems (same in some Java projects) - but in blueprints they can bug the whole project…

Hello ,

I was able to reproduce this issue on our end. I have written up a report ( UE-11470) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your time and information.

Make it a great day

Thank you.

How long do you estimate that it will take to fix this bug? It seems to affect almost every single project created in UE4 using blueprints. And I also do not know how big the side-effects of it are (like does it also cause all the other problems that I experience in my original post).

Hello ,

There is no current time frame for how long this issue may take to resolve. As for the effects of this particular issue, this is also unclear. However, I will provide updates with pertinent information as it becomes available.

Solution:
It just occurred to me this morning that most bugs I get, are usually because the engine does not synch the blueprints with the actual code underneath it. So I was like, what if, what if I may have added an extra field to the inventory-struct at some point in time, would the engine not have refreshed the variables everywhere that are of this type? Would it be that “stupid”?

LogProperty:Error: UStructProperty::Serialize Loading: Property ‘StructProperty /Game/Blueprints/MyCharacter.MyCharacter_C:InventoryItems.InventoryItems’. Unknown structure.

Yup, it was resolved by changing the variable-type to a byte, then back to the Struct_Inventory type in MyCharacter AND in the widget blueprint. This editor… It really just never never ever synchronizes the blueprints with the actual code underneath it when you change a variable type or something else or a struct or an enum or whatever. It just bugs the entire project… Unbelievable. This is another serious bug though.


Sadly (obviously) after working myself around that bug, some other warnings/bugs still remain:

LogBlueprint:Warning: USimpleConstructionScript::FixupRootNodeParentReferences() - Couldn’t find inherited parent component ‘TheItemMesh’ for ‘PointLight’ in BlueprintGeneratedClass ‘REINST_Item_Torch_C_243’ (it may have been removed)
LogBlueprint:Warning: USimpleConstructionScript::FixupRootNodeParentReferences() - Couldn’t find inherited parent component ‘TheItemMesh’ for ‘PointLight’ in BlueprintGeneratedClass ‘REINST_Item_Torch_C_257’ (it may have been removed)

33626-pl.png

This one does not seem to cause any noticeable side-effects for the moment. Is this another warning-spam-bug? Or is there really something wrong?


And what about this warning?:

LogSlate:Warning: Failed to load font data from ‘Veranda’
LogUObjectGlobals:Warning: Failed to find object ‘Class None.’

All I could find was this topic: Failed to find object 'Class None.' - Platform & Builds - Epic Developer Community Forums
But it may be a slightly different variant though. Is bug report UE-5528 still not solved? Where can I track/lookup those bug reports? Is there a bug-tracker anywhere?


And this warning, what is this? This warning seems to be new now.

LogDirectoryWatcher:Warning: Failed to begin reading directory changes for …/…/…/Engine/Plugins/Experimental/CharacterAI/Content/. Error: 0


P.S. I had to post this as an answer because comments are not allowed to have this many characters and I also had this crash when changing the variable type (trying enough times eventually got me through it without a crash):

It just makes me… slightly mad as you might imagine… I fix or work myself around one bug, I create 2 new bugs. I’m so tired of having to debug your engine more than debugging my own project.

Note that my solution to re-assign each Struct_Inventory-variable manually again (and I also replaced EVERY single node that uses that variable just in case), also suddenly fixed the bug where the engine puts default-values into my variable… So now when I assign a value to my variable, it actually keeps that value instead of resetting it to the default… So I fixed 2-sideeffects with one workaround.

I was attempting to solve this possible bug:

I then started to change something in the UMG. I noticed that the editor wouldn’t allow me to place an image onto the UMG. Obviously the editor was bugging out again. So guess what I did? I thought to be smart and copy-pasted an existing image box in the UMG. And the moment I pressed “paste” it crashed (of course, I should have known)

After restart I got this:

Oh man… In 3 hours time, I worked ~2 hours on this project and encountered so many bugs (circular compile, resetting my default values, several weird warnings, 2 crashes, 2 bugs in the UMG, 1 massive bug after restart (struct change).
6+ BUGS in 2 hours!

Can some Epic employee please contact me? This is getting out of hand. Your engine either bugs like no tomorrow or I am just an idiot. I would prefer a remote-desktop session to that you can show me what I’m doing wrong. And if not, then please look at the huge amount of engine-bugs in my project…
I have a super tiny project, nothing complicated, no multiplayer nothing. But so extremely and extremely filled with bugs coming from your engine.

I also managed to reproduce the UMG bug on video. But I’m not gonna upload it, I want some serious help this time…

Hello ,

As I said before we need to come at these issues one at a time. How about we start with the issue in UMG that you spoke of. I see that you said that you have the steps to reproduce this issue. Could you provide a detailed list of the steps you have taken to reproduce it?

I don’t know why it won’t let me put new components on the UMG. But when I try to work around this by using the copy-paste instead, I get a 100% guaranteed engine crash.

Also in my previous answer I listed multiple bugs and warnings that I do not understand. On of them being a really painful bug that when I modify my struct (add a variable) and then restart the engine I get wire-trace warnings and the next time I restart I even get compiler errors and broken links to all of those variables that use that struct. But I can not reproduce it outside of this project. But I ONLY add a variable to the struct, save all, then restart the engine twice and half my project breaks and compiler warnings all over the place.

Also I have no answers to my previous questions from the “answer-post” I made above.

Hello ,

After watching your video I understand what the issue is. Images cannot hold other widgets. Try making your image widget smaller and places things off to the side where the image is not present. This should allow you to then add more widgets to your designer tab. If you would then like to have them placed over the image you could set the zorder after placement. Copying and pasting a widget into the image is forcing it to accept a child (which it is not designed to do) I hope this helps.

As you can see here in the video that you have submitted. The tool tip informs the user that this widget cannot hold children.