SA-MP Forums

Go Back   SA-MP Forums > SA-MP > Bug Reports

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 16/01/2019, 08:36 PM   #1
Graber
Banned
 
Join Date: Mar 2013
Location: Germany
Posts: 107
Reputation: 147
Default Server crashes when kicking a player inside OnPlayerStateChange

When using Kick(playerid) inside OnPlayerStateChange, and the newstate is PLAYER_STATE_DRIVER, the server crashes:

0.3.DL Windows:
Code:
[22:11:08] [debug] Server crashed due to an unknown error
[22:11:08] [debug] Native backtrace:
[22:11:08] [debug] #0 004874d1 in ?? () in samp-server.exe
[22:11:08] [debug] #1 004950b3 in ?? () in samp-server.exe
[22:11:08] [debug] #2 777fb8d0 in ?? () in C:\WINDOWS\SYSTEM32\ntdll.dll
After making some internal debugging, it seems this happens because the server tries to use the player's pointer after calling the callback, but the pointed memory was already freed because the player was kicked.
Graber is offline   Reply With Quote
 

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kicking player Crackerz Scripting Help 4 13/07/2017 02:23 PM
kicking player CH | FuDo Scripting Help 6 04/08/2013 09:41 PM
[Help] Kicking a player Maxips2 Scripting Help 3 28/10/2012 11:49 AM
kicking player during... P<3TS Scripting Help 13 03/08/2012 06:45 AM
All server player crashes. Reamis Help Archive 1 10/07/2009 03:15 PM


All times are GMT. The time now is 05:32 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.