I tried to update my project to 4.8 and I have been getting a lot of bugs many of which cannot be easily understood since the Crash reporter conveniently omits the parts that matter the most. It seems that the troubles are linked to my Game Mode class. The class is in C++ with a BP instance used for easy modifications. Whenever I try to edit the BP I get a crash on Serialize(). The only changes I made was to add _Implementation to 2 functions that were being overridden. Besides that nothing else has changed. Yet, launching the game is now impossible. Also, for some reason when attempting to load my character, an endless loop happens that calls its constructor indefinitely. Again, it’s linked to Serialize(). I would post logs but I don’t think they would be of any use without seeing the structure of the classes.
My GameMode class is modified as well and derived from blueprints. At first, I only overwrote beginplay. I recently have overwritten a few other functions. In my project, the map and everything loads fine. As soon as I open any blueprint, the game crashes.Mine does the exact same thing and throws a serialize error anytime I open a blueprint. Downgrading back to 4.7.6, I can immediately open any blueprint that was crashing on 4.8.
Edit: The other odd thing is that I only recently implemented my custom game mode (derived my class from it). My crashes were occurring before it was called. Was there anything you changed that allows your game to work correctly on 4.8?
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.8\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 678]
Array index out of bounds: 11 from an array of size 11
That’s about the only thing that i am noticing. This occurs right before the Serialze() problem.
Could you please provide some additional information to help me reproduce this issue?
Are you using the Binary version of the Engine, or did you build the Engine from source code?
Would it be possible to see the code for your GameMode class?
What specific changes, if any, did you make to your class when upgrading to 4.8?
Does this crash occur while you are editing the GameMode Blueprint, or when actually launching the game? Do you also see the crash in a packaged version of the game?
Would you be able to provide more information with regards to what class you created, and what changes you made to it before performing a hot reload and seeing this crash occur?
I’m having this same issue with just a few items in my project though. One is a blueprint actor that is used heavily and needs to be worked in a lot so really need to get it working in 4.8. Also the level that contains that blueprint can’t be opened or it will also crash the engine
I found this post from following nossr50. Attached a copy of my dump. link text
Would you be able to upload the .uasset file for the Blueprint that is giving you trouble? Are you able to open this Blueprint at all in the Editor? Does the Blueprint derive from a custom code class? If so, could you also include the code for that class?
I don’t have the project with me currently, but I did figure out what was causing the engine to crash. I’m attaching a screenshot of what my issue is that I created real quick. And some steps below to reproduce.
Steps to reproduce:
Create Game Instance
Make a Random Stream Variable inside the Game Instance
Set your Newly made Game Instance your projects Game instance
Create a new BP called “BP” (can be anything just saying BP for reference in rest of steps.)
Inside of BP make a Random Stream Variable
Inside Construction Script “Get Game Instance” and “cast to your game instance”
Drag off cast pin to promote it to a variable
Get your promoted Cast variable and drag off it and get your Random Stream variable from Game Instance
Set your BP Random Stream to be your Random Stream From your Game Instance.
On cast fail drag it to set the BP’s Game Instance.
Compile and Engine will crash.
To answer your other questions, I’m unable to open the blueprint as it was. I got around this by unhooking The Construction Pin, Event Begin Play, and Event Tick pins from my blueprint in 4.7.6 then moving it into my 4.8 project then opening it up. Then stepping through until I found the issue. (thankfully it was pretty early on.)
It was not from a custom code class.
If people know which bp’s are causing issues I recommend also unhooking things in an earlier version of the engine then finding out what it is like I did. Of course if they’re issue is the same, it should work.
Also to note this happened using a Random Stream for this. When I tried integers or booleans it didn’t cause it to crash. So not sure if any other variables will cause this issue.
Thank you for providing the repro steps that you listed. Using those, and the screenshot, I was able to reproduce your crash. I have submitted a report of my findings to have this investigated further (UE-17541).
Unfortunately, the more I look into all of the Serialize() crashes that have been reported, the more I am convinced that they are actually (mostly) different crashes. I still need to get some more information from @, @walk12288, and @anonymous_user_87222136 in order to try to figure out their crashes.
I’m sorry but apparently my reply wasn’t posted. About the crash I originally posted about, as far as I could tell, it was something related to my bots, at least that what I saw with the debugger. Eventually the bug disappeared on its own without me doing anything which is pretty strange as well. The last issue I had was related to LoadGame in UGameplayStatics. It had the nasty side effect of locking my entire machine for some reason. My guess is that 4.7 save games don’t play along with 4.8. By deleting the save game file and letting the engine create a new one the problem was gone.
Ultimately I decided to remake the project from scratch. It had started with version 4.6 so I decided it was a good time to start fresh. I’m sorry that I cannot provide further assistance.
No problem, we do sometimes have replies go missing on Answerhub. I am glad to hear that things appear to be working fine for you now. I will see if I can look into the save game issue that you described, though.
I’m also getting the crash whenever I create a code class in my project (currently running stock 4.8.1), here’s the first line of the crash log:
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.8\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 678]
Array index out of bounds: -1 from an array of size 0
Sorry for the delayed response. Do you still see this happening in 4.8.2?
When you say you are using “stock 4.8.1” do you mean that you are using the binary version installed by the Launcher, or that you built the Engine from source code without making any changes to the source code? Is this only occurring in your own project (if you make a new project, does it work fine?)? At what point does the crash occur (immediately after clicking the Create Class button, at some point before Visual Studio opens, after Visual Studio has opened)? Is the new code class successfully added to the project?
We haven’t heard back from you for a few days. Do you still need help with this issue? I will be marking this issue as resolved for internal tracking purposes, but please feel free to add a comment if you still need assistance.
I didn’t end up seeing your response to this question, but here we are again!
I have not been able to resolve this issue in any version of 4.9 nor the newest 4.10 update. Attached is my most recent crashlog when I try to create a new C++ from within the UE4 editor. The class is successfully created but the engine crashes during code compilation. Any suggestions you might have would be greatly appreciated. link text