Blueprints keep corrupting

Hi,

over the past weeks I had various cases of variables corrupting Blueprints and Widget Blueprints. This had happened on different Projects with UE 4.8 and UE 4.10.

The way of corruption:
Creat a Variable, Save, Compile, reference the Variable within other Blueprints, Playtest → Everything fine!

Restart the Editor, “Failed import for object property”, Playtest → Accessed none.

Sometimes a simple renaming of the variable solved the Problem, but mostly I had to delete all Blueprints that referenced this variable in anyway to get rid of the Errors. Deleting and recreating new Variables doesn’t help as well. In one case I had a similar Variable (Vertical Box named “SysMessage”) corrupted in 2 independent projects one in 4.8 and the other in 4.10. At 4.8 a simple renaming fixed it, the 4.10 case is still unsolved.

Are there any ways to prevent this? Are there other ways to fix it beside recreating the entire Blueprints (this often costs several hours)?

Hi AlexW88,

  • What type of variable does this occur with? Is it a general error that occurs with any variable or is it limited to a specific type or types of variables?
  • Is it only occurring in specific blueprint types or have you repro’d this in multiple blueprints?
  • How are you accessing the variable between various blueprints?
  • I had it with Bools, Ints, floats and
    UMG Widgets e.g. vertical box
  • I had it within Playerstate,
    Character BPs, Gamestate, Gamemode, UMG and
    general Actors I think
  • Usually I spawn/create an Instance of
    the Class within some BP e.g.
    Character, Store the Instance as a
    Variable on the Character. Then from
    another BP I cast to the Character,
    get the Instance and then get a
    Variable from the Instance.

The only incidence I see with corrupted variables is that I think the casting process often includes a Player controller. Edit: Actually in all of the cases I remember I had a reference to the bugged variable within the Gamemode.

Looks like circular references that are posted as being broken all the time. Long story short - you’ll have to either move it all to code, get rid of the references that cause the loop or drop it all and do differently the second time, with circular references in mind. That is obviously assuming, that this is your problem.

vipeout actually brought up my next question. Are there any circular references/dependencies within your blueprints? These can cause a number of issues similar to what you are seeing. If there is a circular reference, try seeing if there is a way to break the dependency and if this fixes the error.

Hmm, I’m not really experienced on that field, I don’t think so, but let’s assume it was a circular Issue:

  • Why would renaming the variable fix
    it sometimes?
  • Why would recreating the same
    Blueprints with the exact same logic
    as before fix it?

Also, I’m using UE4 since 4.6 but that kind of issue just poped up in the recent weeks. If I think about what I’m doing different the only thing that comes to my mind is the extensive use of classes like the Gamemode and state.

The most recent case is within a Project, I have worked on for about 4 days. Everything that is happening there:

  • Character create Widget BP, attach to viewport and store
    in Var
  • Gamemode cast to Character, get
    stored var, get Variable from the
    Widget, create a different Widget
    that is not referenced anywhere else,
    attach to the Characters Widget. Now that last step fails cause the Variable(vertical box) of the characters widget returns 0.

Does renaming the variable keep it fixed permanently or does it simply fix it until you close and re-open the editor again? Typically circular references either have errors immediately or upon re-open.

Do you have a sample project I could take a look at that is experiencing this error? Perhaps I could take a look and see what exactly is occurring.

Yes, sometimes renaming fixed it permanently (just reconfirmed it).

I can send you the latest Project, I have renamed and deleted the variable a few times there but it’s still bugged. It has also auto saves before corruption. I’ll send you a link to the proj via forum PM.

Where did you delete the variable from? I see the error you are seeing, but I am trying to determine if this error is a bug or if I can find the specific cause.

Originally I made a “SysMessage” Vertical Box variable. When I noticed the Issue after restarting I renamed the variable to something else. As the error persisted after a restart I delete the variable (vertical box) from the widgetBP, and the references within gamemode (so blueprint wise the variables and all the references to it were erased). I believe I then restarted again, recreated a vertical box variable (the one that is currently present), and also recreated the references within Gamemode.

I also included all the backups and autosaves of the widget and gamemode blueprint, that contains the variable at it’s various bug states.

Hi AlexW88,

It looks like the error is occurring due to the filepath not updating, once you rename the asset it resets the filepath being called and should work. I have entered a bug report, UE-25632, to be assessed by the development staff.