Open Dimentio opened 4 years ago
This Lua error is explained in #1.
You can see my pull request #3 that should fix this Lua error.
Feel free to use my fork in the meantime.
I realize that my lines above are not the same as this github's but it's
self.neckOffset = self.skelEntity:GetBonePosition(self.skelEntity:LookupBone("ValveBiped.Bip01_Neck1"))
In my own version I check if the neck bone was found and if so this part run as shown here,
local bone = self.skelEntity:LookupBone("ValveBiped.Bip01_Neck1") if bone then self.neckOffset = self.skelEntity:GetBonePosition(bone) end
apparently something goes wrong and it cause a lua panic as shown from the crashlog. I believe your lua error is not exactly related to this crash but I could be wrong. As the bone is found and yet it lua panic (crash to desktop)
Does it crash with the original code or my fork?
When does it crash? Which playermodel? Which gamemode? Which gmod branch/version? Which OS?
The only instance where I think this would crash is when a playermodel doesn't have any bones. But with the check you've made I'm not sure why it would proceed to call GetBonePosition().
Also please at least provide all your modified code or give the logs of the crash with the original code or my fork so I can be certain of the location of the issue.
Anyway what I mean is that I need to know more about the context of the crash because I don't know why this happens to you and I never got any crash with the original code nor my own fix for Lua errors.
Lua panic is something I rarely get so I forgot that was a thing.
My players seems to crash on joining after they start spectating someone, I believe it happen with any model but can't be sure I only have the crash log I posted above. My gamemode is murder. I unfortunately don't have information for the last two questions. I never experienced the crash myself but noticed a few of my players would crash on join and that's where I got this log from. I've removed the script since but i'll try to take a look into it when I have time.
Ok I've tried with my fork on Murder (latest version). With someone joining when the game is started so they are instantly spectating. I have not experienced any issues, errors nor crash. So I cannot reproduce this crash. But you did said that you wasn't able to get the crash either.
Latest gmod update mention this line:
Better error handling for Entity.SetBonePosition, Entity.GetBonePosition, Entity.SetBoneMatrix, Entity.GetBoneMatrix
Might be a fix to this.
As of latest gmod update, this happened again. I feel like it's the code running too soon.
-Lua Stack Traces- Client
-Lua Stack Traces-
Client
Server Lua Interface = NULL
MenuSystem Not in Lua call OR Lua has panicked