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

Create Edict Fixer.


Post New Thread Reply   
 
Thread Tools Display Modes
bottiger
AlliedModders Donor
Join Date: Dec 2010
Old 11-30-2014 , 16:18   Re: Create Edict Fixer.
Reply With Quote #141

I'm on TF2 and none of the alternatives seem to help, but I'm afraid to use this extension if it is known to cause crashes.

I did a lot of testing recently and I would like to share my findings.

Quote:
Originally Posted by kadet.89 View Post
694372459,

If you can't find the reason of this error, just add this 2 lines in your server.cfg

sv_lowedict_action 4
sv_lowedict_threshold 32

It'll prevent server crash by map change when there are only 32 free edicts left.
This extension only slightly reduces the likelihood of a server crash.
I have these settings and I am still getting ED_ALLOC crashes.

Quote:
Originally Posted by xCoderx View Post
Or you could add this alongside this plugin.
https://forums.alliedmods.net/showthread.php?t=247684
This plugin doesn't work either. I tested all the methods in here.

- On TF2, GetEntityCount does not return the highest edict index anymore, it tries to return the number of entities in use. However, sometimes it goes negative, so this function is completely useless.

- The game seems to correctly reuse lower entity numbers. I hooked OnEntityCreated and printed the entity number and the highest used entity number, and most of the time, the entity number is lower than the highest used entity number.

So this means that you will get many false positives if you try to restart the map when the highest used index is high. This also seems to suggest that TF2 is already doing what CEF is doing.

- I also tried counting the entities myself but the server still triggered ED_ALLOC without triggering my threshold
__________________

Last edited by bottiger; 11-30-2014 at 16:23.
bottiger is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 12-01-2014 , 03:29   Re: Create Edict Fixer.
Reply With Quote #142

As You can see, there aren't many people here, who have this problem, so it's not a usual situation. I've got a large server with a lot of players (40-50), sometimes even 64 and there are a lot of plugins that create many entities during a round (mines, attachments, etc.). Even so my server hardly ever reaches this limit.
If you receive this error on a regular basis, then it is likely that there is a "leak".

This leak may be caused by maps (for example: ze_fapescape_v1_2, ze_harry_potter_b2, ze_portal_story_v3_2) or plugins (GoreMod v3.2.5, every players shoot it spawns a new blood entity). So check all the maps by "console.log". If it happens on different maps, then try to disable some plugins.

Also, you can print to the console each new entity classname: https://sm.alliedmods.net/api/index....=show&id=1021& maybe this will help you to find the reason

Last edited by kadet.89; 12-01-2014 at 03:39.
kadet.89 is offline
Send a message via Skype™ to kadet.89
VoiDeD
AlliedModders Donor
Join Date: Mar 2009
Location: Illinois, USA
Old 12-01-2014 , 13:52   Re: Create Edict Fixer.
Reply With Quote #143

Quote:
Originally Posted by bottiger View Post
- The game seems to correctly reuse lower entity numbers. I hooked OnEntityCreated and printed the entity number and the highest used entity number, and most of the time, the entity number is lower than the highest used entity number.
Quote:
Originally Posted by Sept 10 TF2 Update
- Improved edict usage on servers to help eliminate "out of edicts" errors during round restarts
Is probably the reason for the behavior you're describing.

Either way, neither that change nor the sv_lowedict convars actually seem to function in certain situations where many entities tend to get recreated: round restarts.
__________________
VoiDeD is offline
bottiger
AlliedModders Donor
Join Date: Dec 2010
Old 12-02-2014 , 20:39   Re: Create Edict Fixer.
Reply With Quote #144

If I make a plugin to do CreateEntityByName("prop_dynamic") 2000 times, sv_lowedict_action seems to work.

However I am still getting ED_Alloc crashes at least once a week. Unfortunately I do not know if it is happening when the round restarts. Aren't entities supposed to be wiped when a round restart occurs?
__________________
bottiger is offline
bottiger
AlliedModders Donor
Join Date: Dec 2010
Old 12-07-2014 , 22:02   Re: Create Edict Fixer.
Reply With Quote #145

I managed to dump the entity list. Nothing seems to be out of the ordinary and the number of edicts and entities are both 1762 (manually counting from 0-2047) but the top ones are 2047.

Code:
L 12/07/2014 - 11:13:31:  pl_goldrush
L 12/07/2014 - 11:13:31:  edict 1762 top 2047 entities 1762 top 2047
L 12/07/2014 - 11:13:31:   174 - path_track
L 12/07/2014 - 11:13:31:   172 - prop_dynamic
L 12/07/2014 - 11:13:31:   126 - func_areaportal
L 12/07/2014 - 11:13:31:    94 - tf_wearable
L 12/07/2014 - 11:13:31:    84 - point_spotlight
L 12/07/2014 - 11:13:31:    84 - spotlight_end
L 12/07/2014 - 11:13:31:    84 - beam
L 12/07/2014 - 11:13:31:    76 - info_player_teamspawn
L 12/07/2014 - 11:13:31:    71 - func_lod
L 12/07/2014 - 11:13:31:    66 - keyframe_rope
L 12/07/2014 - 11:13:31:    62 - env_sprite
L 12/07/2014 - 11:13:31:    61 - env_soundscape_proxy
L 12/07/2014 - 11:13:31:    58 - tf_viewmodel
L 12/07/2014 - 11:13:31:    43 - func_brush
L 12/07/2014 - 11:13:31:    42 - func_door
L 12/07/2014 - 11:13:31:    36 - func_occluder
L 12/07/2014 - 11:13:31:    31 - move_rope
L 12/07/2014 - 11:13:31:    29 - instanced_scripted_scene
L 12/07/2014 - 11:13:31:    25 - func_nobuild
L 12/07/2014 - 11:13:31:    17 - tf_weapon_minigun
L 12/07/2014 - 11:13:31:    15 - item_ammopack_full
Unfortunately it seems like the server will reach high edict numbers without ever running out, so it doesn't seem to be a good solution to restart the server whenever an entity with a high edict number is spawned.
__________________
bottiger is offline
woklex
Member
Join Date: Sep 2012
Old 01-23-2015 , 15:27   Re: Create Edict Fixer.
Reply With Quote #146

Anyone can compile it for insurgecny? I also have this problem, this plugin can help. Here is the plugin has not helped https://forums.alliedmods.net/showthread.php?t=247684
woklex is offline
Graffiti
AlliedModders Donor
Join Date: Aug 2013
Location: Russia
Old 02-12-2015 , 11:49   Re: Create Edict Fixer.
Reply With Quote #147

OC: Linux
Game: CS:GO

] sm_rcon meta refresh
L 02/12/2015 - 19:48:21: [META] Failed to load plugin addons/cef/cef_mm: /home/disk2/jail/27617/csgo/addons/cef/cef_mm_i486.so: undefined symbol: __cxa_pure_virtual

Please, help
__________________
Russian TTT CSGO

Graffiti is offline
Graffiti
AlliedModders Donor
Join Date: Aug 2013
Location: Russia
Old 03-01-2015 , 06:28   Re: Create Edict Fixer.
Reply With Quote #148

please, fix
__________________
Russian TTT CSGO

Graffiti is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 03-09-2015 , 13:08   Re: Create Edict Fixer.
Reply With Quote #149

I hooked the message:
"Warning: free edicts below threshold. 99 free edicts remaining"
and made a dump of ent's
Here are my results:

Quote:
L 03/09/2015 - 15:433: [EDICTSTHRESHOLD] Edicts Threshold Value 99
OnEdictsThreshold 99
OnEdictsThreshold count 985 highindex 1947
OnEdictsThreshold infodecal count 0
report_entities dump (at this moment):
Quote:
Class: _firesmoke (6)
Class: ai_network (1)
Class: ambient_generic (85)
Class: beam (24)
Class: color_correction (7)
Class: cs_gamerules (1)
Class: cs_player_manager (1)
Class: cs_team_manager (4)
Class: env_embers (5)
Class: env_entity_maker (35)
Class: env_explosion (10)
Class: env_fade (2)
Class: env_fire (6)
Class: env_laser (18 )
Class: env_shake (7)
Class: env_spark (1)
Class: env_sprite (10)
Class: env_sun (1)
Class: filter_activator_class (1)
Class: filter_activator_name (1)
Class: filter_activator_team (2)
Class: func_areaportalwindow (5)
Class: func_breakable (25)
Class: func_brush (20)
Class: func_button (9)
Class: func_buyzone (2)
Class: func_clip_vphysics (4)
Class: func_door (9)
Class: func_illusionary (6)
Class: func_physbox (7)
Class: func_rotating (10)
Class: func_smokevolume (1)
Class: func_tanktrain (1)
Class: func_tracktrain (2)
Class: game_player_equip (2)
Class: game_score (1)
Class: info_particle_system (39)
Class: info_player_counterterrorist (32)
Class: info_player_start (1)
Class: info_player_terrorist (32)
Class: info_target (14)
Class: info_teleport_destination (15)
Class: light (15)
Class: logic_case (18 )
Class: logic_relay (50)
Class: logic_timer (13)
Class: math_counter (13)
Class: path_track (95)
Class: phys_bone_follower (15)
Class: player (54)
Class: player_speedmod (1)
Class: point_servercommand (1)
Class: point_spotlight (24)
Class: point_template (57)
Class: point_tesla (5)
Class: predicted_viewmodel (108 )
Class: prop_dynamic (9)
Class: prop_dynamic_ornament (1)
Class: prop_physics (1)
Class: scene_manager (1)
Class: sky_camera (1)
Class: soundent (1)
Class: spotlight_end (24)
Class: trigger_hurt (20)
Class: trigger_multiple (18 )
Class: trigger_once (11)
Class: trigger_push (23)
Class: trigger_teleport (14)
Class: water_lod_control (1)
Class: weapon_ak47 (1)
Class: weapon_deagle (2)
Class: weapon_flashbang (10)
Class: weapon_glock (28 )
Class: weapon_hegrenade (10)
Class: weapon_knife (50)
Class: weapon_m249 (3)
Class: weapon_m4a1 (1)
Class: weapon_p90 (7)
Class: weapon_sg552 (1)
Class: weapon_usp (22)
Class: worldspawn (1)
Total 1195 entities (0 empty, 1037 edicts)
so, it seems that this extension doesn't really work.
Yes, the highest index is 1947, but there are a lot free indexes at the moment

Or, may be my calculation algorithm is wrong?

PHP Code:
public OnEdictsThreshold(number) {

    
PrintToServer("OnEdictsThreshold");

    new 
highindex 0;
    new 
count 0;
    if(
number == 99) {
        
ServerCommand("report_entities");
        for(new 
0!= 2048i++) {
            if(
IsValidEntity(i)) {
                
count++;
                
highindex i
            
}
        }
        
PrintToServer("OnEdictsThreshold count %i highindex %i"counthighindex);
        
        
count 0;
        new 
ent;
        while((
ent FindEntityByClassname(ent"infodecal")) != -1)
        {
            
count++;
        }
        
PrintToServer("OnEdictsThreshold  infodecal count %i"count);
    }
    
    return 
1;

also I noticed, the at every first frame of a round server recreates all the entities, and than, during a few frames, the number of networked entities reduces 2-3 times.
Removing entities at the moment when I get this message "Warning: free edicts below threshold. 99 free edicts remaining" is useless, because the engine removes them only in the next frame (after server crash). Try to change the level makes no sense too. sourcemod blocks it and moves to the next frame. So if at the next frame the server is still alive (there are some indexes left), then I see a lot of such messages "[SM] Changed map to "
That is why sv_lowedict_action 4 doesn't work too.


So, if you see the message "Warning: free edicts below threshold. 1 free edicts remaining" then there is no way to prevent server crash.

Last edited by kadet.89; 03-09-2015 at 13:31.
kadet.89 is offline
Send a message via Skype™ to kadet.89
psychonic

BAFFLED
Join Date: May 2008
Old 03-09-2015 , 15:32   Re: Create Edict Fixer.
Reply With Quote #150

Quote:
Originally Posted by kadet.89 View Post
Try to change the level makes no sense too. sourcemod blocks it and moves to the next frame.
No part of SourceMod that I'm aware of blocks level change for any amount of time.
psychonic 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:59.


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