nosoop / SM-TFCustomWeaponsX

SourceMod plugin that allows players to use custom TF2 items.
GNU General Public License v3.0
22 stars 11 forks source link

Segfault on weapon grant #38

Closed Slips-PC closed 2 years ago

Slips-PC commented 2 years ago

Pre-flight checklist

Environment

Ubuntu 20.04 LTS

Description

When sm_cwx is run and a weapon (in this case, The Grenade Launcher Launcher) is selected from the menu, the server experiences a segmentation fault.

Steps to replicate

Start a server. Wait for round to start, then type sm_cwx into the console and select The Grenade Launcher Launcher. Expected Behavior: Weapon is granted upon touching a resupply locker. Actual Behavior: Server crashes immediately upon touching a resupply locker.

Other information

Multiple errors are shown when the /cwx command is run, primarily in the realm of things like L 04/10/2022 - 05:45:46: [SM] Exception reported: Language phrase "LoadoutSlot_Melee" not found (arg 5)

sm exts list output:

 "Automatic Updater" (1.10.0.6536) by AlliedModders LLC: Updates SourceMod gamedata files
 "Webternet" (1.10.0.6536) by AlliedModders LLC: Extension for interacting with URLs
 "TF2Items" (1.6.4) by Asherkin & AzuiSleet & Damizean: TF2 Item Modifier
 "TF2 Tools" (1.10.0.6536) by AlliedModders LLC: TF2 extended functionality
 "BinTools" (1.10.0.6536) by AlliedModders LLC: Low-level C/C++ Calling API
 "SDK Hooks" (1.10.0.6536) by AlliedModders LLC: Source SDK Hooks
 "SDK Tools" (1.10.0.6536) by AlliedModders LLC: Source SDK Tools
 "Top Menus" (1.10.0.6536) by AlliedModders: Creates sorted nested menus
 "Client Preferences" (1.10.0.6536) by AlliedModders: Saves client preference settings
 "SQLite" (1.10.0.6536) by AlliedModders LLC: SQLite Driver

sm plugins list output

 "[TF2] Custom Attribute Team Subsection Handler" (1.1.0) by nosoop
 "Basic Ban Commands" (1.10.0.6536) by AlliedModders LLC
 "Admin Help" (1.10.0.6536) by AlliedModders LLC
 "[TF2CA] Custom Weapons Config Adapter for Custom Attributes" (1.2.2) by nosoop
 "Simple Chat Processor (Redux)" (2.3.0) by Simple Plugins, Mini
 "[TF2] Custom Weapons X" (X.0.9-5d020e6) by nosoop
 "Client Preferences" (1.10.0.6536) by AlliedModders LLC
 "[TF2] Custom Attributes" (0.4.1) by nosoop
 "[TF2] Custom Attribute Manager" (1.0.0) by nosoop
 "Basic Commands" (1.10.0.6536) by AlliedModders LLC
 "Anti-Flood" (1.10.0.6536) by AlliedModders LLC
 "Instant Respawn" (1.4) by ChauffeR
 "Basic Chat" (1.10.0.6536) by AlliedModders LLC
 "[TF2] TF2Attributes" (1.3.3@nosoop-1.7.1.1) by FlaminSarge
 "[TF2] Econ Data" (0.18.2) by nosoop
 "TF2 Utils" (0.17.0) by nosoop
 "Basic Comm Control" (1.10.0.6536) by AlliedModders LLC
 "Player Commands" (1.10.0.6536) by AlliedModders LLC
 "[TF2] Custom Attribute Debugger" (1.0.0) by nosoop
 "Basic Votes" (1.10.0.6536) by AlliedModders LLC
 "Fun Commands" (1.10.0.6536) by AlliedModders LLC
 "[TF2] Be the Horsemann" (1.4) by FlaminSarge
 "[TF2] Custom Weapons X - Equip Commands" (1.1.0) by nosoop
 "[TF2] Gimme" (1.13) by PC Gamer
 "Reserved Slots" (1.10.0.6536) by AlliedModders LLC
 "Admin Menu" (1.10.0.6536) by AlliedModders LLC
 "Sound Commands" (1.10.0.6536) by AlliedModders LLC
 "Admin File Reader" (1.10.0.6536) by AlliedModders LLC
 "Bonus Round Immunity" (1.1.0) by Antithasys
 "Civilian Pose Plugin" (1.0) by dada513
 "Fun Votes" (1.10.0.6536) by AlliedModders LLC
 "Basic Info Triggers" (1.10.0.6536) by AlliedModders LLC
 "Nextmap" (1.10.0.6536) by AlliedModders LLC
"[Source 2013] Custom Chat Colors" (3.1.0) by Dr. McKay
nosoop commented 2 years ago

Hello again — those aren't the only extensions installed, are they? DHooks is notably missing; would be surprised if CWX was loaded in without it. That aside, everything else described seems to be fine.

Language phrase "LoadoutSlot_Melee" not found

This message suggests that translations/cwx.phrases.txt is missing from the server. While it wouldn't cause a crash outright as far as I know, you may be missing other files required to run the plugins.

Not enough information for me to work out a solution so far; I'd suggest restarting the server again once you've checked that everything is installed, and before restarting, you may as well also install and configure Accelerator for better crash reports.

If you're able to reproduce the crash again then, do respond with the crash ID that Accelerator generates on the startup after the crash.

Slips-PC commented 2 years ago

Hello again — those aren't the only extensions installed, are they? DHooks is notably missing; would be surprised if CWX was loaded in without it. That aside, everything else described seems to be fine.

Yes, you're right, dhooks is also enabled in the extensions. Sorry, must've missed it when copying the logs.

This message suggests that translations/cwx.phrases.txt is missing from the server. While it wouldn't cause a crash outright as far as I know, you may be missing other files required to run the plugins.

Hm, strange. Taking a look now. If that doesn't fix it I'll report back, with Accelerator installed hopefully.

Slips-PC commented 2 years ago

So yeah, that was what was causing it apparently. Adding it to my sourcemod/translations folder fixed it immediately and it all seems to be Working As Intended:tm: now.

nosoop commented 2 years ago

I suppose that makes sense; exceptions being raised at runtime may be causing the plugin to get into an undefined state since code past that point isn't being run.

Good to see it's resolved, though.