Hi,
We are getting some crashes when Loading into a new level.
Basically we end up with FastGeo = 0xdddddddd
FJob::FastGeo is a raw UFastGeoContainer* pointer assigned to a memory chunk getting GC’d.
So far we seem to have a fix which essentially turns the raw pointer in a Weak Object Pointer.
Is this an issue you’ve been tracking? Can you evaluate our suggested fix?
Thanks,
David
//FastGeoAsyncRenderStateJobQueue.h
//--------------------------------------
struct FJob
{
...
bool IsValid() const { return FastGeo.IsValid(); }
...
friend inline uint32 GetTypeHash(const FJob& InJob)
{
return HashCombine(GetTypeHash(InJob.FastGeo), GetTypeHash(InJob.Type));
}
...
TWeakObjectPtr<UFastGeoContainer> FastGeo;
...
}
//FastGeoAsyncRenderStateJobQueue.cpp
//--------------------------------------
void FFastGeoAsyncRenderStateJobQueue::AddJob(const FJob& Job)
{
...
FGCScopeGuard GCGuard;// Prevent GC in this scope
check(Job.IsValid());
...
}
void FFastGeoAsyncRenderStateJobQueue::FJob::Execute() const
{
FGCScopeGuard GCGuard; // Prevent GC in this scope
if (IsValid())
{
...
}
}
void FFastGeoAsyncRenderStateJobQueue::FJob::OnPostExecute_GameThread() const
{
FGCScopeGuard GCGuard; // Prevent GC in this scope
if (IsValid())
{
...
}
}
[Attachment Removed]