Raised This Month: $51 Target: $400
 12% 

Solved Unregistering the hooks outside their functions might cause a crash


Post New Thread Reply   
 
Thread Tools Display Modes
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 01-27-2022 , 05:49   Re: Server Crash with exit code 139
Reply With Quote #21

Quote:
Originally Posted by Natsheh View Post
Also isn't there a way to check if a variable has a location in memory?
http://www.amxmodx.org/api/amxmodx/get_var_addr
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-27-2022 , 14:46   Re: Server Crash with exit code 139
Reply With Quote #22

Quote:
Originally Posted by fysiks View Post
Change aWinner to a global variable so that you know that that memory space will exist (i.e. remain allocated) when the task actually executes. I'm not 100% sure about this but local variables that are not static, IIRC, can be deallocated after the function finishes execution which happens before the task actually ends up executing.
Code:
L 01/27/2022 - 18:48:17: JAILBREAK Specialday 'Snowball Day' has started!
L 01/27/2022 - 18:48:17: World triggered "Round_Start"
L 01/27/2022 - 18:48:19: "Natsheh<5><STEAM_0:0:26622031><TERRORIST>" committed suicide with "world"
L 01/27/2022 - 18:48:19: "[POD]Fragnatic (98)<6><BOT><TERRORIST>" committed suicide with "world"
L 01/27/2022 - 18:48:19: JAILBREAK Specialday 'Snowball Day' has ended!
Jb_day_Ended Called
dayid pushed
(8)U_FM_FW_THINK_PRE: 1
(10)U_FM_FW_EMITSOUND_PRE: 1
(3)U_FM_FW_SETMODEL_PRE: 1
(7)U_FM_FW_TOUCH_POST: 1
(4)U_FW_SENDAUDIO_MSG: 1
(5)U_FW_TXTMSG_MSG: 1
(11)U_FW_CUR_WEAPON: 1
(1)U_FW_CUR_WEAPON: 1
(2)U_FW_CUR_WEAPON: 1
end: 0
L 01/27/2022 - 18:48:19: "[P*D]Dredd (99)<7><BOT><CT>" committed suicide with "world"
aWinner: 3, aWinner: 3, taskid: 77
L 01/27/2022 - 18:48:24: JAILBREAK Guards win!
L 01/27/2022 - 18:48:24: FATAL ERROR (shutting down): New message started when msg '8' has not been sent yet
FATAL ERROR (shutting down): New message started when msg '8' has not been sent yet
container@pterodactyl~ Server marked as offline...

[Pterodactyl Daemon]: ---------- Detected server process in a crashed state! ----------
[Pterodactyl Daemon]: Exit code: 255
[Pterodactyl Daemon]: Out of memory: false
[Pterodactyl Daemon]: Updating process configuration files...
[Pterodactyl Daemon]: Ensuring file permissions are set correctly, this could take a few seconds...
container@pterodactyl~ Server marked as starting...
[Pterodactyl Daemon]: Pulling Docker container image, this could take a few minutes to complete...
[Pterodactyl Daemon]: Finished pulling Docker container image
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 01-27-2022 , 14:50   Re: Server Crash with exit code 139
Reply With Quote #23

Time the messages right.
Code:
New message started when msg '8' has not been sent yet
__________________

Last edited by DJEarthQuake; 01-27-2022 at 15:01.
DJEarthQuake is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 01-27-2022 , 16:04   Re: Server Crash with exit code 139
Reply With Quote #24

Line 894 in fw_touch_post()
PHP Code:
//Chill him!
sw_ChillPlayer(id); 
Code:
sw_ChillPlayer(id) {
  //Add this check, you can also check if the entity is a valid player
    if(!is_user_connecte(id))
        return
    //Set glow     set_pev(id, pev_renderfx, kRenderFxGlowShell);     set_pev(id, pev_rendermode, kRenderNormal);     set_pev(id, pev_rendercolor, {0.0, 206.0, 209.0});     set_pev(id, pev_renderamt, 25.0);         //Set chill state     set_pev(id, USER_CHILLED, true);         //Retrieve player old maxspeed     new Float:g_user_mspeed;     pev(id, pev_maxspeed, g_user_mspeed);     set_pev(id, USER_DEF_MAXSPEED, g_user_mspeed);         //Calculate his new maxspeed     new Float:g_chillyspeed = (get_pcvar_float(g_cvar_snowball_chill_speed)) * g_user_mspeed;         //Set his new maxspeed     set_pev(id, pev_maxspeed, g_chillyspeed);         //Add blue fade on players screen     message_begin(MSG_ONE, g_msgScreenFade,_,id);     write_short(floatround(4096.0 * get_pcvar_float(g_cvar_sb_chill_duration))); // duration     write_short(floatround(3072.0 * get_pcvar_float(g_cvar_sb_chill_duration))); // hold time     write_short(0x0000); // flags     write_byte(0); // red     write_byte(206); // green     write_byte(209); // blue     write_byte(100); // alpha     message_end(); }

Same check for sw_UnChill

Or you can send the message through MSG_ONE_UNRELIABLE
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-27-2022 , 23:24   Re: Server Crash with exit code 139
Reply With Quote #25

Quote:
Originally Posted by Natsheh View Post
Doesn't the set_task copy the array(parameters) into a new memory location? And reuse it in the task callfunction, then when the callfunction finish executing the memory will be freed?
That would seem reasonable, I didn't look at the source to be sure.
__________________
fysiks is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-28-2022 , 01:36   Re: Server Crash with exit code 139
Reply With Quote #26

Quote:
Originally Posted by DJEarthQuake View Post
Time the messages right.
Code:
New message started when msg '8' has not been sent yet
The error still occurs if you just take look at whats should the task id should be.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 01-28-2022 at 01:36.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 01-28-2022 , 08:56   Re: Server Crash with exit code 139
Reply With Quote #27

The server is telling you it is getting 2 message begins and should have gotten a message end before getting the next message begin. Have you tried altering msg_one to message_one_unreliable yet? Are there other messages besides what @Adi posted up please? Could always make a log before each message during and after if you want to know 'who done it'?
__________________
DJEarthQuake is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-28-2022 , 09:49   Re: Server Crash with exit code 139
Reply With Quote #28

Yeah this isn't the problem the problem actually relies in round end, its called multiple times for some reason causing memory shifting, which ruins everything.


As you see here
aWinner: 3, aWinner: 3, taskid: 77

This taskid is invalid and it should be something else.

But i don't think its possible to see how's the function is getting called, can't output trace result.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 01-28-2022 at 09:53.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 01-28-2022 , 10:27   Re: Server Crash with exit code 139
Reply With Quote #29

Quote:
Originally Posted by Natsheh View Post
Yeah this isn't the problem the problem actually relies in round end, its called multiple times for some reason causing memory shifting, which ruins everything.


As you see here
aWinner: 3, aWinner: 3, taskid: 77

This taskid is invalid and it should be something else.

But i don't think its possible to see how's the function is getting called, can't output trace result.
Leave the source codes with your debug messages.
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 01-28-2022 , 11:40   Re: Server Crash with exit code 139
Reply With Quote #30

Quote:
Originally Posted by Natsheh View Post
But i don't think its possible to see how's the function is getting called, can't output trace result.
Why not?
Quote:
Can't never did a damn thing!
__________________
DJEarthQuake is offline
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 01:37.


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