x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Blueprint can't be compiled, very strange behavior

I have very strange behavior in one of my blueprints, which I even didn't touch last days. It shows me this warning. alt text

I didn't change its parent and its childs, child components. Everything was working, until I realized that something went wrong. Yes, it replaced Begin play and Tick with those custom events. I don't realize why. I have no more details, but if it is necessary I can provide it, just tell me what.

Product Version: UE 4.14
Tags:
1.png (89.9 kB)
more ▼

asked Jan 27 '17 at 04:46 AM in Blueprint Scripting

avatar image

Erumaru
630 12 14 52

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

5 answers: sort voted first

Try check if there are circular references, it seems UE4 cannot handle circular reference with Macro Library involved correctly.

more ▼

answered Apr 20 '17 at 08:21 AM

avatar image

hillin
81 2 5 11

avatar image Erumaru Apr 22 '17 at 06:37 PM

"it seems UE4 cannot handle circular reference with Macro Library involved correctly." Is it just a guess or u have faced something similar? Can u please explain ur point more precisely? We have already fixed that problem, but still it is very interesting question for which we have no answer. Moreover, ur answer might come to someone as a treatment.

avatar image hillin Apr 24 '17 at 04:35 AM

Yes @Erumaru, we've encountered a similar issue in our project, however I'm not sure if it is the same problem we've both faced. The issue is quite complex, I'll try to explain it with a minimal case.

Let's say you have the following blueprint classes:

  • abstract class Weapon inherits Actor

  • class Sword inherits Weapon

  • class MyCharacter inherits Character

In MyCharacter, there is a variable of type Weapon; while in Weapon, a macro blueprint library, MBL, is used, in which there is a macro with MyCharacter involved (e.g. a GetHitCharacter macro which accepts a HitResult structure and simply casts the hit actor to a MyCharacter instance). A circular reference is therefore formed.

If you assign Sword to the Weapon variable in a Character, the issue could raise when compiling blueprints. UE4 blueprint compilation is consisted of 3 stages: skeleton, full and bytecode(ignore this one because it has nothing to do with our problem). Because of the existing of the skeleton stage, circular references could be handled correctly in most cases, however this is not true if macro library acts as a part of the reference chain. It requires the classes used within it to be fully compiled. Let's take a look at the compilation process in our example:

  1. Compile Sword in skeleton stage

  2. Because Sword is a subclass of Weapon, compile Weapon in skeleton stage first (stack push)

  3. Weapon uses MBL, compile MBL first (stack push)

  4. MBL uses MyCharacter, compile it FULLY (stack push)

  5. MyCharacter uses Weapon, compile it FULLY

  6. When fully compiling Weapon, a skeleton compilation is already taking in place (see step 2), so it's SKIPPED. However Weapon is still fully compiled

  7. when the stack is popped to step 2, we are back to the skeleton compilation of Weapon. However Weapon is ALREADY FULLY COMPILED, so it seems there is no need to do it again. Therefore, the skeleton class of Weapon is left EMPTY, and will be FALLBACK to Actor.

avatar image hillin Apr 24 '17 at 04:39 AM

This is the cause of our problem, maybe yours as well. The explanation is base on my memory so it might not be very accurate, but I hope it can help you to grab the idea. It should be addressed as a bug by the Epic guys, but I don't have time to get on this problem and create a reproduce-able environment recently :(

avatar image Erumaru Apr 25 '17 at 10:42 AM

This is very close to what we have experienced. Thank you for explanation, I hope it will be useful for someone.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

You can't copy the the original Begin Play and Tick Event so it will create a new custom event automatically. Can it be that you've copied the Event Begin Play?

Otherwise try and select all Blureprint Actions, right click and Refresh Nodes.

more ▼

answered Jan 27 '17 at 07:50 AM

avatar image

Alltvin
416 9 7 27

avatar image dexkz Jan 27 '17 at 08:44 AM

More likely K2 Linker does not obtain the link to the parent when compiling this blueprint on launch, and somehow does not make editor to crash.

avatar image Xanadron Apr 24 '17 at 11:32 AM

this should be the answer

avatar image Erumaru Apr 25 '17 at 10:40 AM

Didn't help me, why it should?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

There is some kind of conflict somewhere in your program. Right click and write the original name, the one that conflicted. Then you will be sent to the node that it is conflicting with.

To fix it you just have to change the name of the event and update the calls.

HTH

more ▼

answered Jan 27 '17 at 05:25 AM

avatar image

NoobsDeSroobs
2.7k 107 35 180

avatar image Erumaru Jan 27 '17 at 06:38 AM

lol, I missclicked and deleted first reply. I understand you, but why it works when we delete other blueprint? In addition, I replaced all of those nodes, then it starts to work, but when I restart project problem comes back.

avatar image Erumaru Jan 27 '17 at 06:59 AM

Is it possible to update all references of some class or even project at all?

avatar image NoobsDeSroobs Jan 27 '17 at 07:03 AM

Try the FixUpRedirects in the project conttent browser. The only other thing I can think of is redownloading the source code into a clean directory and then rebuilding.

If that does not help I can not help you further and I hoope someone who can shows up.

avatar image Erumaru Jan 27 '17 at 07:18 AM

FixUpRedirects does nothing

avatar image Erumaru Jan 27 '17 at 08:07 AM

Redownloading source code also useless, any other suggestions? We are trying to remove some blueprints or replace them with new one, then we check whether it works or not, should we change direction? Did you face something similar to our problem?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

So basically after a ton of experiments its clarified that the issue is caused by reference from other blueprint.alt text

The issue reappears if I switch MOBAVRPawn to any other child of VRPawn. alt text alt text

There is also a critical error that appers in the log.

After recreating begin play and event tick nodes it compiles like there are no issues at all, but after reopening the editor problem reoccurs.

screen.png (485.8 kB)
screen2.png (53.2 kB)
screen3.png (550.2 kB)
errorlog.txt (64.8 kB)
more ▼

answered Jan 27 '17 at 08:12 AM

avatar image

dexkz
127 2 5 11

avatar image Erumaru Jan 27 '17 at 08:18 AM

To avoid a confusion, we are working on the same project.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Ok, after unreal struggle the only working solution was to create a new pawn, and to recreate all of its functionality. Apparently deletion of VRPawn led to crash, so we had to manually re-tether all pins to new class and then delete corrupted asset. Alternative options we tried: Created a new child of VRPawn, and reparented MOBAVRPawn to it. (Caused a crash) Moved to last valid version of project using version control and tried to recreate all changes. (At some point changes in random assets caused this issue to appear) Possible reasons of this problem to occur and what we've tried to fix it: 1. We found one asset that was incorrectly imported. 2. Both VRPawn and Tower had multiple redirectors, its possible that one of them was corrupted. But note that fixing up redirectors made no effect. Also their redirectors did not delete after fixing up (Editor showed message that redirectors preventing those assets from removal). 3. Tried converting project to CPP and launched engine with a debugger. It did not unveil nothing new since we have no team members who are experienced in debugging K2 linker. 4. Tried duplicating VRPawn and reparenting MOBAVRPawn to copy. Before replacing references it behaves as intended, after changes the issues reappear. 5. Tried deleting nodes from Tower, that were referencing MOBAVRPawn. To our surprise it did fix the issue in one of the commits (6 away from top), but not at the latest.

more ▼

answered Jan 27 '17 at 02:15 PM

avatar image

dexkz
127 2 5 11

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question