we have a crash about truesky_queries.
i wonder if the truesky_queries is thread safe.
According to the source, truesky_queries are being accessed simultaneously by RenderThread and MainThread.
in RenderThread
//TrueSkyPlugin.cpp -> RenderFrame(
if(StaticProcessQueries)
{
for(auto &q:truesky_queries)
{
StaticProcessQueries(1,&q.Value);
}
}
and in MainThread
//TrueSkySequenceActor.cpp => GetFloatPropertyAtPosition,CleanQueries,etc…
for(auto q:truesky_queries)
{
if(GFrameNumber-q.Value.LastFrame>100)
{
truesky_queries.Remove(q.Key);
break;
}
}
I wonder if the crash was caused by a non-threadsafe issue.