Coder Social home page Coder Social logo

Vis Clip Crashes Client/Server about clip_tool HOT 3 CLOSED

ndbeals avatar ndbeals commented on September 21, 2024
Vis Clip Crashes Client/Server

from clip_tool.

Comments (3)

looterz avatar looterz commented on September 21, 2024

If I remember correctly, this is caused by the advanced dupe contraption having many visclips associated with it, and due to how the clips are sent to the client it can overload the client and cause a crash.

The guilty code is located here https://github.com/TGiFallen/Clip_Tool/blob/master/lua/autorun/server/sv_clipping.lua#L68

I don't have garrysmod installed or setup for building right now or id submit a patch, but I'm leaving this info here hoping TGiFallen will find it. I'd recommend throttling or splitting up the way clips are sent to clients to avoid crashing them.

from clip_tool.

ndbeals avatar ndbeals commented on September 21, 2024

I'd love to get to fix it, though I'm unsure if I have the time, I am due to head out to baffin island soon and there's no internet where I'm going. I'll take a look.

from clip_tool.

FreeeFry avatar FreeeFry commented on September 21, 2024

looterz:
If I remember correctly, this is caused by the advanced dupe contraption having many visclips associated with it, and due to how the clips are sent to the client it can overload the client and cause a crash.

The guilty code is located here https://github.com/TGiFallen/Clip_Tool/blob/master/lua/autorun/server/sv_clipping.lua#L68

I don't have garrysmod installed or setup for building right now or id submit a patch, but I'm leaving this info here hoping TGiFallen will find it. I'd recommend throttling or splitting up the way clips are sent to clients to avoid crashing them.

This is actually not the case(assuming this is the same issue I've had with a few dupes of mine).
After some debugging it turns out it has to do with the compatibility code for older visclip versions;
Sometimes the EntityMods table of an entity might contain both the clipping_all_prop_clips table(newer system) AND the clips table(older system), this seems to crash the server when duplicator.StoreEntityModifier is called in sv_clipping.lua on line 58.

To remedy this I added this to compat.lua on line 5:

if ent:GetTable().EntityMods and ent:GetTable().EntityMods.clipping_all_prop_clips then return end

And to make sure the old clips table is removed from future saves I also added this to sv_clipping.lua at line 56:

if ent:GetTable().EntityMods and ent:GetTable().EntityMods.clips then ent:GetTable().EntityMods.clips = nil end 

To verify this is the case, comment out/remove line 58 in sv_clipping.lua and spawn your crashing dupe, then while looking at an entity that's clipped enter this into your console:

lua_run PrintTable(player.GetAll()[1]:GetEyeTrace().Entity:GetTable())

You should see that it has both the clipping_all_prop_clips and the clips sub-tables of the EntityMods table.

from clip_tool.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.