So I ran into a really weird blueprint problem today. Basically what happened was, I was working on several different blueprints last night and everything was fine. I saved everything and closed the editor when I was done for the night.
This morning my friend upgraded our project to 4.1. I pulled the updated project file from our Perforce server and when I opened the project it told me there were compile errors in some of the blueprints and sure enough, upon inspection some of the blueprint pin connections were gone (Variable Hand in BotGameMode:DrawCards). I reattached them and everything compiled fine, but upon running the game, things are definitely not working the way they used to. I tried reverting the project file back to the 4.0.2 version, but then the BotGameMode blueprint wouldn’t even load in the editor (no errors, the file just doesn’t show up). Every time the project is loaded in 4.1 the same pin connections are broken (even after the connections are re-added and saved). Any thoughts on what could be causing this and/or how to get around it?
All the relevant blueprints should be attached along with the output log.
UPDATE: So, I reverted my changes and started re-adding them incrementally and was able to reproduce this bug using v4.1 only. The set of changes that seems to trigger this problem is the MoveTo Function in Robot and the call to it in BotPlayerController. After adding these the compiles start taking a long time, but once the game is running everything works fine. UNTIL I close the editor and re-open it, at which point the blueprints no longer compile.
I am the friend that upgraded the project and i was able to reproduce this with his changes on my machine, with only using 4.1. We ended up having two scenarios from which we could recreate this problem. Both involved interaction between our GameMode and PlayerController blueprints.
Thank you for the report and the provided blueprints. In attempting to reproduce your error, we actually came across a different error, both have been submitted and we are currently working on them. Thank You for your patience as we continue to work on tracking this problem down for you.
The blueprints Lambda42 provide are inherited from our C++ classes. When they are Drag and dropped into a different project it crashes because the classes do not exist. If this is preventing you guys from easily reproducing the error, we can provide a temporary perforce login and you can pull our project (it is really small).
UPDATE: Lambda42 And I worked through his changes and I implemented them slightly differently and the bug didn’t happen. The only major difference between what I did and what he did was I used a custom event to communicate to our BotGameMode as opposed to a direct function call. If anyone runs into this issue, there is a very small chance that this could be a workaround for the issue. SLIM chance though, as it is a very odd bug.
We have run into this bug in 3 situations throughout development, and while our attempts to reproduce it from an empty project have failed, it is reliably reproducible in our project (which is not all that big). Out of the 5 bugs that we have found, if this was the only one that was fixed, we would be very very happy. We will do anything to help get this fixed! (maybe even read engine source code). If a tip or lengthy post or anything that could direct us as to where this bug is, maybe we could help take a look? Once again, we have a perforce server where one could login, and SEE the backed out changeset which is a before/after changeset for easy reproducing.
There was a change that updated all array noes like “get” and “add” between 4.0 and 4.1. Try replacing all of these nodes as well as re-connecting your blueprints. This may, and I do stress may, fix this issue for you.
I upgraded our project to 4.2 and per your suggestion, went through and removed and replaced all nodes referencing arrays. As you guessed, this did NOT fix the issue. I was able to reproduce the issue a 4th time. I am however seeing some new behavior which may just be because of the 4.2 upgrade, but I thought might be interesting. After reproducing the problem I cannot open the BotGameMode blueprint in the editor - the editor immediately crashes (I submitted the crash report). All the other blueprints seem to open fine (even others such as BotPlayerHud which have detached pins). Interestingly, I can diff BotGameMode against our Perforce depot no problem. I can see all the graphs and the changes I made (and the disconnected pins).
This crash may be a result in changes made to the header class structuring in the engine’s base code during 4.2. Shooter Game Template will also not work correctly and will crash when convert-in-place is used, however downloading the new 4.2 version of the template will work correctly. Unfortunately, I have still not been able to track down this problem to its root cause other than to say that it is somewhere in your project’s C++ code and how it interacts with the blueprint array setups. We have never been able to reproduce this error in house without using your project’s coding.
To really find the root cause you will have to do a slow Triage style test of the project one step at a time. As you and the programmer are rebuilding each section from scratch (copy and paste is your friend) or even tearing it apart piece by piece, you will need to test the functionality of each step and asset. Its a painful process but it will find the root cause of the bug.
We will try and triage our latest way of reproducing it and see if we can wind it down to a single action. What makes it so confusing is that files that end up getting affected are not part of the change set. Which of course prolly has something to do with dependencies and references. We have pretty much 0 code in our c++ classes, they are there once we get the prototype running. So it should be rather easy to triage. (fingers crossed).
Also, I just sent in a crash report with the following after our latest triage and report. we managed to get it to fail with a single action, lambda will give details in a moment. here is the callstack of the crash, with an assertion fail, file, and line number.
!Id:e3e2d6015df4f61fa403e4b334cf8633
Unknown exception - code 00000001 (first/second chance not available)
Eric,
I FTP’ed another set of files: BotBattleWorking.zip and BotBattleBroken.zip.
The change that I made between these two versions (Working->Broken) is:
Add a function to BotPlayerController blueprint (name is unimportant)
Add a SpawnActorFromClass node to this function (and connect execution pin)
Set the class to BP_Deck
Attach a default MakeTransform node
Note that this function is not called anywhere
Note that the game compiles fine and can be played in the editor
Close the editor (saving all files)
Re-open the project
Note that BotGameMode and BotPlayerHUD no longer compile
This is the simplest change so far that I have identified as causing this problem.
Ok so I see how you are creating the problem, but unfortunately I still am unable to reproduce this crash with anything but your original project. Can you reproduce this issue in a Blueprint only project or a Blank C++ project with NO added code at all? If not, start adding your classes back in one at a time until the error reproduces.
The crash log is telling us that you have an issue with a Variable Scope and my guess would be a variable referenced in those arrays and called or created in Gamemode.