-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GMOD] PostCollision / PhysCollisionScreenShake cause server crash #51
Comments
Thanks, I think I know the cause. Can't believe I didn't catch this. I am adding to When the vector grows, A custom copy + move constructor needs to be implemented into the |
(I won't have time to implement this tonight, so feel free to try it out yourself + PR and get the free GitHub points, otherwise I will fix it tomorrow). |
Actually, I'll do it now... I lied. |
That is fastest issue response I've seen, heh, thank you! Btw, I had an another issue with ->
There are some STL/SDL (not remember) checks that asserting on assignment of m_CachedObjects[ i ] to smth, I did a small replacement locally to m_CachedObjects.insert(m_CachedObjects.begin() + i, reinterpret_cast<IPhysicsObject*>(pBody->GetUserData())); and it works like a charm.
|
Needs this to match the parent structure, not some other object that may be going to be destroyed. Closes: #51
Can you try #52 and see if that fixes it for you? |
Sure, let me try. |
Just looked, it should be resize and not reserve haha. I'll do a PR for that too. |
#53 tada |
Thanks for the clear issue, some ez wins before bed :-) |
Hehe, no problem, I can confirm that #52 fixes my issue, no crash so far. |
Needs this to match the parent structure, not some other object that may be going to be destroyed. Closes: #51
Not sure it supposed to be working with Garry's Mod, but in case if anyone know how this could be fixed, I'll post some details of my issue here.
So I just created one cube and used stacker against it, once boxes fall and collide - crash is happened, I dive a bit deep into the problem and found that crash is caused by
PhysCollisionScreenShake
(game\server\physics.cpp) atpEvent->pInternalData->GetContactPoint( vecPos );
.As you can see in the debugger,pInternalData
of the event is an invalid pointer:UDP: Nvm, this is an VTable ptr, the data is seems to be at least non-nullptr:
The call-stack is the following:
Crashes in
PhysCollisionScreenShake
:at 57241A20
(*(void (__thiscall **)(_DWORD, float *))(**(_DWORD **)(a4 + 28) + 4))(*(_DWORD *)(a4 + 28), vecPos);
which is probablypEvent->pInternalData->GetContactPoint( vecPos );
, so it's trying to callGetContactPoint
againstnullptr
.Any ideas?
P.S. Manual windows build of VPhysics-Jolt@
347e78d
using SSDK-2013@0d8dcee
, VS2022 (target for module isx32-Debug
).The text was updated successfully, but these errors were encountered: