New CS:GO Update broke plugin(s)?

All other Source.Python topics and issues.
decompile
Senior Member
Posts: 282
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

New CS:GO Update broke plugin(s)?

Postby decompile » Fri Oct 07, 2016 12:02 pm

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.
User avatar
satoon101
Project Leader
Posts: 2319
Joined: Sat Jul 07, 2012 1:59 am

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

Postby satoon101 » Fri Oct 07, 2016 1:01 pm

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.
Image
User avatar
D3CEPTION
Senior Member
Posts: 130
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

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

Postby D3CEPTION » Fri Oct 07, 2016 3:46 pm

I'd also be interested in which plugins are crashing..
User avatar
Doldol
Senior Member
Posts: 162
Joined: Sat Jul 07, 2012 7:09 pm
Location: Belgium

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

Postby Doldol » Fri Oct 07, 2016 6:48 pm

I can confirm SP loads without errors on Ubuntu Server 14 LTS with the new CSGO update

sp version:
Current Source.Python version: 346
decompile
Senior Member
Posts: 282
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

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

Postby decompile » Fri Oct 07, 2016 7:13 pm

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.
User avatar
satoon101
Project Leader
Posts: 2319
Joined: Sat Jul 07, 2012 1:59 am

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

Postby satoon101 » Fri Oct 07, 2016 7:49 pm

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.
Image
User avatar
Ayuto
Project Leader
Posts: 1577
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

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

Postby Ayuto » Fri Oct 07, 2016 9:38 pm

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.
User avatar
satoon101
Project Leader
Posts: 2319
Joined: Sat Jul 07, 2012 1:59 am

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

Postby satoon101 » Fri Oct 07, 2016 9:51 pm

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.
Image
User avatar
D3CEPTION
Senior Member
Posts: 130
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

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

Postby D3CEPTION » Fri Oct 07, 2016 10:14 pm

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
User avatar
Ayuto
Project Leader
Posts: 1577
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

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

Postby Ayuto » Fri Oct 07, 2016 10:22 pm

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
User avatar
D3CEPTION
Senior Member
Posts: 130
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

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

Postby D3CEPTION » Fri Oct 07, 2016 11:24 pm

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.. :(
User avatar
Ayuto
Project Leader
Posts: 1577
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

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

Postby Ayuto » Sat Oct 08, 2016 9:44 am

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++.
User avatar
L'In20Cible
Project Leader
Posts: 914
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

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

Postby L'In20Cible » Sat Oct 08, 2016 10:22 am

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.
User avatar
D3CEPTION
Senior Member
Posts: 130
Joined: Tue Jan 26, 2016 1:24 pm
Location: Switzerland

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

Postby D3CEPTION » Sat Oct 08, 2016 2:51 pm

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*)
silviogreuel
Junior Member
Posts: 6
Joined: Sat Jun 20, 2015 5:21 pm

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

Postby silviogreuel » Wed Dec 28, 2016 6:40 pm

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:
User avatar
satoon101
Project Leader
Posts: 2319
Joined: Sat Jul 07, 2012 1:59 am

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

Postby satoon101 » Wed Dec 28, 2016 6:57 pm

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.
Image
User avatar
Ayuto
Project Leader
Posts: 1577
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

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

Postby Ayuto » Wed Dec 28, 2016 9:22 pm

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

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest