Error EXCEPTION_ACCESS_VIOLATION reading address 0xffffffffffffffff

Hi everyone,I’m new in c++,I wrote a ActorPoolSubsystem,most of times it works fine,but sometimes it crush the editor.I got the log,and here is my code,any idea to fix that,I really hope anyone can help.Greetings


If it’s in line 69, probably World is nullptr at this point. Add a check of some kind to see if it’s valid prior to trying to spawn an actor.

I tried.It’s never empty,so I‘m confused.
1111111111111111

0xffffffffffffffff may indicate the use of uninitialized pointer. Maybe SpawnActor returns nullptr?

2 Likes

Maybe is ObjectClass is null, actor is not created. Empty ObjectClass would not crash the engine, it will simply show an error/warning.
However, line 70 refers to the same actor, and it very often happens that the error points to the previous line from where the error actually is. So it’s quite possible that the actual error is in line 70 with the uninitialized actor.

I seem to have found the reason, I don’t know if it’s the real reason, but it hasn’t crashed since last night.
This seems to be caused by GC.The GC randomly cleared the reference of the Collection.
Since I added UPROPERTY() on the TMap variable, it has not crashed .
Thanks guys.
3333333

1 Like