Replay Recording crash when doing Multicast replication taking in array

My replay recording has been crashing and I have tracked it down to this exact cause.

Note these reproduction step :

  • Multicast ( reliable ) event in Component
  • Need to bring in array of integer.
  • Need to be recording the replay when this function is being called,
  • Mysteriously though, this crash doesn’t happen if launched as standalone from editor. But if launched using commadline (using “-game” ) it will crash. I believe it will also crash with packaged game similarly.

Crash give me assert error with these code:

Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\Build\++UE4+Release-4.13+Compile\Sync\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 833] 
Array index out of bounds: 2 from an array of size 2

I suspect it had to do with the loop using the wrong index.

Hey Frozenfire,

This Assertion is because your array (ButtonID) is out of range. Make sure that when you are removing something from the array that it exists before doing so.

Thank you for submitting a bug report, however at this time we believe that the issue you are describing is not actually a bug with the Unreal Engine, and so we are not able to take any further action on this. If you still believe this may be a bug, please provide steps for us to reproduce the issue, and we will continue our investigation.

Hi , this is definitely not the case( out of range ), it crashes the moment the function is being called. I guess my screenshot is a bit misleading. I even deleted all the notes after the event. None of the node after the event matters. as long as it passes in an array it crashes at the replay.

If you are getting:

Assertion failed: (Index >= 0) & (Index < ArrayNum)

It is literally the meaning of an array out of range.

This is further verified by the secondary bit of the error:

Array index out of bounds

I understand it is caused by array going out of index. But what i’m saying is , it’s nothing to do with my array (that array you are seeing ). It’s an array in the replay system. because it’s only happening during replay recording.

Button ID array is not being used at all. As you can see i’m passing it literally a single index array.

I would try to track this further but the log file gets cut off mid-sentence everytime it crash.

Here’s the full crash log.[link text][1]

Hey Frozenfire,

Can you give me steps to reproduce the issue you’re seeing? Please include steps to recreate the whole setup that will replicate what you are seeing.

(Thanks for the logs but they aren’t enough to see whats going on)


Apologies as I’m unable to reproduce this on several attempt.
I started a new project and tried to copy the entire setup but the crash didn’t happen.

However the crashes are still happening on the main project when that multi-cast event is fired. New event that brings in integer array will also consistently crashes it.

I might try this on C++ and debug this further on . I will provide update to this thread if i do manage to find anything that is more useful.