this mod uses the dumbest method to temporarily stop the crash happening. its a payday2 engine side issue,we cant do much about it,but at least we can add a pcall to it and hope to reduce the probability of occurrence.
more test and feedback is needed
more detailed technical information for modders: https://github.com/steam-test1/Payday-2-LuaJit-Source-With-Line-Numbers-Continued/blob/master/core/lib/setups/coresetup.lua#L472 at function CoreSetup:end_frame(t, dt) in file core/lib/setups/coresetup.lua game will call fuction World:unload_all_units() and somehow its failed i have no idea whats wrong in engine,i hope someone can fix it