nosoop / SM-TFAttributeSupport

A SourceMod plugin that improves support for official TF2 attributes.
GNU General Public License v3.0
12 stars 4 forks source link

Plugin can't load with 2024-04-18 update #28

Open gaejuck opened 4 months ago

gaejuck commented 4 months ago

error logs

L 04/19/2024 - 22:13:03: [SM] Exception reported: Unexpected value being overwritten for CTFPlayer::CanAirDash()::PatchRequiredDeployTime (expected 0.69, got 1.00 / 3f800000)
L 04/19/2024 - 22:13:03: [SM] Blaming: tf2attribute_support.smx
L 04/19/2024 - 22:13:03: [SM] Call stack trace:
L 04/19/2024 - 22:13:03: [SM]   [0] SetFailState
L 04/19/2024 - 22:13:03: [SM]   [1] Line 260, scripting/tf2attribute_support.sp::OnPluginStart
L 04/19/2024 - 22:13:03: [SM] Unable to load plugin "tf2attribute_support.smx": Error detected in plugin startup (see error logs)

SourceMod Version Information

    SourceMod Version: 1.12.0.7116
    SourcePawn Engine: 1.12.0.7116, jit-x86 (build 1.12.0.7116)
    SourcePawn API: v1 = 5, v2 = 16
    Compiled on: Apr 18 2024 04:45:06
    Built from: https://github.com/alliedmodders/sourcemod/commit/6cac489f
    Build ID: 7116:6cac489f
    http://www.sourcemod.net/

Metamod:Source Version Information

    Metamod:Source version 1.12.0-dev+1192
    Plugin interface version: 16:14
    SourceHook version: 5:5
    Loaded As: Valve Server Plugin
    Compiled on: Feb  7 2024 16:03:42
    Built from: https://github.com/alliedmodders/metamod-source/commit/837fa2c
    Build ID: 1192:837fa2c
    http://www.metamodsource.net/

Additionally, it's running in linux server

ShakerSaba commented 4 months ago

I've received the same error as well, despite the new release.

gamerdorks commented 4 months ago

Same error, running on a Linux server with the latest plugin release.

nosoop commented 4 months ago

Thanks for the report; this particular issue should be fixed in the latest build.

gaejuck commented 4 months ago

I did update gamedata. but it can't still load plugin.

] sm_rcon sm plugins load tf2attribute_support.smx
L 04/21/2024 - 01:07:07: [SM] Exception reported: Failed to validate patch CTFPlayer::CanAirDash()::PatchRequiredDeployTime
L 04/21/2024 - 01:07:07: [SM] Blaming: tf2attribute_support.smx
L 04/21/2024 - 01:07:07: [SM] Call stack trace:
L 04/21/2024 - 01:07:07: [SM]   [0] SetFailState
L 04/21/2024 - 01:07:07: [SM]   [1] Line 251, scripting/tf2attribute_support.sp::OnPluginStart
L 04/21/2024 - 01:07:07: [SM]   [3] ServerCommandEx
L 04/21/2024 - 01:07:07: [SM]   [4] Line 402, /home/builds/sourcemod/debian11-1.12/build/plugins/basecommands.sp::Command_Rcon
[SM] Plugin tf2attribute_support.smx failed to load: Error detected in plugin startup (see error logs).
gamerdorks commented 4 months ago

I did update gamedata. but it can't still load plugin.

] sm_rcon sm plugins load tf2attribute_support.smx
L 04/21/2024 - 01:07:07: [SM] Exception reported: Failed to validate patch CTFPlayer::CanAirDash()::PatchRequiredDeployTime
L 04/21/2024 - 01:07:07: [SM] Blaming: tf2attribute_support.smx
L 04/21/2024 - 01:07:07: [SM] Call stack trace:
L 04/21/2024 - 01:07:07: [SM]   [0] SetFailState
L 04/21/2024 - 01:07:07: [SM]   [1] Line 251, scripting/tf2attribute_support.sp::OnPluginStart
L 04/21/2024 - 01:07:07: [SM]   [3] ServerCommandEx
L 04/21/2024 - 01:07:07: [SM]   [4] Line 402, /home/builds/sourcemod/debian11-1.12/build/plugins/basecommands.sp::Command_Rcon
[SM] Plugin tf2attribute_support.smx failed to load: Error detected in plugin startup (see error logs).

Me too. Exact same issue. I am running a Linux server.

higps commented 4 months ago

I have the exact same issue

naydef commented 4 months ago

Too lazy to make PRs, the following applies for Linux servers only: tf2attribute.gamedata.txt

@@ -282,15 +282,18 @@
                "signature"     "CTFPlayer::CanAirDash()"
                "linux"
                {
-                   "offset"    "B6h"
+                   "offset"    "B7h"
+                   "verify"    "\x0F\x2F\x05\x2A\x2A\x2A\x2A\x2A"
+                   "patch"     "\x0F\x2F\x05\x00\x00\x00\x00\x00"
+                   "preserve"  "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
                }
                "windows"
                {
                    "offset"    "A2h"
+                   "verify"    "\xF3\x0F\x10\x2A\x2A\x2A\x2A\x2A"
+                   "patch"     "\xF3\x0F\x10\x00\x00\x00\x00\x00"
+                   "preserve"  "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
                }
-               "verify"    "\xF3\x0F\x10\x2A\x2A\x2A\x2A\x2A"
-               "patch"     "\xF3\x0F\x10\x00\x00\x00\x00\x00"
-               "preserve"  "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
            }
        }
        "Offsets"

_tf2attributesupport.sp

@@ -253,7 +253,7 @@ public void OnPluginStart() {
    }
    patchAirDashDeployTime.Enable();

-   Address ppValue = patchAirDashDeployTime.Address + view_as<Address>(4);
+   Address ppValue = patchAirDashDeployTime.Address + view_as<Address>(3);
    Address pValue = DereferencePointer(ppValue);
    float value = view_as<float>(LoadFromAddress(pValue, NumberType_Int32));
    if (value != DEFAULT_REQUIRED_DEPLOY_FOR_AIR_DASH) {

Doing this should allow the plugin to load.

nosoop commented 4 months ago

Forgot to fix the verification when I did that last commit; whoops. I'd rather offset by -1 and wildcard the first byte to keep the match instead of recompiling the plugin.

naydef commented 4 months ago

Yea, i realised that at the end.

gamerdorks commented 4 months ago

Too lazy to make PRs, the following applies for Linux servers only: tf2attribute.gamedata.txt

@@ -282,15 +282,18 @@
              "signature"     "CTFPlayer::CanAirDash()"
              "linux"
              {
-                 "offset"    "B6h"
+                 "offset"    "B7h"
+                 "verify"    "\x0F\x2F\x05\x2A\x2A\x2A\x2A\x2A"
+                 "patch"     "\x0F\x2F\x05\x00\x00\x00\x00\x00"
+                 "preserve"  "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
              }
              "windows"
              {
                  "offset"    "A2h"
+                 "verify"    "\xF3\x0F\x10\x2A\x2A\x2A\x2A\x2A"
+                 "patch"     "\xF3\x0F\x10\x00\x00\x00\x00\x00"
+                 "preserve"  "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
              }
-             "verify"    "\xF3\x0F\x10\x2A\x2A\x2A\x2A\x2A"
-             "patch"     "\xF3\x0F\x10\x00\x00\x00\x00\x00"
-             "preserve"  "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
          }
      }
      "Offsets"

_tf2attributesupport.sp

@@ -253,7 +253,7 @@ public void OnPluginStart() {
  }
  patchAirDashDeployTime.Enable();

- Address ppValue = patchAirDashDeployTime.Address + view_as<Address>(4);
+ Address ppValue = patchAirDashDeployTime.Address + view_as<Address>(3);
  Address pValue = DereferencePointer(ppValue);
  float value = view_as<float>(LoadFromAddress(pValue, NumberType_Int32));
  if (value != DEFAULT_REQUIRED_DEPLOY_FOR_AIR_DASH) {

Doing this should allow the plugin to load.

I tried this and it caused my server to crash during startup entirely. Did you test this, and did it work for you? I might have just inserted these lines wrong.

I'm really looking forward to this plugin being patched so that I can use the Pomson and Bison again.

naydef commented 4 months ago

It's working in a production server, so not sure why you got problems

higps commented 3 months ago

It's working in a production server, so not sure why you got problems

It also crashes for me with the same fixes here, getting segmentation faults on boot.

naydef commented 3 months ago

Ok, so did what nosoop told me, new linux gamedata for CTFPlayer::CanAirDash()::PatchRequiredDeployTime which doesn't seemingly crash and no plugin modification required:

"MemPatches"
{
    "CTFPlayer::CanAirDash()::PatchRequiredDeployTime"
    {
        "signature"     "CTFPlayer::CanAirDash()"
        "linux"
        {
            "verify"    "\x2A\x0F\x2F\x05\x2A\x2A\x2A\x2A\x2A"
            "patch"     "\x2A\x0F\x2F\x05\x00\x00\x00\x00\x00"
            "preserve"  "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
            "offset"    "B6h"
        }
        "windows"
        {
            "verify"    "\xF3\x0F\x10\x2A\x2A\x2A\x2A\x2A"
            "patch"     "\xF3\x0F\x10\x00\x00\x00\x00\x00"
            "preserve"  "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
            "offset"    "A2h"
        }
    }
}