Page 1 of 1

New CS:GO Update broke plugin(s)?

Posted: Fri Oct 07, 2016 12:02 pm
by decompile
Hey,

Valve released a new CS:GO update yesterday, and it looks like mine (source.python) and few other (sourcemod) plugins are not working anymore. On load they just crash the server and let the server itself restart.

If someone want to see the debug outputs, here it is:

Code: Select all

BFD: Warning: /home/csgo/core is truncated: expected core file size >= 307511296, found: 1110016.
Cannot access memory at address 0xb77c391c
Cannot access memory at address 0xb77c3918
debug.cmds:1: Error in sourced command file:
Cannot access memory at address 0xbf88f054
email debug.log to linux@valvesoftware.com


Code: Select all

CRASH: Fri Oct  7 14:00:47 CEST 2016
[New LWP 15970]
[New LWP 15972]
[New LWP 15977]
#0  0xb6f6fa5d in ?? ()
End of Source crash report


I was running it for many months, havent updated stuff over the past month, just updated the csgo server.

Re: New CS:GO Update broke plugin(s)?

Posted: Fri Oct 07, 2016 1:01 pm
by satoon101
What if you remove all SP plugins and SM plugins and just load the server with SP and SM by themselves? Which plugins cause your server to crash? I don't have time to test Linux, but my Windows CS:GO server still loads fine with SP, as does loading a few SP plugins. Those debug logs don't seem to help much.

Re: New CS:GO Update broke plugin(s)?

Posted: Fri Oct 07, 2016 3:46 pm
by D3CEPTION
I'd also be interested in which plugins are crashing..

Re: New CS:GO Update broke plugin(s)?

Posted: Fri Oct 07, 2016 6:48 pm
by Doldol
I can confirm SP loads without errors on Ubuntu Server 14 LTS with the new CSGO update

sp version:
Current Source.Python version: 346

Re: New CS:GO Update broke plugin(s)?

Posted: Fri Oct 07, 2016 7:13 pm
by decompile
Uhm, I guess i kinda formated it wrong.

SP itself is not crashing, but when I load my plugin.

I havent modified anything on my CS:GO server for months, just updating it when valve release an new update for it. Suddenly my plugin doesnt load anymore, just crashes on load with the weird debug thing.

I probably need to disable everything in my code to find out what is causing it.

And the meaning with sourcemod plugins, especially those timer plugins, which records players times on a map etc.

Re: New CS:GO Update broke plugin(s)?

Posted: Fri Oct 07, 2016 7:49 pm
by satoon101
If you figure out what it was, please post it here so we all know. If you can't sort it out, post the plugin here so we can take a look and try to help you out.

Re: New CS:GO Update broke plugin(s)?

Posted: Fri Oct 07, 2016 9:38 pm
by Ayuto
The update added a new virtual function (AddListenerGlobal) to the IGameEventManager2 class, so every call to a method after RemoveListener will likely cause a crash. The SDK has been updated already and I will trigger a new build shortly.

Re: New CS:GO Update broke plugin(s)?

Posted: Fri Oct 07, 2016 9:51 pm
by satoon101
Ah, cool, makes sense. I was going to try to test with GunGame this morning (which creates and fires custom events), but it has a bug during load that I didn't have time to fix before work.

Re: New CS:GO Update broke plugin(s)?

Posted: Fri Oct 07, 2016 10:14 pm
by D3CEPTION
im kinda wondering, how the graffiti decals are handled though. is their a wholly clientside handler for them, which never wipes them on the client until round restart etc.

but then, how do other players, who join later get those decals redrawed then on their client? or don't they?

but if the server resends the decals to players who join later, there must be serverside handler for this. in that case it would be interesting to know which features it supports and if there are any other client-server side accessiblities.

although instead of handling them serverside ( because there is no need at all to handle them serverside, besides cachelimit maybe ) valve could just handle all existing graffiti via sql request on the players official inventory and have added a custom class for graffiti within the material system (clientside) that auto-handles everything internally. ( caching, indexin,wiping etc)

so my current guess is, its handled fully clientside, with sql request to valve inventory.

idk its valve, so there could be some other possiblities, i dont want to post them all here, so maybe someone will fetch some insight about this as they come along and add those functions.. and if there is nothing to find, then it will kinda confirm my assumption i guess xD
and thanks for updating @Ayuto

Re: New CS:GO Update broke plugin(s)?

Posted: Fri Oct 07, 2016 10:22 pm
by Ayuto
I guess there are client-side decals and server-side decals.

Btw. the last update also made a few changes to the decals stuff:
https://github.com/SourceChanges/csgo/c ... 51c2359ebd

Re: New CS:GO Update broke plugin(s)?

Posted: Fri Oct 07, 2016 11:24 pm
by D3CEPTION
Ayuto wrote:I guess there are client-side decals and server-side decals.

what do you mean by that? have you found a reference that shows they are using graffiti on both sides?

looking at the changes you posted, the first thing i see is that they apply graffiti per entity within the materialsystem. so theres no independent class. i guess thats valve like behaviour. they also use a False bool now in the roundend wipe-function. this is all clientside btw.

but is there a way to look at the server.txt changes on github? all i can view is the raw file as it errors me tgat its too large.. :(

Re: New CS:GO Update broke plugin(s)?

Posted: Sat Oct 08, 2016 9:44 am
by Ayuto
Well, you can create client-side decals using temp entities, but I know there are also point entities to create decals. I haven't taken a look at how they work, but you can remove them and that will probably remove the decal on the client. But I'm really just guessing. I haven't done any research and haven't done a lot with decals.

To show the diff of the server.txt you need to clone the repository, open a git shell and run one of the two commands:

Code: Select all

git diff d5192c0 -- server.txt >> server.diff

Code: Select all

git diff d5192c0 complete.diff

The former creates a *.diff file only for the server.txt and the latter for all *.txt files. You can then open the *.diff file with Notepad++.

Re: New CS:GO Update broke plugin(s)?

Posted: Sat Oct 08, 2016 10:22 am
by L'In20Cible
If this still work the same as it used to few years ago, info_decal was only a wrapper around the temp entities and removing the entity server-side had no effect on what was rendered client-side. The only way to remove decals was to execute r_cleardecals (or similar name) on the client to clear all applied decals.

EDIT: I just looked over the SDK, and the entity is infodecal no underscore and it only delegate the call to ITempEntsSystem::BSPDecal upon activation.

Re: New CS:GO Update broke plugin(s)?

Posted: Sat Oct 08, 2016 2:51 pm
by D3CEPTION
the new server decalclass is "cfe_player_decal" -> using 1 edict per decal
the client decalclass "CTEPlayerDecal" is also expanded. my assumption: its used while players are in their spray menu ( before the decal is placed on the server)

after its placed, the client requests a signature and fadetime,unieuqid,traceid etc from valve inventory servers. so it might be worth tempering with those from the server:

Code: Select all

class CFEPlayerDecal
{
public:
 
   char __buf_0x00[0xF68]; // 0x0
   int m_nUniqueID; // 0xF68
   int m_unAccountID; // 0xF6C
   int m_unTraceID; // 0xF70
   int m_rtGcTime; // 0xF74
   Vector m_vecEndPos; // 0xF78
   Vector m_vecStart; // 0xF84
   Vector m_vecRight; // 0xF90
   Vector m_vecNormal; // 0xF9C
   int m_nPlayer; // 0xFA8
   int m_nEntity; // 0xFAC
   int m_nHitbox; // 0xFB0
   int m_nTintID; // 0xFB4
   float m_flCreationTime; // 0xFB8
   int m_nVersion; // 0xFBC
 
}; // size=0xFC0
 
class CTEPlayerDecal
{
public:
 
   char __buf_0x00[0x20]; // 0x0
   int m_nPlayer; // 0x20
   Vector m_vecOrigin; // 0x24
   Vector m_vecStart; // 0x30
   Vector m_vecRight; // 0x3C
   int m_nEntity; // 0x48
   int m_nHitbox; // 0x4C
 
}; // size=0x50

full log:


gamerule is also added, storing some sort of signature, that is applied to the serverdecals property?
FE_PlayerDecal(CCSGameRules::ServerPlayerDecalData_t const&, std::string const&)
+t CCSGameRules::ServerPlayerDecalData_t::InitFromMsg(CCSUsrMsg_PlayerDecalDigitalSignature const&)
+t CServerGameClients::ClientSvcUserMessage(edict_t*, int, int, unsigned int, void const*)

server can call:
+t CEntityFactory<CFEPlayerDecal>::GetEntitySize()
+t CEntityFactory<CFEPlayerDecal>::Create(char const*)
+t CEntityFactory<CFEPlayerDecal>::Destroy(IServerNetworkable*)


something else i noticed was added in the updates: capture states are added?:
+t CapturePlayerState(MLPlayerState*, CCSPlayer*)
+t CaptureWeaponState(MLWeaponState*, CWeaponCSBase*, int, CCSPlayer*)

Re: New CS:GO Update broke plugin(s)?

Posted: Wed Dec 28, 2016 6:40 pm
by silviogreuel
Wrong clantag and mvps offset?

Just a simple plugin to write it to console doesn't seems to work:

Syntax: Select all

from commands.say import SayCommand
from cvars import ConVarFlags
from cvars.public import PublicConVar
from plugins.info import PluginInfo
from players.entity import Player

info = PluginInfo()
info.name = "clantag"
info.author = "Silvio Greuel <silviogreuel@gmail.com>"
info.version = "0.0.1"
info.basename = "clantag"
info.variable = "{}_version".format(info.basename)
info.convar = PublicConVar(info.variable, info.version, "{} Version".format(info.name), ConVarFlags.NONE)

@SayCommand(['!clan'])
def porra_cmd(command, playerindex, teamonly):
player = Player(playerindex)
print(player.clan_tag)

@SayCommand(['!mvps'])
def porra_cmd(command, playerindex, teamonly):
player = Player(playerindex)
print(player.mvps)


Sourcemod:
https://github.com/alliedmodders/source ... go.txt#L51

Sourcepython:
https://github.com/Source-Python-Dev-Te ... er.ini#L63

And, where can I learn how to build sourcepython? to try some stuff before asking...

Thanks and great work :thumbsup:

Re: New CS:GO Update broke plugin(s)?

Posted: Wed Dec 28, 2016 6:57 pm
by satoon101
First, please use [python]<code>[/python] when posting Python code on these forums. I went ahead and updated your post this time to add the syntax blocks.

Second, I'm not sure if it was a copy/paste error or not, but your first 'print' line is not indented correctly, which would cause a SyntaxError when trying to load your plugin. It looks like that line uses a <tab> whereas the rest of the plugin uses 4 space indentation. It would help, if you had an error, to post it here.

Also, if you are on Windows 10, using 'print' will not do anything, as we are still trying to figure out and fix that issue. Instead, use:

Syntax: Select all

from core import echo_console

...

echo_console(player.clan_tag)
echo_console(str(player.mvps))



If you want to build Source.Python yourself, you can use the Build.sh or Build.bat file in the src directory. You might have to install some prerequisites, which will depend upon your Operating System.

Thank you for the information on the offsets. We will look into that when we get the opportunity.

Re: New CS:GO Update broke plugin(s)?

Posted: Wed Dec 28, 2016 9:22 pm
by Ayuto
Just added some quick build instructions:
https://github.com/Source-Python-Dev-Te ... bb98891cac

I hope I didn't forget anything. :smile:


Edit:

Also fixed the offsets:
https://github.com/Source-Python-Dev-Te ... c30137139c

The reason why they differ is because they use the offset starting from the beginning of the SetClanTag method. Our offset starts at the player address.


Edit2:

Added workaround for sys.stdout if it's None:
https://github.com/Source-Python-Dev-Te ... 1f69bc5ec2