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

Solved Unregistering the hooks outside their functions might cause a crash


Post New Thread Reply   
 
Thread Tools Display Modes
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-29-2022 , 16:25   Re: Server Crash with exit code 139
Reply With Quote #41

Quote:
Originally Posted by Shadows Adi View Post
https://www.diffchecker.com/RT5pL1DX

Here you have some changes by me, try the code from right side ( modified code ) by yourself and tell the results. I could have tried it, but I am lazy.
You barely changed anything, you just added some checks which won't help fix the real issue at all


and btw

when setting paramters for a task the length should be sizeof TheArray, and not sizeof TheArray-1
__________________
@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
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 01-29-2022 , 16:32   Re: Server Crash with exit code 139
Reply With Quote #42

Quote:
Originally Posted by Natsheh View Post
You barely changed anything, you just added some checks which won't help fix the real issue at all


and btw

when setting paramters for a task the length should be sizeof TheArray, and not sizeof TheArray-1
But you set only the first sub-string from array.
__________________


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-29-2022 , 16:35   Re: Server Crash with exit code 139
Reply With Quote #43

Quote:
Originally Posted by Shadows Adi View Post
But you set only the first sub-string from array.
which line are you talking about?
__________________
@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
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-29-2022 , 16:48   Re: Server Crash with exit code 139
Reply With Quote #44

i think i've found the problem

its caused by set_task

g_tasksMngr.registerTask(plugin, iFunc, UTIL_ReadFlags(temp), params[3], base, params[5], get_amxaddr(amx, params[4]), params[7]);

the array parameter of set_task must be global or Static if i am not wrong!?
__________________
@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-29-2022 at 16:55.
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-29-2022 , 16:49   Re: Server Crash with exit code 139
Reply With Quote #45

Quote:
Originally Posted by Natsheh View Post
which line are you talking about?
6354:
Code:
                    new aWinner[2]; aWinner[0] = 3;
                if(task_exists(TASK_END_ROUND))                     remove_task(TASK_END_ROUND);
                set_task(ROUND_TIME_LEFT, "task_end_the_round", TASK_END_ROUND, aWinner, charsmax(aWinner));
__________________


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-29-2022 , 17:09   Re: Server Crash with exit code 139
Reply With Quote #46

Quote:
Originally Posted by Shadows Adi View Post
6354:
Code:
                    new aWinner[2]; aWinner[0] = 3;
                if(task_exists(TASK_END_ROUND))                     remove_task(TASK_END_ROUND);
                set_task(ROUND_TIME_LEFT, "task_end_the_round", TASK_END_ROUND, aWinner, charsmax(aWinner));
it doesn't matter you should always use the sizeof the array.
__________________
@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-29-2022 , 19:31   Re: Server Crash with exit code 139
Reply With Quote #47

Quote:
Originally Posted by DJEarthQuake View Post
sending commands as a task
You think? Progress is progress ;)
__________________
DJEarthQuake is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 01-30-2022 , 02:49   Re: Server Crash with exit code 139
Reply With Quote #48

Quote:
Originally Posted by Natsheh View Post

the array parameter of set_task must be global or Static if i am not wrong!?
Nope, it works as intended with a new declared array: https://github.com/ShadowsAdi/CSGORe...ma#L1825-L1830

You can add debug into AmxModX core, when a task is created, to get the var address of the param[4].
__________________


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 02-11-2022 , 11:08   Re: Server Crash with exit code 139
Reply With Quote #49

Problem solved, fixed by unregistering the hooks from within their functions .

Why is this happening ?

I've no clue but it seems its an amxmodx weird behavior.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 02-11-2022 at 11:10.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Reply


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

Forum Jump


All times are GMT -4. The time now is 14:12.


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