Raised This Month: $ Target: $400
 0% 

Segmentation fault -causer-


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 12-06-2014 , 04:25   Segmentation fault -causer-
Reply With Quote #1

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 
Krtola is offline
Send a message via Skype™ to Krtola
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 12-06-2014 , 05:14   Re: Segmentation fault -causer-
Reply With Quote #2

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. ;)
zmd94 is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 12-06-2014 , 05:22   Re: Segmentation fault -causer-
Reply With Quote #3

Quote:
Originally Posted by zmd94 View Post
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?
Krtola is offline
Send a message via Skype™ to Krtola
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 12-06-2014 , 05:24   Re: Segmentation fault -causer-
Reply With Quote #4

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. ;)
zmd94 is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 12-11-2014 , 07:39   Re: Segmentation fault -causer-
Reply With Quote #5

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?
Krtola is offline
Send a message via Skype™ to Krtola
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 12-11-2014 , 07:58   Re: Segmentation fault -causer-
Reply With Quote #6

Is that check is really necessary?
zmd94 is offline
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 12-11-2014 , 08:12   Re: Segmentation fault -causer-
Reply With Quote #7

Not,just curious can this cause some problems or not.
Krtola is offline
Send a message via Skype™ to Krtola
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 12-11-2014 , 08:58   Re: Segmentation fault -causer-
Reply With Quote #8

I think it will not cause that kind of error.
zmd94 is offline
OvidiuS
Chillaxin'
Join Date: Dec 2009
Location: Serbia
Old 12-11-2014 , 22:04   Re: Segmentation fault -causer-
Reply With Quote #9

Quote:
Originally Posted by Krtola View Post
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?
OvidiuS is offline
Send a message via Skype™ to OvidiuS
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 12-12-2014 , 10:41   Re: Segmentation fault -causer-
Reply With Quote #10

@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?
Krtola is offline
Send a message via Skype™ to Krtola
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 02:34.


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