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

Problem with natives, server crash


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Netsys
Senior Member
Join Date: Feb 2010
Old 09-05-2015 , 07:34   Problem with natives, server crash
Reply With Quote #1

Steps to reproduce the crash:

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

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

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
Netsys is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-05-2015 , 11:17   Re: Problem with natives, server crash
Reply With Quote #2

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.
__________________
fysiks is offline
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 09-05-2015 , 12:15   Re: Problem with natives, server crash
Reply With Quote #3

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.
__________________
In Flames we trust!

Last edited by Nextra; 09-05-2015 at 12:15.
Nextra is offline
Netsys
Senior Member
Join Date: Feb 2010
Old 09-05-2015 , 12:45   Re: Problem with natives, server crash
Reply With Quote #4

Now works fine with AMXX 1.8.3-dev+4882 thanks
Netsys 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 08:24.


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