AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=7)
-   -   Problem with natives, server crash (https://forums.alliedmods.net/showthread.php?t=271103)

Netsys 09-05-2015 07:34

Problem with natives, server crash
 
Steps to reproduce the crash:

1st way:
- With only natives.amxx
- Start the server
- type restart or changelevel map
- Server will crash
- :D

2nd way:
- With natives.amxx and nativesCall.amxx
- Start the server
- :D

native.sma
PHP Code:

#include <amxmodx>

native testCrash(p1 0p2[] = ""p3[] = ""p4[] = ""p5[] = ""p6[] = ""p7 0Floatp8 0.0Floatp9 0.0Floatp10 0.0Floatp11 0.0p12 0p13 0p14 0p15 0p16 0);

public 
plugin_precache()
{
    
log_to_file("native.log""[native] plugin_precache pre");
    
/* Call the native */
    
testCrash(1"param 2""param 3""param 4""param 5""param 6"080.090.0100.0110.01213141516);
    
log_to_file("native.log""[native] plugin_precache post");
}

public 
plugin_init()
{
    
log_to_file("native.log""[native] plugin_init");
    
register_plugin("native crash""1""asd");
}

public 
plugin_natives()
{
    
log_to_file("native.log""[native] plugin_natives");
    
register_native("testCrash""nativeTestCrash");
}

public 
nativeTestCrashiPluginIDiParams )
{
    
log_to_file("native.log""------------------------------");
    
log_to_file("native.log""iPluginID: %d - iParams: %d"iPluginIDiParams);
    
    for (new 
iIndex 1iIndex <= iParamsiIndex++)
    {
        switch (
iIndex)
        {
            case 
2..6:
            {
                new 
szParam[112];
                
get_string(iIndexszParamcharsmax(szParam));
                
                
log_to_file("native.log""    - Param (%d): %s"iIndexszParam);
            }
            case 
8..11:
            {
                
log_to_file("native.log""    - Param (%d): %.02f"iIndexget_param_f(iIndex));
            }
            default:
            {
                
log_to_file("native.log""    - Param (%d): %d"iIndexget_param(iIndex));
            }
        }
        
    }
    
log_to_file("native.log""------------------------------");


nativeCall.sma
PHP Code:

#include <amxmodx>

native testCrash(p1 0p2[] = ""p3[] = ""p4[] = ""p5[] = ""p6[] = ""p7 0Floatp8 0.0Floatp9 0.0Floatp10 0.0Floatp11 0.0p12 0p13 0p14 0p15 0p16 0);

public 
plugin_precache()
{
    
log_to_file("native.log""[nativeCall] plugin_precache pre");
    
testCrash(1"param 2""param 3""param 4""param 5""param 6"080.090.0100.0110.01213141516);
    
log_to_file("native.log""[nativeCall] plugin_precache post");


meta version:
PHP Code:

Metamod v1.21p37  2013/05/30 (5:13)
by Will Day
   http
://www.metamod.org/
 
PatchMetamod-(mm-pv37
 by Jussi Kivilinna
    http
://metamod-p.sourceforge.net/
compiledMay 30 201311:41:14 EET (optimized

meta list:
PHP Code:

Currently loaded plugins:
      
description      stat pend  file              vers      src   load  unlod
 
1AMX Mod X        RUN   -    amxmodx_mm.dll    v1.8.3-d  ini   Start ANY  
1 plugins
1 running 

HLDS version:
PHP Code:

Protocol version 48
Exe version 1.1.2.7 
(cstrike)
Exe build13:13:29 Aug 29 2013 (6153

AMXX Version: 1.8.3-dev+4880

fysiks 09-05-2015 11:17

Re: Problem with natives, server crash
 
You need to update MetaMod (the one that comes with AMX Mod X). When you update, does it still happen? Does it happen if you use the latest stable version of AMX Mod X.

Nextra 09-05-2015 12:15

Re: Problem with natives, server crash
 
We have confirmed this to be an issue inside of AMXX. Thanks for the bug report and the great repro plugins, makes our lives a whole lot easier. Arkshine has found the bug that is most likely responsible, and the fix will land (very) shortly.

Netsys 09-05-2015 12:45

Re: Problem with natives, server crash
 
Now works fine with AMXX 1.8.3-dev+4882 thanks


All times are GMT -4. The time now is 18:40.

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