AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Off-Topic (https://forums.alliedmods.net/forumdisplay.php?f=15)
-   -   Segmentation fault -causer- (https://forums.alliedmods.net/showthread.php?t=252609)

Krtola 12-06-2014 04:25

Segmentation fault -causer-
 
Maybe you know the names of some of the plugin from this forum, which has been tested and proven to cause
PHP Code:

Segmentation fault 


zmd94 12-06-2014 05:14

Re: Segmentation fault -causer-
 
Someone has reported to me that this plugin can cause segmentation fault: https://forums.alliedmods.net/showthread.php?t=249314

Yet, it is weird as I never faced that problem in my server. ;)

Krtola 12-06-2014 05:22

Re: Segmentation fault -causer-
 
Quote:

Originally Posted by zmd94 (Post 2231703)
Someone has reported to me that this plugin can cause segmentation fault: https://forums.alliedmods.net/showthread.php?t=249314

Yet, it is weird as I never faced that problem in my server. ;)

Do you have any idea why this plugin can cause Segmentation fault?

zmd94 12-06-2014 05:24

Re: Segmentation fault -causer-
 
Sorry, I have no idea why it happen unless I can produce the same error in my server, maybe I can try to figure out the problem. ;)

Krtola 12-11-2014 07:39

Re: Segmentation fault -causer-
 
My biohazard version have this option:
PHP Code:

"bh_force_fog""5.0" 

Its function is that for every 5.0 sec checks players if they tried to set gl_fog 0
Now imagine to be checked every 30 players in every 5 seconds.
Can this force loop task cause problems,such as for example segmentation fault?

zmd94 12-11-2014 07:58

Re: Segmentation fault -causer-
 
Is that check is really necessary?

Krtola 12-11-2014 08:12

Re: Segmentation fault -causer-
 
Not,just curious can this cause some problems or not.

zmd94 12-11-2014 08:58

Re: Segmentation fault -causer-
 
I think it will not cause that kind of error.

OvidiuS 12-11-2014 22:04

Re: Segmentation fault -causer-
 
Quote:

Originally Posted by Krtola (Post 2233836)
My biohazard version have this option:
PHP Code:

"bh_force_fog""5.0" 

Its function is that for every 5.0 sec checks players if they tried to set gl_fog 0
Now imagine to be checked every 30 players in every 5 seconds.
Can this force loop task cause problems,such as for example segmentation fault?

Do you have engclient_cmd anywhere in your code?

Krtola 12-12-2014 10:41

Re: Segmentation fault -causer-
 
@OvidiuS yes,I have in main Biohazard plugin:
PHP Code:

public event_curweapon(id)
{
    if(!
is_user_alive(id))
        return 
PLUGIN_CONTINUE
    
    
static weapon
    weapon 
read_data(2)
    if(
weapon == CSW_C4
    {
        
engclient_cmd(id"weapon_knife")
    }

    static 
ammotype
    ammotype 
get_pcvar_num(cvar_ammo)
    
    if(!
ammotype || (AMMOWP_NULL & (1<<weapon)))
        return 
PLUGIN_CONTINUE

    
static maxammo
    
switch(ammotype)
    {
        case 
1maxammo g_weapon_ammo[weapon][MAX_AMMO]
        case 
2maxammo g_weapon_ammo[weapon][MAX_CLIP]
    }

    if(!
maxammo)
        return 
PLUGIN_CONTINUE
    
    
switch(ammotype)
    {
        case 
1:
        {
            static 
ammo
            ammo 
cs_get_user_bpammo(idweapon)
            
            if(
ammo 1
                
cs_set_user_bpammo(idweaponmaxammo)
        }
        case 
2:
        {
            static 
clipclip read_data(3)
            if(
clip 1)
            {
                static 
weaponname[32]
                
get_weaponname(weaponweaponname31)
                
                static 
ent 
                ent 
find_ent_by_owner(-1weaponnameid)
                
                
cs_set_weapon_ammo(entmaxammo)
            }
        }
    }    
    return 
PLUGIN_CONTINUE


But I noticed that many plugins for extra weapons also have engclient_cmd.
Is this a real problem?


All times are GMT -4. The time now is 02:34.

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