Affects Version/s: 1.16.201 Hotfix
Fix Version/s: None
Environment:Debian GNU/Linux 10 (buster), glibc version 2.28-10, Linux kernel 4.19.0-13-amd64
1. Stand at the position 1695 36 -953 and wait (in the world here).
2. Game Crashes.
The following crash log was produced on the server:
From what I have discovered, this bug is caused by locking a weak_ptr from the POIInstance list (std::vector<std::weak_ptr<POIInstance>>). When reading from the vector using , a null value is returned, which ultimately gets dereferenced and causes a crash. To be exact, the address+8 is dereferenced, which to my knowledge is the offset for the reference count of a smart pointer.
I can also see that right after locking the weak_ptr, there is some kind of null check (not sure if its for the same pointer though, I think not).
I propose the following: before locking the weak_ptr, check if it is nullptr. If not, then you can lock it. I don't know why any of the POIInstances should ever be nullpointers, but simply checking for this could solve the issue.