The bug appeared after fa3eeb65bce6779cd97c62fdcd07eae1552dd64d, but I don't see any problems there...
Reproduce:
Launch nfEngineTest.
Switch to Sponza scene (press "2")
Wait until everything loads.
Exit.
It will crash here:
nfCommon.dll!_InterlockedExchangeAdd64_ASM(volatile __int64 * _Tgt, int64 _Value) Line 120 C++
nfCommon.dll!std::atomic_ullong::operator++(int formal) Line 1216 C++
nfCommon.dll!NFE::Common::ThreadPool::Enqueue(std::function<void cdecl(unsigned int,unsigned int)> function, unsigned int instances, const std::vector<unsigned int64,std::allocator > & dependencies, unsigned int required) Line 185 C++
nfCore.dll!NFE::Resource::ResManager::UnloadResource(NFE::Resource::ResourceBase * pResource) Line 208 C++
nfCore.dll!NFE::Resource::Material::OnUnload() Line 213 C++
nfCore.dll!NFE::Resource::ResourceBase::Unload() Line 185 C++
[External Code]
nfCommon.dll!NFE::Common::ThreadPool::SchedulerCallback(NFE::Common::WorkerThread * thread) Line 132 C++
[External Code]
[Frames below may be incorrect and/or missing, no symbols loaded for msvcr120.dll]
The bug appeared after fa3eeb65bce6779cd97c62fdcd07eae1552dd64d, but I don't see any problems there...
Reproduce:
It will crash here: