Emana202 / L4D2-Survivor-Bot-AI-Improver

A SourceMod plugin for L4D2 trying to improve survivor bots' AI as much as possible
20 stars 4 forks source link

Server crashing when bots pick weapons up #3

Closed Yisus89 closed 1 year ago

Yisus89 commented 2 years ago

https://crash.limetech.org/xvtdzlr4klw5 Here's the dump.

I have tested this extensively with and without actions. I knew this plugin was crashing the server thanks to accelerator, but couldn't figure out where exactly this happened. I was then able to reproduce this on c8m2_subway, where the game would consistently crash when bots picked up the m16 or the ak47.

It also happened once with the chainsaw and with the normal SMG. But there have also been cases where bots picked up the guns just fine, so it's not always crashing when they do that. But when it crashes, it's always with this interaction.

May also happen on picking grenades not sure. Though what's sure is, it crashes when they pick stuff, and this happens regardless if the extension action is installed or not, so you can get that out of the picture.

Yisus89 commented 2 years ago

// ClearMoveToPosition(iClient, "ScavengeItem");

Commenting this on line 1090 inside Event_OnPlayerUse seems to have fixed the crashing. I was not able to reproduce it no more on spots that made it happen all the time, and never received additional crash dumps.

The plugin can still give some errors from time to time related to checking if CI is attacking, or another one related to ammo pile. But neither causes the server to crash or any obvious problems with the bots so they can be safely ignored.

Emana202 commented 2 years ago

Pushed an update regarding the issue. Crashing should be now fixed.