After updating source from 4.10 to 4.11, I’ve been having crashes involving the BP for my character. Whenever I try to compile my character, Unreal 4 cashes without an Unreal 4 crash prompt.
[2016.01.14-21.48.11:270][926]LogWindows:Error: === Critical error: ===
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:C:\UnrealEngine\UnrealEngine\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 785]
Array index out of bounds: 0 from an array of size 0
That is the error that occurs, but this error was not occurring prior to 4.11, and I changed nothing in code. I can launch the game without it crashing. This crash only occurs when I try to compile the character BP.
So, I deleted an event from the event graph, and that solved the problem. I created a new one with the same name. Crashed. I created a new one with a different name. No crash as of yet. I’m not sure what happened, but I’ll keep this post updated if the bug reappears or simply doesn’t.
Now it is throwing a new error:
[2016.01.15-04.17.26:392][ 64]LogWindows:Error: === Critical error: ===
Fatal error: [File:C:\UnrealEngine\UnrealEngine\Engine\Source\Runtime\Engine\Private\BlueprintGeneratedClass.cpp] [Line: 131]
UBlueprintGeneratedClass::GetAuthoritativeClass: ClassGeneratedBy is null. class ‘/Engine/Transient.TRASHCLASS_SpellEffect_389’
There are a dozen or so unrecognized members of the SpellEffect blueprint. Is there a way to fix this without completely rewriting the SpellEffect BP?
Hi ,
It looks like the errors you are seeing are related to your blueprints accessing NULL values, please make sure the variables you are using are properly populated. Do you have any steps I can take to reproduce these errors on my end?
I do not know how to recreate it. It sprung up without warning in 4.11-2 preview, so I rolled back to 4.10.1 and reverted all 4.11-2 commits I had made (I backed them up before reverting them as well so if I found a full solution, I could test it once more).
Two other errors have cropped up in the log:
[2016.01.15-19.47.41:954][480]BlueprintLog: New page: Compile SpellEffect
[2016.01.15-19.47.42:988][480]LogBlueprint:Error: [compiler BP_Effect_PCAssHemorrhage] Error The current value (/Game/ArenaAssets/SpellEffects/BP_Effect_PCAssHemoStatus.BP_Effect_PCAssHemoStatus_C) of the ’ Effect to Apply ’ pin is invalid: /Game/ArenaAssets/SpellEffects/BP_Effect_PCAssHemoStatus.BP_Effect_PCAssHemoStatus_C isn’t a valid subclass of SpellEffect_C (specified on pin EffectToApply)
[2016.01.15-19.47.43:069][480]LogBlueprint:Error: [compiler BP_Effect_PCAssSnakeVenom] Error The current value (/Game/ArenaAssets/SpellEffects/BP_Effect_PCAssSnakeVenomStatus.BP_Effect_PCAssSnakeVenomStatus_C) of the ’ Effect to Apply ’ pin is invalid: /Game/ArenaAssets/SpellEffects/BP_Effect_PCAssSnakeVenomStatus.BP_Effect_PCAssSnakeVenomStatus_C isn’t a valid subclass of SpellEffect_C (specified on pin EffectToApply)
[2016.01.15-19.47.43:550][480]LogEnum:Warning: In asset ‘None’, there is an enum property of type ‘EffectsHandleFlag’ with an invalid value of ‘True’
[2016.01.15-19.47.45:156][480]LogWindows:Error: === Critical error: ===
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:C:\UnrealEngine\UnrealEngine\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 785]
Array index out of bounds: 0 from an array of size 0
The first and second errors are both errors that don’t show up in the editor itself. They reoccur every time I compiled the SpellEffect Blueprints and require those two to be recompiled, but the errors go away at that stage.
But now the SpellEffect Blueprint is throwing the array error when I attempt to compile it like my character was yesterday.
Additional info:
When I try to compile while debugging in VS2015, the first exception it hits is:
FGCReferenceInfo ReferenceInfo = TokenStream->AccessReferenceInfo(ReferenceTokenStreamIndex);
^ Within ProcessObjectArray() in FastReferenceCollector.h
If I continue, it throws a FPlatformMisc::DebugBreak() exception in FOutputDeviceWindowsError::Serialize() within WindowsPlatformOutputDevices.cpp
What changes did you make when you were in 4.11 p2? Did you have errors before making these changes? Do you have any arrays in your player character?
I didn’t make any changes in 4.11. I even rolled back the entire project to 4.10.1, discarded all changes, and then redownloaded the engine source for 4.11.2 to make the changes. Once I did that, I tried to compile, and the project crashes with that error.
Player Character has 10 arrays in it.
- 1 of the arrays stores all of the active particle effects for the player’s spell casting. It starts null and is only acted upon when it isn’t null and the player is no longer casting.
- The other 9 arrays are references to actors that are active upon the player. 2 of these arrays are only added to when a Spell Effect actor is attached to the Player Character. The other 7 are arrays that are conditionally searched.
The “Spell Effect” BP has 9 arrays in it.
- 1 array is an array of floats that has its first value put into it whenever the BP is spawned.
- 1 array is a reference to “waiting” Spell Effects. In game, this is used for effects that cannot be applied at the same time. One wait for the next. Not all Spell Effect BPs use this one, and it didn’t cause a problem pre-4.11-2 either.
- 1 array is of stat structs. The spell effect BP checks if it is empty before attempting to iterate over it.
- 1 array is of enumerations. This array simply stores whether the Spell Effect’s “phase” should spawn a BP particle effect or a raw emitter. This array is constantly of length 4 and all elements are defined.
- 1 array is of particle emitters. This one is only referenced if the previous enumeration says that the “phase” is an emitter.
- 1 array is of BP Actors. This one is only referenced if the aforementioned enumeration says that this “phase” uses a BP.
- The final 4 arrays are arrays of structs that are defined within the Unreal editor as well. They are all empty unless otherwise specified, and they are plugged into for loops directly that didn’t cause problems previously.
Can you post your crash logs and the full callstack here so I can take a look? The crash logs can be found at \Unreal Projects\PROJECTNAME\saved\logs. In addition, when you get the crash report screen and copy the callstack, please make sure to send the crash report by pressing “Send and Close” or “Send and Restart” so I can look it up in our system.
This is an attempt to compile Spell Logic (which is now throwing the TRASHCLASS error as well).
link text
This is an attempt to compile Spell Effect (which is once again throwing the TRASHCLASS error)
Spell Logic is now crashing with the TRASHCLASS error. link text. That’s different from the Spell Effect BP.
This is the log from compiling the character.link text. This is the same error that Spell Effect compilation is throwing.
Do you have any circular references within these blueprints? It is possible that the NULL value errors and the trashclass error you are seeing are related to a circular dependency. Try breaking the circular reference if you have one and see if that fixes the error. If so, please let me know where the circular reference occurred so I can try to reproduce the error on my end. Thus far I have not been able to reproduce this particular crash.
Alright, so to start, I have to mention two structs. There’s a spell info struct that stores a Spell Logic class reference. The Spell Info struct also stores references to an array of Spell Proc structs that have a Spell Effect member.
Character accesses the spell info struct and Spell Effect classes. Character accesses the struct for information about casting the spell itself (cast time, resource cost, etc.). Character access Spell Effects for UI display purposes.
Spell Effect stores the Spell Logic that triggered it, but it does not store the character information. When Spell Effect deals damage, it casts the Owner to ArenaCharacter in order to use a custom HandleDamage event.
Spell Logic contains a reference to the aforementioned Spell Info Struct. It also stores two references to ArenaCharacters (one as a homing target and the second as the OwnerPawn to avoid type-casting so much). It also stores a reference to a special Spell Effect actor type.
I made a backup of the project, and I broke all of the references in Spell Logic to Arena Character, Spell Info Struct, and Spell Effect. Spell Logic still crashes on compile.
I broke all references from Spell Effect to Spell Logic, and Spell Effect still crashes on compile.
Can you send me a copy of the project? I’ll be happy to take a look. I have not been able to reproduce this on my end.
Hi Posokohov,
We have not heard from you in several days. I am marking this as answered for tracking purposes. If you are still experiencing this error, please comment with the requested information.
Just posting to let you know that I spent the last couple days making a new copy of the project except in C++. I went back with the release of 11-p4 and tried compiling. It does not crash at all when compiling in 11-p4.