[Help] Crash Lua

Hello all,

i need your help if possible

Context : When i connect to my server and look at the emitter no problem, i play etc … but when i click disconnect button later or i type retry command on the console, my gmod crash instantaneously with no error.

[lua]
include(“shared.lua”)

AddCSLuaFile()

function ENT:Draw()
end

function ENT:Initialize()

self.Emit = ParticleEmitter(self:GetPos())
self:InitializeAsClientEntity()

end

function ENT:Think()
for i = 1, 10 do
local part = self.Emit:Add(self.Material, self:GetPos())
if part then
part:SetVelocity(Vector(math.random(-180, 180), math.random(-180, 180), 90):GetNormal() * 80)
part:SetStartAlpha(100)
part:SetEndAlpha(100)
part:SetDieTime(15)
part:SetLifeTime(0)
part:SetStartSize(1)
part:SetEndSize(1)
part:SetRoll(math.random(0, 360))
part:SetRollDelta(math.random(-10, 10))
part:SetAirResistance( 100 )
part:SetGravity(Vector(0, 0, -10))
end
–self.Emit:Finish() – CRASH
end
–self.Emit:Finish() – CRASH Seems to cause a RunTime Error

if part then part:SetNextThink(CurTime() + 1) end

end

function ENT:OnRemove()
if self.Emit then
self.Emit:Finish()
self.Emit = nil
end
end
[/lua]

Did you use any custom scripts for ‘boosting fps in game’ on your client?

Hmm … no i just have low settings on my client ?

Edit : All my players are crashing on disconnect of the server but can play nice if players doesn’t disconnect

I had same problem 4 month ago. Is your server located on Linux?

Nope Crash on Windows server 2012 R2 and Debian too…

Put your shared code.

What is part?

init.lua

[lua]
AddCSLuaFile(“cl_init.lua”)
AddCSLuaFile(“shared.lua”)

include(“shared.lua”)
[/lua]

shared.lua
[lua]
ENT.Type = “anim”
ENT.Base = “base_entity”

ENT.PrintName = “Effect One”
ENT.Author = “”
ENT.Information = “”
ENT.Category = “”
ENT.Spawnable = false
ENT.AdminSpawnable = false

ENT.Material = “effects/splashwake3”
[/lua]

I had server on Debian and the problem was due to the absence of some dll libraries for Linux in ‘lua/bin’.
(And also special ‘.so’ libraries in main game folder).

But the code make the client crash on disconnect not the server…

bump

Do you crash without this addon? Are you sure it’s this addon?

Did you look at your crash logs?

bump please it’s important for me :confused: