Raised This Month: $ Target: $400
 0% 

VSH VSH Plugin stopped working in mid-round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Newbie1992
Senior Member
Join Date: Jan 2013
Location: Germany
Old 01-25-2015 , 15:10   VSH Plugin stopped working in mid-round
Reply With Quote #1

Hi guys,

I found a weird issue in vsh, few mins ago. In mid-round the plugin stopped working (without server crash) the gamemode changed to default arena red / blu
This was the first time that this happend in more than 4 months since the server is online. After a server restart the plugin does work fine.

I found this errors in the sourcemod logs folder:
Code:
L 01/25/2015 - 20:09:51: [SM] Native "SetEntProp" reported: Entity 10 (10) is invalid
L 01/25/2015 - 20:09:51: [SM] Displaying call stack trace for plugin "saxtonhale.smx":
L 01/25/2015 - 20:09:51: [SM]   [0]  Line 4909, C:\Users\user\Desktop\sm\addons\sourcemod\scripting\saxtonhale.sp::HHHTeleTimer()
L 01/25/2015 - 20:10:01: [SM] Native "KillTimer" reported: Invalid timer handle 6a6e02d9 (error 1)
L 01/25/2015 - 20:10:01: [SM] Displaying call stack trace for plugin "saxtonhale.smx":
L 01/25/2015 - 20:10:01: [SM]   [0]  Line 1786, C:\Users\user\Desktop\sm\addons\sourcemod\scripting\saxtonhale.sp::event_round_start()
L 01/25/2015 - 20:10:46: [SM] Native "KillTimer" reported: Invalid timer handle 6a6e02d9 (error 1)
Code from the plugin:
Code:
    if (hHHHTeleTimer != INVALID_HANDLE)
    {
        KillTimer(hHHHTeleTimer);
        hHHHTeleTimer = INVALID_HANDLE;
    }
Code:
public Action:HHHTeleTimer(Handle:timer)
{
    SetEntProp(Hale, Prop_Send, "m_CollisionGroup", 5); //Fix HHH's clipping.
    hHHHTeleTimer = INVALID_HANDLE;
}
Anyone got a idea how to fix this, and why this happend?

Best regards,
Newbie1992
__________________

Last edited by Newbie1992; 01-25-2015 at 15:11.
Newbie1992 is offline
rswallen
SourceMod Donor
Join Date: Jun 2013
Location: 127.0.0.1
Old 01-25-2015 , 19:38   Re: VSH Plugin stopped working in mid-round
Reply With Quote #2

Sequence of events that could lead to this:
  1. Hale disconnected.
  2. Timer fires, throws an error (preventing the variable from being cleared).
  3. During round start, the plugin tries to kill the timer.
  4. Timer is now invalid, error is thrown (causing plugin to stop setting up a VSH round).
FIX: during the timer, check the hale is still a valid client before changing netprops
__________________

Last edited by rswallen; 01-25-2015 at 19:40. Reason: Added potential fix
rswallen is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 01-25-2015 , 20:23   Re: VSH Plugin stopped working in mid-round
Reply With Quote #3

Quote:
Originally Posted by rswallen View Post
Sequence of events that could lead to this:
  1. Hale disconnected.
  2. Timer fires, throws an error (preventing the variable from being cleared).
  3. During round start, the plugin tries to kill the timer.
  4. Timer is now invalid, error is thrown (causing plugin to stop setting up a VSH round).
FIX: during the timer, check the hale is still a valid client before changing netprops
Fixed in master and develop branches now.
__________________
WildCard65 is offline
Newbie1992
Senior Member
Join Date: Jan 2013
Location: Germany
Old 01-26-2015 , 03:26   Re: VSH Plugin stopped working in mid-round
Reply With Quote #4

Quote:
Originally Posted by WildCard65 View Post
Fixed in master and develop branches now.
Thanks for the fix, hopefully works now.

Best regards,
Newbie1992
__________________
Newbie1992 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 01-26-2015 , 13:37   Re: VSH Plugin stopped working in mid-round
Reply With Quote #5

Quote:
Originally Posted by WildCard65 View Post
Fixed in master and develop branches now.
...for VSH? Is this a surprise for ChData?

Also... don't pass client indexes to timers! Always use userids or serials!
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 01-26-2015 , 14:06   Re: VSH Plugin stopped working in mid-round
Reply With Quote #6

This one timer didn't pass /anything/ because it uses the Hale global variable.

Also, newbie's vsh particularly is a little out of sync with the latest version. He was missing code to set the handle to INVALID_HANDLE in OnMapStart.

Also, looking at the code, there's no reason for a global handle to be saved. I probably did that before I knew more about timers. Right now it's more or less being saved for nothing.

Infact... it's passing the timer flags as extra data instead of flags

CreateTimer(bEnableSuperDuperJump ? 4.0:2.0, HHHTeleTimer, TIMER_FLAG_NO_MAPCHANGE);

CreateTimer(bEnableSuperDuperJump ? 4.0:2.0, HHHTeleTimer, _, TIMER_FLAG_NO_MAPCHANGE);


* Removed in latest commit.

Also I still have to release 1.52. I suppose I'll work on the telespawn thing then do that... when I have more time.
__________________

Last edited by Chdata; 01-26-2015 at 14:29.
Chdata 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 16:21.


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