Silenci0 / SMAC

Sourcemod Anti-Cheat
Other
154 stars 55 forks source link

smac crashing when admin menu is open #24

Closed Ayrton09 closed 4 years ago

Ayrton09 commented 4 years ago

hello silenci0 how are you?, testing the latest version i found a weird bug, when i open the admin menu the server goes crash lol, removing the smac_rcon didnt help but removing all the new smac plugins fix the problem.

Silenci0 commented 4 years ago

Could you list the SMAC plugins you were using on your server as well as the SM version and game? I'm assuming the game is CS:GO, but I want to make sure of that first.

Ayrton09 commented 4 years ago

SourceMod Version: 1.10.0.6455 Game: csgo

at the first try i used these but now i remove it to avoid crashing.

Anotación 2019-11-19 074638

Silenci0 commented 4 years ago

okay got it, I'll take a look at these and see what is causing the issue. I'm thinking this might have to do with the latest CS:GO update as well, but I can't be certain on that. Thanks for the report and I'll respond back to this as soon as possible.

caxanga334 commented 4 years ago

Install Accelerator, this will give us a more precise information about the crash.

Ayrton09 commented 4 years ago

Install Accelerator, this will give us a more precise information about the crash.

im using it but just now the pag is down Anotación 2019-11-19 090250

Silenci0 commented 4 years ago

Hi Ayrton,

I was able to replicate this and I think I know why its happening. It wasn't noticed during testing, but when I turned on the welcome message, I did get an error in the error logs blaming the smac module due to referencing a function in the morecolors include, which seemed to crash the server directly after the welcome message was displayed (if I was able to open the menu prior to that, it would work fine until I tried to open it again). So its very likely this is related to a bug with SMAC displaying text in chat incorrectly.

Could you look in sourcemod/logs in the file "errors_.log" that were generated between now and when you updated SMAC and see if any smac-related error logs were left behind? If so, could you post them here for me to look at? In the meantime, I'll be working on a fix for the bug I ran into and attempt to get it out ASAP.

caxanga334 commented 4 years ago

@Silenci0

L 11/19/2019 - 13:51:25: [SM] Exception reported: Invalid field "params" for message "CCSUsrMsg_SayText2"
L 11/19/2019 - 13:51:25: [SM] Blaming: smac.smx
L 11/19/2019 - 13:51:25: [SM] Call stack trace:
L 11/19/2019 - 13:51:25: [SM]   [0] Protobuf.SetString
L 11/19/2019 - 13:51:25: [SM]   [1] Line 206, C:\compiler\sm10\include\morecolors.inc::CSendMessage
L 11/19/2019 - 13:51:25: [SM]   [2] Line 48, C:\compiler\sm10\include\morecolors.inc::CPrintToChat
L 11/19/2019 - 13:51:25: [SM]   [3] Line 202, C:\compiler\sm10\smac.sp::Timer_WelcomeMsg

Crash Info

Edit: Morecolors is only used in smac.sp. The other modules uses SM's PrintToChat function. Perhaps we should stop using colors/morecolors.

Edit 2: Confirmed issue fixed in https://github.com/caxanga334/SMAC/commit/b10287d793f99975c9a9082da8b09f8112b1a070

Silenci0 commented 4 years ago

@caxanga334 Aside from the CPrintToChat feature, there is the CRemoveTags feature (colors/morecolors has this) for the IRC Mode to consider since that removes the color tags ( {default} {green} etc.) from the buffer message when sending the message to IRC. Though I don't know how many people actually use the IRC mode, I'd rather not remove this unless there is no other choice.

Other than that, I agree on switching to PrintToChat since it would be simple/compatible with everything and we'd have one less include to deal with. I'll attempt to fix up the colors include first and revert back to that for now. I'll have an update out later today.

Silenci0 commented 4 years ago

Update 0.8.7.1 has been released and addresses this issue. It was tested with CS:GO and no crashes were experienced while testing. Please use the latest release and let me know if it is working for you now @Ayrton09

Ayrton09 commented 4 years ago

thanks silenci0! testing now i will let you know if something is wrong.

Ayrton09 commented 4 years ago

fixed thanks! :)