[BUG REPORT] UE4 Dedicated server freezes

I launched dedicated server and got it freezed. This also reproduces via editor. No any logs. Just infinite loop.

So. I attached studio to server and clicked pause and falls into strange code Set.h.

It’s TSet source code and it’s very wrong judging by this:

Isn’t it because NextElementId never changes and is always valid ? Because it looks like if you dont enter in your if, your NextElementId is never changed. Maybe try breaking on this line and compare the adress of this var to see if it evolves in your loop or if it doesnt change.

Looks like the set has been corrupted. Try running with MALLOC_STOMP or MALLOC_VERIFY enabled to track your memory usage (warning: these are slow).

However, the ? over the Invalid entry is quite normal - TSets’ backing storage is a sparse array, which can have ‘holes’ in it - unfortunately, the debugger visualisers are unable to skip indices which contain holes, so they appear as Invalid.

Steve