[BUG REPORT] UE4 Dedicated server freezes

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.