UObject being deleted while in use

I have a UPathway class, derived from UObject to enable replication.
An instance is created on the client with NewObject (ConstructObject didn’t change anything) and passed via a pointer to a Server RPC call. There the UPathway instance is used to create an AStreet instance which takes a Pathway as parameter. Then, the Street is replicated to the users. The code works, but after a few seconds ( 10 - 40) I get an out of bounds assert in the UPathway class. The object has been garbage collected (?) while in use.

I had the problem a few weeks before, changed the Pathway class to not derive from UObject and be spawned by the new keyword and the error disappeared. Now, since I have to use replication, I have to derive it from UObject.

I have no idea where to start looking for this error. Do you think I messed up with replication or any suggestions what code segments I should upload? The process, where the assert happens uses 5 classes and over 20 functions, but I never call any destructor or Destroy function…

Thanks guys, really apprecciate your help!

The error also seems to disappear when I derive it from AActor instead, but that can’t be the way to do it, because UPathway is used a very lot.