[4.9.0] - Undo In Certain Case Causes Crash

Hey ,

It was an odd case so if it does happen again, I’ll be sure to let you know. It is pretty rare thankfully but wish I had some more information.

The only other thing I can think of is it might have been possible when I did this, that the Actor may have been referenced in the level at the time by another Actor. I may have been presented the dialog to replace references and its possible some redirector underneath the covers was unaccounted for possibly.

The second I do happen to see this again, I’ll be sure to immediately let you know and attempt to reproduce it if I can hopefully do so. Let me know of course if you do have any progress but in the meantime, one thing that could avoid it is changing the following…

1. FArchive& operator<<( class UObject*& Res ) override
2.             {
3.                 int32 ObjectIndex = 0;
4.                 (FArchive&)*this << ObjectIndex;
5.                 Res = ReferencedObjects[ObjectIndex].GetObject();
6.                 return *this;
7.             }

To this… Note: I have no idea how this would affect the chain so this might not work properly but its a thought :slight_smile:

1. FArchive& operator<<( class UObject*& Res ) override
2.             {
3.                 int32 ObjectIndex = 0;
4.                 (FArchive&)*this << ObjectIndex;
5.                 Res = ReferencedObjects.LastIndex() < ObjectIndex ? nullptr : ReferencedObjects[ObjectIndex].GetObject();
6.                 return *this;
7.             }

Anyways, keep me posted and have a great day !