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

Runtime error 3: stack error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PTE
Junior Member
Join Date: Aug 2018
Old 10-04-2018 , 12:31   Runtime error 3: stack error
Reply With Quote #1

Hello! I'm having error on my server that causes a lot of crushes.
The error is:
Quote:
L 10/03/2018 - 23:22:17: Start of error session.
L 10/03/2018 - 23:22:17: Info (map "jail_especial_v2") (file "addons/amxmodx/logs/error_20181003.log")
L 10/03/2018 - 23:22:17: [AMXX] Displaying debug trace (plugin "jbe_core.amxx", version "1.1.01c")
L 10/03/2018 - 23:22:17: [AMXX] Run time error 3: stack error
L 10/03/2018 - 23:22:17: [AMXX] [0] jbe_core.sma::Show_ChooseTeamMenu (line 2060)
L 10/03/2018 - 23:22:17: [AMXX] [1] jbe_core.sma::Message_ShowMenu (line 5323)
[1] lines with 5323 line:
Code:
public Message_ShowMenu(iMsgId, iMsgDest, iReceiver)
{
	switch(get_msg_arg_int(1))
	{
		case ShowMenu_TeamMenu, ShowMenu_TeamSpectMenu:
		{
			Show_ChooseTeamMenu(iReceiver, 0); // 5323
			return PLUGIN_HANDLED;
		}
		case ShowMenu_ClassMenu, ShowMenu_IgTeamMenu, ShowMenu_IgTeamSpectMenu: return PLUGIN_HANDLED;
	}
	return PLUGIN_CONTINUE;
}
So this func calls the Show_ChooseTeamMenu, so here's the code, btw ye this function has 2060line:
Code:
Show_ChooseTeamMenu(id, iType)
{
	if(jbe_menu_blocked(id)) return PLUGIN_HANDLED; // 2060
	jbe_informer_offset_up(id);
	static szMenu[280], iKeys, iLen;
	iLen = formatex(szMenu, charsmax(szMenu), "\d[lalala] \rВыбор команды^n\d[lalala] \yБаланс: \w3 \dзаключенных, \w1 \dохранник^n^n");
	if(g_iUserTeam[id] != 1)
	{
		iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\d[1] \y~\w %L \r[%d]^n", id, "JBE_MENU_TEAM_PRISONERS", g_iPlayersNum[1]);
		iKeys |= (1<<0);
	}
	else iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\d[1] \y~\w \d%L \r[%d]^n", id, "JBE_MENU_TEAM_PRISONERS", g_iPlayersNum[1]);
	if(!g_BlockMenu && IsNotSetBit(g_iBitUserBlockedGuard, id) && g_iUserTeam[id] != 2 && (floatround(float(g_iPlayersNum[1])/g_iAllCvars[TEAM_BALANCE], floatround_floor)>g_iPlayersNum[2]))
	{
		iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\d[2] \y~\w %L \r[%d]^n^n", id, "JBE_MENU_TEAM_GUARDS", g_iPlayersNum[2]);
		iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\d[5] \y~\w %L^n", id, "JBE_MENU_TEAM_RANDOM");
		iKeys |= (1<<1|1<<4);
	}
	else
	{
		iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\d[2] \y~\w \d%L \r[%d]^n^n", id, "JBE_MENU_TEAM_GUARDS", g_iPlayersNum[2]);
		iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\d[5] \y~\w \d%L^n", id, "JBE_MENU_TEAM_RANDOM");
	}
	if(g_iUserTeam[id] != 3)
	{
		iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\d[6] \y~\w %L^n^n^n^n^n", id, "JBE_MENU_TEAM_SPECTATOR");
		iKeys |= (1<<5);
	}
	else iLen += formatex(szMenu[iLen], charsmax(szMenu) - iLen, "\d[6] \y~\w \d%L^n^n^n^n^n", id, "JBE_MENU_TEAM_SPECTATOR");
	if(iType)
	{
		formatex(szMenu[iLen], charsmax(szMenu) - iLen, "^n\d[0] \y~\w %L", id, "JBE_MENU_EXIT");
		iKeys |= (1<<9);
	}
	show_menu(id, iKeys, szMenu, -1, "Show_ChooseTeamMenu");
	return PLUGIN_HANDLED;
}
Actually I've tried to rewrite whole menu and use newmenus.inc, but the error didn't disappear, just showed the same error on some other line in that function(can't remember).

Any suggestions to solve this issue?
PTE is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Location: tunisia
Old 10-04-2018 , 12:35   Re: Runtime error 3: stack error
Reply With Quote #2

what is your amxx version ?
__________________
JusTGo is offline
PTE
Junior Member
Join Date: Aug 2018
Old 10-04-2018 , 13:08   Re: Runtime error 3: stack error
Reply With Quote #3

amxx version
AMX Mod X 1.8.3-dev+5154 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Mar 9 2018 10:40:21
Built from: https://github.com/alliedmodders/amxmodx/commit/2559fcf
Build ID: 5154:2559fcf
Core mode: JIT+ASM32
PTE is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Location: tunisia
Old 10-04-2018 , 15:41   Re: Runtime error 3: stack error
Reply With Quote #4

try to use the latest version from here https://www.amxmodx.org/downloads-new.php
__________________
JusTGo is offline
PTE
Junior Member
Join Date: Aug 2018
Old 10-04-2018 , 15:59   Re: Runtime error 3: stack error
Reply With Quote #5

Ok, I'll update my version and compile it with new version yeah? Gonna do it later however.
PTE is offline
PTE
Junior Member
Join Date: Aug 2018
Old 10-10-2018 , 04:42   Re: Runtime error 3: stack error
Reply With Quote #6

So, I updated, recompiled, server still crashing but without errors in logs...
PTE is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Location: tunisia
Old 10-10-2018 , 07:18   Re: Runtime error 3: stack error
Reply With Quote #7

try changing this :

PHP Code:
public Message_ShowMenu(iMsgIdiMsgDestiReceiver)
{
    switch(
get_msg_arg_int(1))
    {
        case 
ShowMenu_TeamMenuShowMenu_TeamSpectMenu:
        {
            
Show_ChooseTeamMenu(iReceiver0); // 5323
            
return PLUGIN_HANDLED;
        }
        case 
ShowMenu_ClassMenuShowMenu_IgTeamMenuShowMenu_IgTeamSpectMenu: return PLUGIN_HANDLED;
    }
    return 
PLUGIN_CONTINUE;

to :

PHP Code:
public Message_ShowMenu(iMsgIdiMsgDestiReceiver)
{
    switch(
get_msg_arg_int(1))
    {
        case 
ShowMenu_TeamMenuShowMenu_TeamSpectMenu:
        {
            
set_ent_data(iReceiver"CBasePlayer""m_iMenu"0); // Fix
            
Show_ChooseTeamMenu(iReceiver0); // 5323
            
return PLUGIN_HANDLED;
        }
        case 
ShowMenu_ClassMenuShowMenu_IgTeamMenuShowMenu_IgTeamSpectMenu: return PLUGIN_HANDLED;
    }
    return 
PLUGIN_CONTINUE;

__________________
JusTGo is offline
PTE
Junior Member
Join Date: Aug 2018
Old 10-18-2018 , 09:51   Re: Runtime error 3: stack error
Reply With Quote #8

Im not sure if this helped, players reporting about crashes, I'd like to check it on my own to report for sure, but uptime and default map says enough, still haven't got any error logs, how can I try to fix it or at least get some logs?
PTE is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Location: ISR
Old 10-19-2018 , 10:11   Re: Runtime error 3: stack error
Reply With Quote #9

Sometimes the problem comes from a lack of value of a STATIC variable.

What other errors do you get, and I 'd be happy to see func of:

jbe_menu_blocked
__________________
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
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 18:11.


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