Facepunch / garrysmod-issues

Garry's Mod issue tracker
138 stars 56 forks source link

Server crashs when spawning props outside of the world. #2831

Closed mcNuggets1 closed 7 years ago

mcNuggets1 commented 7 years ago

Details

Server crashs, when spawning props outside of the world.

Steps to reproduce

Spawn a prop like 100,000 units outside of the world.

mcNuggets1 commented 7 years ago

This is still present, is there any news or a way to fix this?

Kefta commented 7 years ago

Why are you spawning a prop that far out of the world limits, anyway? And shouldn't crazy physics already bound this if you have the convar enabled?

mcNuggets1 commented 7 years ago

Normal Gmod Spawn behaviour in sandbox can lead to that. Stacker however either and easier.

I clamped stacker, but I can't clamp the gm_spawn function to just spawn props in world.

Crazy physics does remove it within like 7,600 units aways from the map, but if it goes above that limit, it just crashs or completly fucks up the physics leading to a crash.

Kefta commented 7 years ago

You can, actually, if you wanted to override it to check, but I still don't get why you're spawning props out that far.

mcNuggets1 commented 7 years ago

It is quite a heavy crashbug which is actually used to crash several servers and there is currently no real fix out there.

In 90% cases it is the fault for crashing my server, so actually it is quite a problem for me.

robotboy655 commented 7 years ago

And why I can't even reproduce it? Post crash logs from said crashes?

mcNuggets1 commented 7 years ago

Well wow lua_run e = ents.Create("prop_physics") e:SetModel("models/pigeon.mdl") e:SetPos(Vector(0,0,999999999999999999999)) e:Spawn() e:Activate()

Kefta commented 7 years ago

Yeah, crashed my game in single-player on main branch.

mcNuggets1 commented 7 years ago

If this is going to get fixed, then I guess I'll have to visit my favorite servers one last time.

Yeah, I know that I am a scumbag, but that people deserved it, really.

robotboy655 commented 7 years ago

That specific case should be fixed in Dev.

mcNuggets1 commented 7 years ago

Still happens, but different.

lua_run local e = ents.Create("sent_ball") e:SetPos(Vector(0,0,99999999999999999999999999999999999999)) e:Spawn() e:Activate()

This lead to a very weird crash, after some time.

robotboy655 commented 7 years ago
] lua_run local e = ents.Create("sent_ball") e:SetPos(Vector(0,0,99999999999999999999999999999999999999)) e:Spawn() e:Activate()
> local e = ents.Create("sent_ball") e:SetPos(Vector(0,0,99999999999999999999999999999999999999)) e:Spawn() e:Activate()...
sent_ball[173]:SetPos( 0.000000 0.000000 99999996802856925000000000000000000000.000000 ): Ignoring unreasonable position.
] lua_run local e = ents.Create("sent_ball") e:SetPos(Vector(0,0,9999999999999999999999999999999)) e:Spawn() e:Activate()
> local e = ents.Create("sent_ball") e:SetPos(Vector(0,0,9999999999999999999999999999999)) e:Spawn() e:Activate()...
Crazy origin on entity [184][sent_ball]
    Origin:           [0.000000, 0.000000, 9999999848243207300000000000000.000000]
    Angles:           [0.000000, 0.000000, 360.000000]
    Velocity:         [0.000000, 0.000000, -9.000000]
    Angular Velocity: [0.000000, 0.000000, -0.000000]
Defusing!
Not defusing position, avoiding potential crash!
Removing!
mcNuggets1 commented 7 years ago

gm_construct. Use the same code and spam it like 25 times. The balls then fall from the sky in the size of 1.

Wait 1 minute. Leads to a crash.

Tested on sandbox without addons.

Game just closes or closes with a weird error message saying something with TPS or TVS.

robotboy655 commented 7 years ago

nothing happens even with hundreds of them.

image

mcNuggets1 commented 7 years ago

https://www.dropbox.com/s/btl84y12r6eyan9/hl2_170102_crash_2017_1_4T16_41_36C0.mdmp?dl=0 https://puu.sh/tb29z/84a50ebcd2.png

Hopefully this can help you.

robotboy655 commented 7 years ago

It's a generic physics crash that cannot be analyzed or fixed.

mcNuggets1 commented 7 years ago

So it is not really fixed, just fixed in specific scenarios. Maybe just remove the entity entirely, when spawned outside of the map? Why keeping Size 1 Balls floating around the ap crashing the game?

robotboy655 commented 7 years ago

That's what crazy physics stuff is doing. The entities get removed.

mcNuggets1 commented 7 years ago

Why do these entities then spawn and getting higher indexing numbers, when it says it got removed?

robotboy655 commented 7 years ago

Because you fucking manually create them there??!!?!

mcNuggets1 commented 7 years ago

When they get removed, why do they still exist, then? They should not be spawned outside of the map, should they?

robotboy655 commented 7 years ago

They don't jesus christ

In your crash log only 1 entity was outside of the map, and it got removed. The other ones were never removed because they were never moved outside of the map due to safeguards in Entity.SetPos.

I am done here.

mcNuggets1 commented 7 years ago

Still happens when resizing a prop with "Prop Resizer" tool and moving it outside of the world.

Crashdump: https://www.dropbox.com/s/gwxb8o0l43n1z76/hl2_170329_crash_2017_3_30T14_23_21C0.mdmp?dl=0

Tested on devbranch.

robotboy655 commented 7 years ago

That's an entirely different crash inside vphysics, nothing can be done about that.

mcNuggets1 commented 7 years ago

Sad story.

I actually wanted to use that tool someday.

Well, anyways thanks for the new shit next update. I appreciate your work.

thegrb93 commented 7 years ago

Non-english speakers probably think you're calling the next update shit fyi.