I’m trying to implement a new
UObject type for use in a custom component, and running into issues when duplicating. My component implements
GetLifetimeReplicatedProps and marks the
DOREPLIFETIME, which fixed an issue I had with crashes on exiting play mode, but did not address crashes when duplicating.
I’m guessing that I have to implement some additional code to support instancing, but I’m not sure that that is the problem in this case.
Console logs say:
First-chance exception at 0x00007FFD564A53EA (UE4Editor-CoreUObject.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF. Unhandled exception at 0x00007FFD564A53EA (UE4Editor-CoreUObject.dll) in UE4Editor.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.
And VS points me to
I’m still quite new to Unreal development, so please let me know if I’m missing information that would be helpful in debugging.
Edit: As a followup question, is UObject even the right way to go? Previously I had stored data in a struct declared in the Component header, which seemed to work well. However, I just assumed that I would need to wrap data that could be instanced and modified in a UObject that is referenced by my component. Is that correct?