Raised This Month: $32 Target: $400
 8% 

GetSteamAccountID crash


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 07-27-2017 , 11:01   GetSteamAccountID crash
Reply With Quote #1

PHP Code:
void Extension::OnClientPutInServer(int client//client is always valid here
{
        
IGamePlayer *iPlayer playerhelpers->GetGamePlayer(client);
        if(
iPlayer && iPlayer->IsConnected()) {
            
unsigned int steamid iPlayer->GetSteamAccountID();
            ... 
I get crashes at this point, stack trace gives me this result:
Quote:
1 engine_srv.so + 0x1cdbd1
eip = 0xf5f3dbd1 esp = 0xffc48230 ebp = 0xffc48248
Found by: previous frame's frame pointer
2 sourcemod.2.css.so + 0x3dc1c (CPlayer::GetSteamAccountID(bool))
eip = 0xec8f8c1c esp = 0xffc48250 ebp = 0x129005b4
Found by: previous frame's frame pointer
3 extension.ext.2.css.so + 0x10bda
Shall I add extra checks to prevent crashes, or is there a bug in this function and I can do nothing about it?

PS it's a rare occasion, happens about 1/10000 calls

Last edited by kadet.89; 07-27-2017 at 12:11.
kadet.89 is offline
Send a message via Skype™ to kadet.89
psychonic

BAFFLED
Join Date: May 2008
Old 07-27-2017 , 13:19   Re: GetSteamAccountID crash
Reply With Quote #2

I believe you need to be checking IsAuthenticated as well.
psychonic is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 07-28-2017 , 03:00   Re: GetSteamAccountID crash
Reply With Quote #3

Thank's, I'll try it
kadet.89 is offline
Send a message via Skype™ to kadet.89
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 19:07.


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