Raised This Month: $51 Target: $400
 12% 

update broke us


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BBG_Theory
Veteran Member
Join Date: Oct 2010
Location: NC USA
Old 08-27-2013 , 20:54   update broke us
Reply With Quote #1

FF2 is broken on windows and Linux from update today. Is it itemes, or gamedata? or???
BBG_Theory is offline
Fearts
ferts of daeth
Join Date: Oct 2008
Old 08-27-2013 , 20:55   Re: update broke us
Reply With Quote #2

Looks like the same for my servers. Both Freak Fortress and Saxton Hale.
__________________
Fearts is offline
Jwu
AlliedModders Donor
Join Date: Sep 2011
Location: Austria
Old 08-28-2013 , 01:20   Re: update broke us
Reply With Quote #3

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

Works for me now (after gamedata update).

Last edited by Jwu; 08-28-2013 at 01:27.
Jwu is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 08-29-2013 , 00:25   Re: update broke us
Reply With Quote #4

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
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
VoiDeD
AlliedModders Donor
Join Date: Mar 2009
Location: Illinois, USA
Old 08-29-2013 , 02:08   Re: update broke us
Reply With Quote #5

Quote:
Originally Posted by BBG_Theory View Post
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.
__________________
VoiDeD is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 08-29-2013 , 02:53   Re: update broke us
Reply With Quote #6

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.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-29-2013 , 13:06   Re: update broke us
Reply With Quote #7

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).
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 08-29-2013 at 13:11.
Powerlord is offline
RavensBro
Veteran Member
Join Date: Sep 2009
Location: Wisonsin USA
Old 08-29-2013 , 13:50   Re: update broke us
Reply With Quote #8

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
RavensBro is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 08-29-2013 , 15:39   Re: update broke us
Reply With Quote #9

Quote:
Originally Posted by Powerlord View Post
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.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 08-29-2013 at 15:44.
friagram is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-29-2013 , 15:52   Re: update broke us
Reply With Quote #10

Quote:
Originally Posted by friagram View Post
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.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 08-29-2013 at 15:53.
Powerlord is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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