So this is a weird bug ive been having. Some players including myself have reported their client crashing when dying when playing my game Aegis (Aegis Beta - Roblox) Ive seen this happen via different types of deaths in the game, and its not consistent but id say about 5% of the deaths on my computer result in client crashing. The client crashes immediately or milliseconds after dying in these cases. Note nobody has reported crashing in any other scenarios, just dying, I cant seem to repo this in studio, only on online. Ive ruled out alot of things in my code that could be causing this and have come to the end of the road. I have the dump file created via task manager here if @spotco or anyone else wants to take a look:
If you would like any other diagnostic info I can provide that hopefully.
Heres a screen of it hanging just eating CPU usage, the health bar at the top left is incorrect as it didnt have time to tween all the way down before the client crashed (but I am dead as that bar should be green not red):
Unfortunately that dmp file is 64 bit, so I don’t seem to be able to use it correctly. If this happens to you again, can you use the 32 bit version of the task manager to create a dmp file? The 32 bit version of your task manager should be called taskmgr.exe and located in the following location C:\Windows\SysWOW64\Taskmgr.exe
Is there anything specific I can do in your game to make this problem occur? I played for around 15 minutes and didn’t experience it.
Can anyone help out with this? I need the source code to use windbg im pretty sure. This is still occurring, microprofiler isnt showing anything weird at the crashed frame…
Looks like the client is hanging, not crashing, which can be more difficult to debug. The call stack in the dmp you provided wasn’t very useful for debugging the issue unfortunately. Is it possible for you to make a version of the place that continuously simulates the same conditions that happen when the character is killed by another character?
Anything to make this easier to reproduce would help.
So ive been experimenting with the specific instances where this occurs. Ive found that it only occurs when two people are firing at eachother and they die while firing their gun. I was stumped why this would occur with my weapon models, and I dived a bit deeper and remembered a client error that would crash shortly after sound removal, well when a player dies, it removes that weapon model, which includes a part with a sound object inside that plays the muzzle fire noise. Now funny enough, I removed that object just to see, and it still crashes without muzzle sounds. To repo this issue 100% have two players ingame, one firing his gun at the other player or into the air, have the other player shoot that player while they are firing, should induce a crash.
I will continue to tweak my weapons until I can get it not to crash… Also it seems I can repo this in studio but script performance or anything else doesn’t help as the entire window hangs.
UPDATE: I have narrowed this down to pcall crashing the client somehow. There was an error in my code, which was wrapped in a pcall, without the pcall, the client doesnt crash but shows the error, with the pcall, it errors and crashes…
This has fixed the issue, I cant replicate it anymore without the pcall function in there, if you want a repo of the direct pcall crashing error I can try to whip one up.