IVP Failed at ..\ivp_utility\ivu_vhash.cxx 157

Lately, GMod has been crashing with the above error. I can’t be certain, but it seems to happen when tossing certain scripted physics entities around. It seems to happen arbitrarily: one moment, everything is fine and dandy, but suddenly, the scripted entities using VPhysics stop colliding with the world, and fall through the floor. GMod crashes shortly afterwards citing the engine error in the title.

I’d normally blame my incompetence in scripting, but for one, I haven’t touched the script in a while, and this is a rather recent issue. For another, one of the scripted entities in question doesn’t override ENT.PhysCollide, and really doesn’t do anything special in terms of physics.

The entities causing the crashed use PhysicsInit(SOLID_VPHYSICS), self.Entity:SetMoveType(MOVETYPE_VPHYSICS), and self.Entity:SetSolid(SOLID_VPHYSICS), but these have worked fine for quite a while.

Any help with this problem would be appreciated. Thank you.

(User was banned for this post ("Wrong section" - mahalis))

I’ve encountered this aswell. As soon as shit starts falling through the world, shit hits the fan.

When you see it happen, remove everything and just don’t do anything for, say, 30 seconds. It should then be alright to spawn stuff.

I think it’s an internal error. It started happening since an engine update a while back (not sure when)

Are you using the EntitiesShouldCollide hook?


It’s nothing special, a simple grenade entity. Counts down and blows stuff up. Just uses Init and Think.
The other entity does override PhysicsCollide, but again, it’s nothing particularly special, and has worked in the past without any problems. Init, Think, PhysicsCollide, Use.

Paste all the code.

It doesn’t matter, I’m almost completely certain that it’s not the scripted entities causing trouble. Tried it again, ALL entities using VPhysics begin to fall through the world.

paste the code.

Name: ENT:PhysicsCollide()
function ENT:PhysicsCollide(data, phys)

local Ent = data.HitEntity
if !(ValidEntity(Ent) or Ent:IsWorld()) then return end

if Ent:IsWorld() then
	util.Decal("ManhackCut", data.HitPos + data.HitNormal, data.HitPos - data.HitNormal)

	if self.Entity:GetVelocity():Length() > 400 then
		self:EmitSound("npc/roller/blade_out.wav", 60)
		self:SetPos(data.HitPos - data.HitNormal * 10)
		self:SetAngles(data.HitNormal:Angle() + Vector(40, 0, 0))
		self:EmitSound(self.Hit[math.random(1, #self.Hit)])
elseif Ent.Health and self.HitEnemy == false then	// Only deal damage once.
	if not(Ent:IsPlayer() or Ent:IsNPC() or Ent:GetClass() == "prop_ragdoll") then 
		util.Decal("ManhackCut", data.HitPos + data.HitNormal, data.HitPos - data.HitNormal)
		self:EmitSound(self.Hit[math.random(1, #self.Hit)])
		self.HitEnemy = true
	local boink = ents.Create(self.Weapon)
	Ent:TakeDamage(50, self:GetOwner(), boink)	// If you have a killicon for the axe, this makes it appear.

	if (Ent:IsPlayer() or Ent:IsNPC() or Ent:GetClass() == "prop_ragdoll") then 
		local effectdata = EffectData()
		util.Effect("BloodImpact", effectdata)



Hm. Nothing obvious, but I’m kinda tired. I’ll re-read it tomorrow, though someone else will probably have a better idea what’s causing it.

If the entity hits the world, the self.Disable function replaces ENT.PhysicsCollide with just “return end”. That may be the source of the issue here.

Doesn’t explain why the object stops colliding with the world or why it affects anything besides itself, though. It also doesn’t explain why the issue doesn’t occur consistently.


Sounds similar to the “Double return” in the EntitiesShouldCollide hook. If you return two different values for the same pair of entities (args a , b , args b , a) then the physics engine breaks.

Try removing the return and just nesting.

Okay, I’ve been trying to break GMod physics again to see if I can reproduce the error, to no avail. I haven’t really changed anything at all, but I can’t argue with results.

If this issue returns after the thread dies… I have no threats to administer.

Thanks to everyone who helped.

In case anybody’s had any experience with this kind of issue, it’d be nice to know, just in case. Thanks.

Hello. Yes I know this is a very old topic but I think I have a piece of an answer.

Now it’s GMod 13 and I have the same problem. Actually this problem happens sometimes, but more often I have also a memory error ([address] cannot be read at [address] blah blah). But it happens server-side.
And yes, the time before the crash seems to be random or something.

If the problem is really the physics engine, I think I know where it can be from. In my gamemode with not a lot of modifications from the base, I make the prop_physics and the prop_physics_multiplayer entities fixed so players cannot move them. To do this, when the entities of the map have spawned, I set the parent of each prop_physics and prop_physics_multiplayer to ents.FindByClass(“light”)[1]. I think this special parent could be the problem because the light does not really have a model and a physics design.

Also note that this happens only once players have joined my server. Before the 1st player spawns, the server works with no error.
I will try to change the parent of the prop_physics* entities.

EDIT: I use the map rp_christmastown. About 1 minute later after the 1st player spawns, on the base gamemode, I get these messages in the console:
Crazy physics on [986][prop_physics_multiplayer] [Ang:-1.#IND00,1.#QNAN0,180.000000] [Pos:-1.#IND00,-1.#IND00,1.#QNAN0] - removing
Crazy physics on [1001][prop_physics_multiplayer] [Ang:1.#QNAN0,1.#QNAN0,180.000000] [Pos:1.#QNAN0,1.#QNAN0,-1.#IND00] - removing

I now think that parenting buggy entities can break the physics engine easily! Never ignore what console says. :frowning:

–SNIP-- >.< I’m an idiot.