DeadSwimek / cs2-vip

VIP System
25 stars 7 forks source link

BUG: VIP getting kicked on "ReservedMethod": 2 #4

Closed rabi07 closed 7 months ago

rabi07 commented 7 months ago

When the server is full ,then VIP trying to join on the first time he connected he got kicked by server, and one non-VIP also got kicked at the same time. if he tries to join again server is getting crashed ,

Logs :

`This is usually a symptom of a general performance problem such as thread starvation. Removing Steam Net Connection for 115.63941, handle #1099633018 -mohsfAR kicked by Console ('VIP Access!') SV: Disconnect client '-mohsfAR' from server(39): NETWORK_DISCONNECT_KICKED Client 1 '-mohsfAR' signon state SIGNONSTATE_FULL -> SIGNONSTATE_NONE Server is hibernating ResetGameConVarsToDefaults SV: Dropped client '-mohsfAR' from server(39): NETWORK_DISCONNECT_KICKED CloseSteamNetConnection handle #1575380257 (userdata 1) Disassociating NetChan -mohsfAR [-1] (unknown) from Steam Net Connection handle #1575380257 (userdata 1) Summary of connection [#1575380257 UDP steamid:76561198841425249@39.960]: End-to-end connection: connected Current rates: Sent: 0.0 pkts/sec 0.0 K/sec Recv: 0.0 pkts/sec 0.0 K/sec Ping:60ms Max latency variance: ???ms Est avail bandwidth: 768.0KB/s
Bytes buffered: 0 Lifetime stats: Totals Sent: 59 pkts 47,186 bytes Recv: 203 pkts 11,132 bytes Recv w seq: 202 pkts Dropped : 0 pkts 0.00% OutOfOrder: 0 pkts 0.00% OOOFixed : 0 pkts 0.00% Duplicate : 0 pkts 0.00% SeqLurch : 0 pkts 0.00% Ping histogram: (20 total samples) 0-25 25-50 50-75 75-100 100-125 125-150 150-200 200-300 300+ 0 0 20 0 0 0 0 0 0 0.0% 0.0% 100.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% Ping distribution: 5th 50th 75th 95th 59ms 60ms 60ms 65ms No connection quality distribution available. (0 measurement intervals) Latency variance histogram not available No rate stats received from remote host No lifetime stats received from remote host

[#1575380257 UDP steamid:76561198841425249@39.3960] closed by app, entering linger state (2039) NETWORK_DISCONNECT_KICKED Removing Steam Net Connection for 39.960, handle #1575380257 Accepting Steam Net connection #460737892 UDP steamid:76561198841425249@39681 SteamNetworkingSockets lock held for 21.8ms. (Performance warning.) AcceptConnection,BFinishCryptoHandshake,FinalizeLocalCrypto,SendUDPacket This is usually a symptom of a general performance problem such as thread starvation. Sending S2C_CHALLENGE [0 auth 3] to 39.6281 Receiving C2S_CONNECT [protocol 13973 0 auth 3] from :3681 CNetworkGameServerBase::ConnectClient( name='-mohsfAR', remote='39.6281' ) Creating NetChan for user 1 '-mohsfAR' @ 39.62.3681 Associating NetChan -mohsfAR 39.623681[1] (39.681) with Steam Net Connection handle #460737892 (userdata 1) CServerSideClientBase::Connect( name='-mohsfAR', userid=1, fake=0, chan->addr=:3681 ) Client 1 '-mohsfAR' signon state SIGNONSTATE_NONE -> SIGNONSTATE_CONNECTED Server waking up from hibernation Sending S2C_CONNECTION to 39.62.681 [addons:''] Client #1 "-mohsfAR" connected @ 39.681 Sending S2C_CONNECTION to 39.681 [addons:''] Sending S2C_CONNECTION to 39.6681 [addons:''] ClientPutInServer create new player controller [-mohsfAR] Client 1 '-mohsfAR' setting rate to 786432 Client 1 '-mohsfAR' signon state SIGNONSTATE_CONNECTED -> SIGNONSTATE_NEW Client 1 '-mohsfAR' signon state SIGNONSTATE_NEW -> SIGNONSTATE_PRESPAWN Client 1 '-mohsfAR' signon state SIGNONSTATE_PRESPAWN -> SIGNONSTATE_SPAWN SV: "-mohsfAR<1><[U:1:881159521]><>" STEAM USERID validated Client 1 '-mohsfAR' signon state SIGNONSTATE_SPAWN -> SIGNONSTATE_FULL 11:56:14 [EROR] (cssharp:Core) Error invoking callback System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at VIP.VIP.Give_Values(CCSPlayerController controller) in C:\Users\ondra\Desktop\CS2 Pluginy\VIPGUNS Public\VIP.cs:line 331 at VIP.VIP.OnClientSpawn(EventPlayerSpawn event, GameEventInfo info) in C:\Users\ondra\Desktop\CS2 Pluginy\VIPGUNS Public\Hooks.cs:line 218 at InvokeStub_GameEventHandler1.Invoke(Object, Object, IntPtr*) at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) --- End of inner exception stack trace --- at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Delegate.DynamicInvokeImpl(Object[] args) at CounterStrikeSharp.API.Core.FunctionReference.<>c__DisplayClass3_0.<.ctor>b__0(fxScriptContext* context) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 82 SV: Sending full update to client -mohsfAR (reason: initial update) -mohsfAR :3681[1]: NetChan Setting Timeout to 20.00 seconds VIP Plugin - Player -mohsfAR (76561198841425249) have VIP. Remaining time of VIP 3d 23:22:00 ./game/cs2.sh: line 118: 40 Segmentation fault (core dumped) ${STEAM_RUNTIME_PREFIX} ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"

DeadSwimek commented 7 months ago

Maybe fixed in new releases.

rabi07 commented 7 months ago

@DeadSwimek

Hey its not crashing anymore but ,VIP getting kicked along with non VIP ,when he Joined As VIP

Client 0 'Savage' signon state SIGNONSTATE_NONE -> SIGNONSTATE_CONNECTED Sending S2C_CONNECTION to 51981 [addons:''] Client #0 "Savage" connected @:51981 Sending S2C_CONNECTION to51981 [addons:''] ClientPutInServer reconnecting player controller [Savage] Client 0 'Savage' setting rate to 786432 Client 0 'Savage' signon state SIGNONSTATE_CONNECTED -> SIGNONSTATE_NEW Client 0 'Savage' signon state SIGNONSTATE_NEW -> SIGNONSTATE_PRESPAWN Client 0 'Savage' signon state SIGNONSTATE_PRESPAWN -> SIGNONSTATE_SPAWN SV: "Savage<0><[U:1:435713782]><>" STEAM USERID validated Client 0 'Savage' signon state SIGNONSTATE_SPAWN -> SIGNONSTATE_FULL 16:24:35 [EROR] (cssharp:Core) Error invoking callback System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at VIP.VIP.Give_Values(CCSPlayerController controller) in C:\Users\ondra\Desktop\CS2 Pluginy\VIPGUNS Public\VIP.cs:line 357 at VIP.VIP.OnClientSpawn(EventPlayerSpawn event, GameEventInfo info) in C:\Users\ondra\Desktop\CS2 Pluginy\VIPGUNS Public\Hooks.cs:line 256 at InvokeStub_GameEventHandler`1.Invoke(Object, Object, IntPtr) at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr args, BindingFlags invokeAttr) --- End of inner exception stack trace --- at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr args, BindingFlags invokeAttr) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Delegate.DynamicInvokeImpl(Object[] args) at CounterStrikeSharp.API.Core.FunctionReference.<>c__DisplayClass3_0.<.ctor>b__0(fxScriptContext context) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 82 SV: 'Savage' (tick 191032) CQ: catching up - trying to trim queue containing 0 commands SV: Sending full update to client Savage (reason: initial update) Savage :51981[1]: NetChan Setting Timeout to 20.00 seconds VIP Plugin - Player Savage (76561198395979510) have VIP. Remaining time of VIP 1157d 18:01:06 Savage kicked by Console ('VIP Access!') SV: Disconnect client 'Savage' from server(39): NETWORK_DISCONNECT_KICKED Client 0 'Savage' signon state SIGNONSTATE_FULL -> SIGNONSTATE_NONE SV: Dropped client 'Savage' from server(39): NETWORK_DISCONNECT_KICKED CloseSteamNetConnection handle #2941179979 (userdata 1)

DeadSwimek commented 7 months ago

Try in new version please, not tested.

DeadSwimek commented 7 months ago

https://github.com/DeadSwimek/cs2-vip/releases/tag/1.1.4

rabi07 commented 7 months ago

Tested With Server Slot 2 and 2 VIP and 1 Non VIP player.

When Server has 1 Player ,then Non-VIP try o join ,its say Server is FULL When Server has 1 Non-VIP Player ,then 2 x VIP Player try to join ,Only One Of them is able to join but Non VIP Player don't get kicked ,Other VIP sees Server is FULL .

"R A J U<1><[U:1:231761301]>" ChangeTeam() CTMDBG , team 0, req team 2 willSwitch 0, 155.80 "R A J U<1><[U:1:231761301]>" SwitchTeam => ChangeBasePlayerTeamAndPendingTeam =3 , req team 3 155.80 "Savage<0><[U:1:435713782]>" SwitchTeam => ChangeBasePlayerTeamAndPendingTeam =2 , req team 2 155.80 "Savage<0><[U:1:435713782]>" OnPreResetRound => CTMDBG, team 2 will switch 0 155.80 "R A J U<1><[U:1:231761301]>" OnPreResetRound => CTMDBG, team 3 will switch 0 155.80 This plugins is created by DeadSwim / https://madgames.eu VIP Plugins - Warmup dosen't real Round, set on 0. VIP Plugins - Added new round count, now is Yellow 1. SV: 'R A J U' (tick 9972) CQ: catching up - trying to trim queue containing 1 commands Client 0 'Savage' signon state SIGNONSTATE_SPAWN -> SIGNONSTATE_FULL 16:17:57 [EROR] (cssharp:Core) Error invoking callback System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. at VIP.VIP.Give_Values(CCSPlayerController controller) in C:\Users\ondra\Desktop\CS2 Pluginy\VIPGUNS Public\VIP.cs:line 433 at VIP.VIP.OnClientSpawn(EventPlayerSpawn event, GameEventInfo info) in C:\Users\ondra\Desktop\CS2 Pluginy\VIPGUNS Public\Hooks.cs:line 257 at InvokeStub_GameEventHandler`1.Invoke(Object, Object, IntPtr) at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr args, BindingFlags invokeAttr) --- End of inner exception stack trace --- at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr args, BindingFlags invokeAttr) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Delegate.DynamicInvokeImpl(Object[] args) at CounterStrikeSharp.API.Core.FunctionReference.<>c__DisplayClass3_0.<.ctor>b__0(fxScriptContext context) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 82 SV: 'Savage' (tick 10041) CQ: catching up - trying to trim queue containing 0 commands SV: Sending full update to client Savage (reason: initial update) Savage 509[1]: NetChan Setting Timeout to 20.00 seconds VIP Plugin - Player Savage (76561198395979510) have VIP. Remaining time of VIP 1156d 18:07:43

DeadSwimek commented 7 months ago

Could you please describe your problem a little better?

You have a two slot server where two VIP players are trying to join. VIP players join but Non-VIP player won't kick it?

rabi07 commented 7 months ago

yes you are correct.

Non ViP player won't get kicked .

Test 1 :

When 1 VIP player is there in Server with Server Slot 2 If Non VIP trying to Join he will see " Server is full "

Test 2 :

When 1 Non VIP is there in Server with Server Slot 2 If First VIP player trying to Join he is able to join Aslo Non VIP player won't get kicked. He will still in server.

Now , If Second VIP player try to join the server , It will say "Server is full " Non VIP player won't get kicked ( In sever currently 1 ViP , 1 Non VIp player available with 2 slot server )

Hope i can describe. 🥺

shaikhnedab commented 7 months ago

more finding.

  1. Our test server had 2 slots. 1 non-VIP was playing on the server but when another non-VIP player joined, server kicked both players. Reserved slot method 2
DeadSwimek commented 7 months ago

Fixed

rabi07 commented 7 months ago
SV:  "Kurooo<0><[U:1:314026782]><>" STEAM USERID validated
Client 0 'Kurooo' signon state SIGNONSTATE_SPAWN -> SIGNONSTATE_FULL
SV:  Sending full update to client Kurooo (reason:  initial update)
      Kurooo 103.102.120.170:64318[1]:  NetChan Setting Timeout to 20.00 seconds
VIP Plugin - Player Kurooo (76561198274292510) is not VIP.
"Kurooo<0><[U:1:314026782]><Unassigned>" ChangeTeam() CTMDBG , team 0, req team 2 willSwitch 0, 202.61 
"Kurooo<0><[U:1:314026782]><TERRORIST>" OnPreResetRound => CTMDBG, team 2  will switch 0 202.61 
This plugins is created by DeadSwim / https://madgames.eu
VIP Plugin - *GAMERULES* Warmup dosen't real Round, set on 0.
VIP Plugin - Added new round count, now is 1.
SV: 'Kurooo' (tick 12969) CQ:  catching up - trying to trim queue containing 0 commands
Accepting Steam Net connection #616676787 UDP steamid:76561198395979510@:60473
SteamNetworkingSockets lock held for 14.2ms.  (Performance warning.)  AcceptConnection,BFinishCryptoHandshake,FinalizeLocalCrypto,SendUDPacket
This is usually a symptom of a general performance problem such as thread starvation.
Sending S2C_CHALLENGE [0 auth 3] to :60473
Receiving C2S_CONNECT [protocol 13974 0 auth 3] from .118:60473
CNetworkGameServerBase::ConnectClient( name='Savage', remote='.118:60473' )
Sending RejectConnection to : 135: NETWORK_DISCONNECT_REJECT_SERVERFULL
NETWORK_DISCONNECT_REJECT_SERVERFULL to :60473: Cannot get free client
1 clients:
           0    00:11   36    0     active 786432 :64318 'Kurooo'
[#616676787 UDP steamid:76561198395979510@11:60473] closed by peer (1000): CloseSocket
Steam Net connection #616676787 UDP steamid:76561198395979510@:60473 closed by peer, reason 1000: CloseSocket
CloseSteamNetConnection handle #616676787 (userdata -1)
Summary of connection [#616676787 UDP steamid:76561198395979510@8:60473]:
    End-to-end connection: closed by remote host, reason code 1000.  (CloseSocket)
        Current rates:
            Sent:   0.0 pkts/sec   0.0 K/sec
            Recv:   0.0 pkts/sec   0.0 K/sec
            Ping:49ms    Max latency variance: ???ms
            Est avail bandwidth: 256.0KB/s  
            Bytes buffered: 0
        Lifetime stats:
            Totals
                Sent:          4 pkts             502 bytes
                Recv:          4 pkts           1,351 bytes
                Recv w seq:          2 pkts
                Dropped   :          0 pkts   0.00%
                OutOfOrder:          0 pkts   0.00%
                OOOFixed  :          0 pkts   0.00%
                Duplicate :          0 pkts   0.00%
                SeqLurch  :          0 pkts   0.00%
            No ping distribution available.  (2 samples)
            No connection quality distribution available.  (0 measurement intervals)
            Latency variance histogram not available
        No rate stats received from remote host
        No lifetime stats received from remote host

SteamNetworkingSockets lock held for 19.2ms.  (Performance warning.)  CloseConnection,SendUDPacket
This is usually a symptom of a general performance problem such as thread starvation.
Removing Steam Net Connection for:60473, handle #616676787