alliedmodders / sourcemod

SourceMod - Source Engine Scripting and Administration
http://www.sourcemod.net/
974 stars 421 forks source link

Server crash when a menu is closed early #1047

Open leoTiGRiS opened 5 years ago

leoTiGRiS commented 5 years ago

Help us help you

Environment

Description

I'm running execute server, when 3+ players joining the server (I noticed that usually happens after that) server just crashes. Minidump analyze output: https://crash.limetech.org/4uanlblmlgru (fixed link)

KyleSanderson commented 5 years ago

You have a bad plugin freeing a menu twice. The crash should be fixed but until someone takes a closer look at what's going wrong this is an avenue for you to explore.

Headline commented 4 years ago

@leoTiGRiS any updates on this?

asherkin commented 4 years ago

This crash is quite common, the cause is if a menu handle is deleted while it is open for any clients. This doesn't affect most plugins as they use temporary menu handles and delete them in the MenuAction_End callback when SM guarantees it is safe.

We have all sorts of logic for keeping handle clones around in the internal menu objects and generally keeping track of state already, so this is probably just something that isn't wired up correctly. I suspect we should be able to cancel the menu in the OnHandleDestroy callback and call it a day, but it needs a reproduction written and testing.