AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   VSH / Freak Fortress (https://forums.alliedmods.net/forumdisplay.php?f=154)
-   -   update broke us (https://forums.alliedmods.net/showthread.php?t=224747)

BBG_Theory 08-27-2013 20:54

update broke us
 
FF2 is broken on windows and Linux from update today. Is it itemes, or gamedata? or???

Fearts 08-27-2013 20:55

Re: update broke us
 
Looks like the same for my servers. Both Freak Fortress and Saxton Hale.

Jwu 08-28-2013 01:20

Re: update broke us
 
Indeed, how funny i made an update for FreakFortress 2 this morning and now its broke. -.-

Works for me now (after gamedata update).

friagram 08-29-2013 00:25

Re: update broke us
 
Attribute 0 is most likely the problem.
Creating an item with attribute zero will crash the server. Old versions of tf2items will allow you to send attribute zero. It did not use to crash the server, but now it will. Newer versions of tf2 items will prevent 0 from being sent and abort the item creation.

The functions used to create the weapons in ff2 need to be fixed so that it does not send attribute zero. Then, weapons will be created properly

VoiDeD 08-29-2013 02:08

Re: update broke us
 
Quote:

Originally Posted by BBG_Theory (Post 2023567)
the servers crash on FF2 start (after warmup) if I use hg254 (Linux) but FF2 does not crash if I use hg256 ; However the boss is flat on it's back and can not hit anyone. From the other player (nonboss) the boss looks like he is flat on his back, but the game does not crash

This is a textbook attrib 0 crash. Check the error log when using hg256, you'll notice that tf2items rejected an item given to a boss, and as such the model will go into reference pose (which happens to be lying flat on it's back for some poorly rigged models).

The countless copy pasted SpawnWeapon and PrepareItemHandle functions throughout FF2 and the subplugins need to be fixed up so that they don't incorrectly attempt to give an item with attrib 0.

friagram 08-29-2013 02:53

Re: update broke us
 
Looking through, I rewrote these ages ago when I moved all of the weapon handling in ff2 on my version into OGNI. Pretty sure the first ability set or whatever that spawns weapons for hales is still broken though. Has not had any effect on me, because I don't have any bosses that spawn blank stock weapons @ rage.

Powerlord 08-29-2013 13:06

Re: update broke us
 
If issue is in these lines:

PHP Code:

    new count ExplodeString(att" ; "atts3232);
    if (
count 0

ExplodeString never returns 0. Ever. Even if you pass in an empty string, it'll set atts[0] to an empty string and return 1. Meaning that the next loop runs once, turns "" to 0 (apparently) and sets attributes 0 to 0. Which causes TF2Items 254 and down to crash.

There are several ways to fix this. VSH fixed it by changing count > 0 to count > 1. I personally think that's sloppy.

Instead, I'd do this:

PHP Code:

    new count 0;
    if (
att[0] != '\0')
    {
        
count ExplodeString(att" ; "atts3232);
    }
    if (
count 0

Note: This is the freaks/special_noanims.sp version, freak_fortress_2 has the same thing but with attribCount, att, and weaponAttribsArray... and the attribCount if is farther down (but I didn't change that if anyway).

RavensBro 08-29-2013 13:50

Re: update broke us
 
I get a lot of this

PHP Code:

L 08/28/2013 22:37:10: [SMNative "TF2Items_GiveNamedItem" reportedItem is NULLFile a bug report if you are sure you set all the data correctly. (Try the FORCE_GENERATION flag.)
L 08/28/2013 22:37:10: [SMDisplaying call stack trace for plugin "freak_fortress_2.smx":
L 08/28/2013 22:37:10: [SM]   [0]  Line 4439C:\Users\RavensBro\Desktop\knights of god\source mod and meta mod\sourcemod-1.5.0-hg3861-windows\addons\sourcemod\scripting\freak_fortress_2.sp::SpawnWeapon()
L 08/28/2013 22:37:10: [SM]   [1]  Line 1805C:\Users\RavensBro\Desktop\knights of god\source mod and meta mod\sourcemod-1.5.0-hg3861-windows\addons\sourcemod\scripting\freak_fortress_2.sp::EquipBoss()
L 08/28/2013 22:37:10: [SM]   [2]  Line 1912C:\Users\RavensBro\Desktop\knights of god\source mod and meta mod\sourcemod-1.5.0-hg3861-windows\addons\sourcemod\scripting\freak_fortress_2.sp::MakeBoss()
L 08/28/2013 22:37:19: [TF2ITEMS] ---------------------------------------
L 08/28/2013 22:37:19: [TF2ITEMS] >>> szClassname tf_weapon_fist
L 08
/28/2013 22:37:19: [TF2ITEMS] >>> iItemDefinitionIndex 3
L 08
/28/2013 22:37:19: [TF2ITEMS] >>> iEntityQuality 5
L 08
/28/2013 22:37:19: [TF2ITEMS] >>> iEntityLevel 101
L 08
/28/2013 22:37:19: [TF2ITEMS] ---------------------------------------
L 08/28/2013 22:37:19: [TF2ITEMS] >>> iAttributeDefinitionIndex 68
L 08
/28/2013 22:37:19: [TF2ITEMS] >>> flValue 2.000000
L 08
/28/2013 22:37:19: [TF2ITEMS] ---------------------------------------
L 08/28/2013 22:37:19: [TF2ITEMS] >>> iAttributeDefinitionIndex 2
L 08
/28/2013 22:37:19: [TF2ITEMS] >>> flValue 3.000000
L 08
/28/2013 22:37:19: [TF2ITEMS] ---------------------------------------
L 08/28/2013 22:37:19: [TF2ITEMS] >>> iAttributeDefinitionIndex 259
L 08
/28/2013 22:37:19: [TF2ITEMS] >>> flValue 1.000000
L 08
/28/2013 22:37:19: [TF2ITEMS] ---------------------------------------
L 08/28/2013 22:37:19: [TF2ITEMS] >>> iAttributeDefinitionIndex 269
L 08
/28/2013 22:37:19: [TF2ITEMS] >>> flValue 1.000000
L 08
/28/2013 22:37:19: [TF2ITEMS] ---------------------------------------
L 08/28/2013 22:37:19: [SMNative "TF2Items_GiveNamedItem" reportedItem is NULLFile a bug report if you are sure you set all the data correctly. (Try the FORCE_GENERATION flag.)
L 08/28/2013 22:37:19: [SMDisplaying call stack trace for plugin "freak_fortress_2.smx":
L 08/28/2013 22:37:19: [SM]   [0]  Line 4439C:\Users\RavensBro\Desktop\knights of god\source mod and meta mod\sourcemod-1.5.0-hg3861-windows\addons\sourcemod\scripting\freak_fortress_2.sp::SpawnWeapon()
L 08/28/2013 22:37:19: [SM]   [1]  Line 1805C:\Users\RavensBro\Desktop\knights of god\source mod and meta mod\sourcemod-1.5.0-hg3861-windows\addons\sourcemod\scripting\freak_fortress_2.sp::EquipBoss()
L 08/28/2013 22:37:19: [SM]   [2]  Line 1707C:\Users\RavensBro\Desktop\knights of god\source mod and meta mod\sourcemod-1.5.0-hg3861-windows\addons\sourcemod\scripting\freak_fortress_2.sp::StartRound()
L 08/28/2013 22:37:19: [TF2ITEMS] ---------------------------------------
L 08/28/2013 22:37:19: [TF2ITEMS] >>> szClassname tf_weapon_fist
L 08
/28/2013 22:37:19: [TF2ITEMS] >>> iItemDefinitionIndex 3
L 08
/28/2013 22:37:19: [TF2ITEMS] >>> iEntityQuality 5
L 08
/28/2013 22:37:19: [TF2ITEMS] >>> iEntityLevel 101
L 08
/28/2013 22:37:19: [TF2ITEMS] ---------------------------------------
L 08/28/2013 22:37:19: [TF2ITEMS] >>> iAttributeDefinitionIndex 68
L 08
/28/2013 22:37:19: [TF2ITEMS] >>> flValue 2.000000
L 08
/28/2013 22:37:19: [TF2ITEMS] ---------------------------------------
L 08/28/2013 22:37:19: [TF2ITEMS] >>> iAttributeDefinitionIndex 2
L 08
/28/2013 22:37:19: [TF2ITEMS] >>> flValue 3.000000
L 08
/28/2013 22:37:19: [TF2ITEMS] ---------------------------------------
L 08/28/2013 22:37:19: [TF2ITEMS] >>> iAttributeDefinitionIndex 259
L 08
/28/2013 22:37:19: [TF2ITEMS] >>> flValue 1.000000
L 08
/28/2013 22:37:19: [TF2ITEMS] ---------------------------------------
L 08/28/2013 22:37:19: [TF2ITEMS] >>> iAttributeDefinitionIndex 269
L 08
/28/2013 22:37:19: [TF2ITEMS] >>> flValue 1.000000
L 08
/28/2013 22:37:19: [TF2ITEMS] ---------------------------------------
L 08/28/2013 22:37:19: [SMNative "TF2Items_GiveNamedItem" reportedItem is NULLFile a bug report if you are sure you set all the data correctly. (Try the FORCE_GENERATION flag.)
L 08/28/2013 22:37:19: [SMDisplaying call stack trace for plugin "freak_fortress_2.smx":
L 08/28/2013 22:37:19: [SM]   [0]  Line 4439C:\Users\RavensBro\Desktop\knights of god\source mod and meta mod\sourcemod-1.5.0-hg3861-windows\addons\sourcemod\scripting\freak_fortress_2.sp::SpawnWeapon()
L 08/28/2013 22:37:19: [SM]   [1]  Line 1805C:\Users\RavensBro\Desktop\knights of god\source mod and meta mod\sourcemod-1.5.0-hg3861-windows\addons\sourcemod\scripting\freak_fortress_2.sp::EquipBoss()
L 08/28/2013 22:37:19: [SM]   [2]  Line 1912C:\Users\RavensBro\Desktop\knights of god\source mod and meta mod\sourcemod-1.5.0-hg3861-windows\addons\sourcemod\scripting\freak_fortress_2.sp::MakeBoss()
L 08/28/2013 23:12:20Error log file session closed


friagram 08-29-2013 15:39

Re: update broke us
 
Quote:

Originally Posted by Powerlord (Post 2024199)
If issue is in these lines:
Instead, I'd do this:

PHP Code:

    new count 0;
    if (
att[0] != '\0')
    {
        
count ExplodeString(att" ; "atts3232);
    }
    if (
count 0


This is a bad idea, if a user inputs something like this: " " then att[0] will be space, not string delim, and it will fail. Exploding the string first is okay, it's not that costly. The other option would be to strip whitespace... With just explodestring and then stringtoint checking if count > 1, you assume pairs, and stringtoint auto sanitizes returning zero (which could also cause the attribute zero problem, but .. oh well)

I for one still have tons of my bosses with attributes like this from when ff2 had broken string parsing:

" 2 ; 2.0 ; 134 ; 2 "

It's not good to assume that every empty string will be "", " " is perfectly valid.. and probably in some boss configs.
it may actually be better to do if(!(count % 2)) , since there MUST be an even number of args, or it WILL fail.

Powerlord 08-29-2013 15:52

Re: update broke us
 
Quote:

Originally Posted by friagram (Post 2024305)
This is a bad idea, if a user inputs something like this: " " then att[0] will be space, not string delim, and it will fail. Exploding the string first is okay, it's not that costly. The other option would be to strip whitespace... With just explodestring and then stringtoint checking if count > 1, you assume pairs, and stringtoint auto sanitizes returning zero (which could also cause the attribute zero problem, but .. oh well)

I for one still have tons of my bosses with attributes like this from when ff2 had broken string parsing:

" 2 ; 2.0 ; 134 ; 2 "

It's not good to assume that every empty string will be "", " " is perfectly valid.. and probably in some boss configs.
it may actually be better to do if(!(count % 2)) , since there MUST be an even number of args, or it WILL fail.

True, but the user could just as easily put "bacon sandwich". We can't fix stupid.


All times are GMT -4. The time now is 13:27.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.