AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=7)
-   -   amxx 1.8.3 code crash (https://forums.alliedmods.net/showthread.php?t=275819)

JusTGo 12-09-2015 11:33

amxx 1.8.3 code crash
 
so i have this code
PHP Code:


new const JOIN_TEAM_MENU_FIRST[] = "#Team_Select";
new const 
JOIN_TEAM_MENU_FIRST_SPEC[] = "#Team_Select_Spect";
new const 
JOIN_TEAM_MENU_INGAME[] = "#IG_Team_Select";
new const 
JOIN_TEAM_MENU_INGAME_SPEC[] = "#IG_Team_Select_Spect"

public 
plugin_init() 
{
     
register_message(get_user_msgid("ShowMenu"), "TextMenu")
}

public 
TextMenu(msgiddestid)
{
    if(!
get_pcvar_num(g_on) || !is_user_connected(id))
        return 
PLUGIN_CONTINUE

    
if(!data_ready)
        return 
PLUGIN_HANDLED

    
if(!name_checked[id])
        return 
PLUGIN_CONTINUE

    
static menu_text[64];    // guess the problem is here

    
get_msg_arg_string(4menu_textcharsmax(menu_text))

    if(
equal(menu_textJOIN_TEAM_MENU_FIRST) || equal(menu_textJOIN_TEAM_MENU_FIRST_SPEC))
    {
        if((!
is_registered[id] && get_pcvar_float(g_regtime)) || (is_registered[id] && !is_logged[id]))
        {
            
MainMenu(id)
            return 
PLUGIN_HANDLED
        
}
        else if((
get_pcvar_num(g_ajc_team) && cs_get_user_team(id) == CS_TEAM_UNASSIGNED) && !task_exists(TASK_AJC) && (!get_pcvar_num(g_ajc_admin) || !(get_user_flags(id) & AJC_ADMIN_FLAG)))
        {
            
SetAutoJoinTask(idmsgid)
            return 
PLUGIN_HANDLED
        
}        
    }
    else if(
equal(menu_textJOIN_TEAM_MENU_INGAME) || equal(menu_textJOIN_TEAM_MENU_INGAME_SPEC))
    {
        if((!
is_registered[id] && get_pcvar_float(g_regtime)) || (is_registered[id] && !is_logged[id]))
        {
            
MainMenu(id)
            return 
PLUGIN_HANDLED
        
}
        else if(
get_pcvar_num(g_ajc_change) && (!get_pcvar_num(g_ajc_admin) || !(get_user_flags(id) & AJC_ADMIN_FLAG)))
        {
            return 
PLUGIN_HANDLED
        
}    
    }
    return 
PLUGIN_CONTINUE


it causes crash when a player connectes on amxx 1.8.3 last dev but on 1.8.2 it works fine.
plugin :https://forums.alliedmods.net/showthread.php?t=171460
error:
PHP Code:

 08/28/2014 18:46:48: [AMXXDisplaying debug trace (plugin "RegisterSystem.amxx", version "9.0")

 
08/28/2014 18:46:48: [AMXXRun time error 3stack error 

SZ_GetSpace
overflow on MessageBegin/End

SZ_GetSpace
overflow on MessageBegin/End

SZ_GetSpace
overflow on MessageBegin/End

SZ_GetSpace
overflow on MessageBegin/End

SZ_GetSpace
overflow on MessageBegin/End

SZ_GetSpace
overflow on MessageBegin/End

SZ_GetSpace
overflow on MessageBegin/End

FATA ERROR 
(shutting down): MESSAGE_END calledbut message buffer from .dll had overflowed 


bLacK-bLooD 11-26-2017 09:40

Re: amxx 1.8.3 code crash
 
I found that the mysql module on linux (amxmodx 1.8.3 last dev) was throwing this in the logs:

PHP Code:

version `GLIBC_2.17' not found 

I went in the registersystem plugin and took out the entire sqlx part of the plugin, recompiled and that fixed it.

However this didn't fix the mysql module, just fixed your problem.

Arkshine 11-26-2017 10:58

Re: amxx 1.8.3 code crash
 
Yes, recently mysql has been updated to 5.5 (which is still quite old) from 5.0 (windows) or 5.1 (linux) and glibc requirement to 2.12 from 2.3.

Technically, because of the AMBuild system, Glibc requirement is bumped to 2.19, but since AMXX did not use functions from it, I guess it stayed to 2.3 or something (?).

That's said, I'm not sure why it requires 2.17 instead of 2.12.
On a side note, AMXX can't always stay working on obsolete systems, at some point, bumping requirement may happen. For the next AMXX 1.9 major version, it's reasonable.

You can always use an old mysql build if you can't upgrade.

EDIT: Right now we're using 5.5.57, and the 5.5.56 version uses glibc 2.5 instead. We could use this version I guess if the bump is too large. What is your current glibc version btw?

bLacK-bLooD 11-26-2017 11:22

Re: amxx 1.8.3 code crash
 
I am running my server on a dedicated server host so I don't have any access.

Arkshine 11-26-2017 11:55

Re: amxx 1.8.3 code crash
 
What is the OS used just for information?

bLacK-bLooD 11-26-2017 12:03

Re: amxx 1.8.3 code crash
 
Linux. Debian or Ubuntu.

Arkshine 11-26-2017 12:06

Re: amxx 1.8.3 code crash
 
I know it's linux, I just want to know the version used.

bLacK-bLooD 11-26-2017 12:09

Re: amxx 1.8.3 code crash
 
I don't really have any read/write access to the server (no terminal access, just gamepanel). It's just a normal server hosted by big company in my country.

EDIT: On their website they just mention they use Slackware, Suse, Debian and Ubuntu, no versions.

Arkshine 11-26-2017 14:46

Re: amxx 1.8.3 code crash
 
Can you try the latest build?

Mysql module should now keep the same glibc requirement as before. Don't forget you need to stop your server before.

bLacK-bLooD 11-27-2017 03:20

Re: amxx 1.8.3 code crash
 
Quote:

Originally Posted by Arkshine (Post 2563000)
Can you try the latest build?

Mysql module should now keep the same glibc requirement as before. Don't forget you need to stop your server before.

The latest build seems to have fixed it. Thanks!


All times are GMT -4. The time now is 15:59.

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