Ah, you didn't specify the order in which I have to press the keys in the last post, nor what the expected output is. I'll try with your new instructions.
[UE4 Crash] uEntry name out of range
You modified SpineSkeletonAnimationComponent, namely the callback()
function, or you are using an oudated spine-ue4 version from the 4.0 branch. This is what lines 65-67 should look like:
uEntry->AnimationDispose.Broadcast(uEntry);
uEntry->SetTrackEntry(nullptr);
component->GCTrackEntry(uEntry);
You are calling component->GetCurrent()
instead, which is wrong, and causes the output after pressing C to print false.
I don't know if you only changed that in the repro project you or in your crashing full project as well. Please change it back to what it was and try if you can repro the crash in your big project.
OK I will try that right now
Now I change the code to this:
void callback(AnimationState *state, spine::EventType type, TrackEntry *entry, Event *event)
{
USpineSkeletonAnimationComponent *component = (USpineSkeletonAnimationComponent *) state->getRendererObject();
int TrackIndex = entry->getTrackIndex();
if (entry->getRendererObject())
{
UTrackEntry *uEntry = (UTrackEntry *) entry->getRendererObject();
......
else if (type == EventType_Dispose)
{
component->AnimationDispose.Broadcast(TrackIndex);
uEntry->SetTrackEntry(nullptr);
component->GCTrackEntry(uEntry);
}
}
}
And this did solve the problem Two: "Track Two Entry Invalid after I SetAnimation on Track Two"
I still won't let the uEntry do the broadcast. Current this version should work for my project (althogh the problem One is not located). Thanks for the help!!
Today I find our project DID NOT Add SpinePlugin to our Build.cs file. Thus I think "Name Out Of Range" problem is most likely a performance issue. So if the whole game is eating too much memory, or generating too much cache while looping, or has memory leaking, this problem occurs.
Sorry for reporting this, and thanks for your patience!