New crashes with LY 1.22 on level loading

Hi guys,

We are having new crashes n LY 1.22 when changing levels.

It is an access violation in CThreadSafeWorkerContainer::push_back_impl.
the isue is that AZ::JobContext::GetGlobalContext(…) returned nullptr.
at line const uint32 nWorkerThreadId = GetWorkerId_threadlocal();

Here is the callstack:

DeceiveIncLauncher.exe!CThreadSafeWorkerContainer<CRenderObject *>::push_back_impl(unsigned int64 & nIndex) Line 563 C++
DeceiveIncLauncher.exe!CRenderer::EF_GetObject_Temp(int nThreadID) Line 587 C++
DeceiveIncLauncher.exe!C3DEngine::RenderSkyBox(smart_ptr pMat, const SRenderingPassInfo & passInfo) Line 2271 C++
DeceiveIncLauncher.exe!C3DEngine::RenderScene(const int nRenderFlags, const SRenderingPassInfo & passInfo) Line 1756 C++
DeceiveIncLauncher.exe!C3DEngine::RenderInternal(const int nRenderFlags, const SRenderingPassInfo & passInfo, const char * szDebugName) Line 967 C++
DeceiveIncLauncher.exe!C3DEngine::RenderWorld(const int nRenderFlags, const SRenderingPassInfo & passInfo, const char * szDebugName) Line 956 C++
DeceiveIncLauncher.exe!CSystem::Render() Line 751 C++
DeceiveIncLauncher.exe!CCryAction::PostUpdate(bool haveFocus, unsigned int updateFlags) Line 1992 C++
DeceiveIncLauncher.exe!LumberyardLauncher::Run(const LumberyardLauncher::PlatformMainInfo & mainInfo) Line 620 C++
DeceiveIncLauncher.exe!WinMain(HINSTANCE
* hInstance, HINSTANCE
_ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 153 C++
[External Code]

Any idea under what circumstances is the AZ::JobContext::GetGlobalContext returning nullptr?

Hi @SweetBanditDufour. Thanks for bringing this up. I have created ticket LY-109456 to track this issue and we will take a look into this.

Hi @SweetBanditDufour. Does this crash happen every time on your levels?

Hi @jiaweig,
No it is pretty rare that it occurs. over the last 3 weeks it occurred only twice, the last time being on the 3rd of Febuary.