Closed RaphaelIT7 closed 3 months ago
Let's come back to this after 0.20, do you have a repro case?
I'll can get one in a few hours
Let's come back to this after 0.20, do you have a repro case?
Maybe check the related issues? It looks like it's simple to repro in GMod with an expanding hydraulic.
I did a bit more testing, and it seems like JoltPhysicsSpring::OnJoltPhysicsObjectDestroyed
will be called and then it breaks.
If a prop is connected to the world, it will crash in JoltPhysicsSpring::SetSpringLength
because the m_pObjectStart
was deleted, but there is no null check so it'll try to use it.
I'll try to test it future again tomorrow, but it seems like the crash in the video is a different one?
(I don't remember it ever crashing in one of the JoltPhysicsSpring
functions when I made the pr)
Is it not set up to have an OnDestroyedListener?
It has and OnJoltPhysicsObjectDestroyed
will be called to set m_pObjectStart
to nullptr
but it's still used / the engine still calls SetSpringLength and in that function you don't check if it's null
I guess MR that NULL check? :-)
It'll solve the world -> prop crash but not the prop -> prop crash sadly
I'll look into it tomorrow again to try and solve it
So It seems like I found the cause, and it should now be fixed for all cases :D
I also reverted the original two commits, since it seems like they didn't really do anything. I wonder why they fixed it on the dupe months ago.
[#] Fixed a crash
Related issues: fixes #137 fixes #85