Raised This Month: $138 Target: $400
 34% 

edicts spawning with no class


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
farawayf
Senior Member
Join Date: Jan 2019
Old 08-24-2019 , 07:56   edicts spawning with no class
Reply With Quote #1

server crashes due to exceeding the max edicts limit.
i know that game engine have 2048 limit of edicts, but in logs:

Code:
...
L 08/23/2019 - 17:34:19: (1.56%) 32 info_player_terrorist 
L 08/23/2019 - 17:34:19: (1.56%) 32 info_player_counterterrorist 
L 08/23/2019 - 17:34:19: (1.61%) 33 trigger_teleport 
L 08/23/2019 - 17:34:19: (1.61%) 33 trigger_multiple 
L 08/23/2019 - 17:34:19: (2.10%) 43 path_track 
L 08/23/2019 - 17:34:19: (3.71%) 76 ambient_generic 
L 08/23/2019 - 17:34:19: (7.27%) 149 env_entity_maker 
L 08/23/2019 - 17:34:19: (66.86%) 1370  <---- no class edicts
L 08/23/2019 - 17:34:19: Total edicts: 2049 
L 08/23/2019 - 17:34:19: Engine error: ED_Alloc: no free edicts
we can see that 1370 edicts spawning without class.
plugins to create an entity in server not installed. crashing on many maps.
What is this and how i can fix that ?.

upd. other servers can run that maps without reaching the limit.

upd2. i made a plugin, which also seems not working.
PHP Code:
public void OnEntityCreated(int entity) {
    if(
entity >= 2047) {
        
SDKHook(entitySDKHook_SpawnOnSpawn);
    }
}

public 
Action OnSpawn(int entity) {
    
AcceptEntityInput(entity"kill");
    
RemoveEdict(entity);
    return 
Plugin_Handled;
}

public 
void OnGameFrame() {
    for(
int i 2046<= 2048i++) {
        if(
IsValidEntity(i) && IsValidEdict(i)) {
            
AcceptEntityInput(i"kill");
            
RemoveEdict(i);
        }
    }


Last edited by farawayf; 08-24-2019 at 08:56.
farawayf is offline
1337norway
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 08-24-2019 , 22:59   Re: edicts spawning with no class
Reply With Quote #2

IsValidEntity or IsValidEdic is probably returning false for the no name edicts. should check on OnEntityCreated classname if it's equal to "\0" or " " and sdkhook and kill it on spawn without checking if it's valid or not as the checks will probably fail. Seems like a bad plugin or possible anti map piracy thing that creates these ents to prevent other servers from running the map. They most likely remove the entity spawner with stripper mod source if it's the map so they can run it fine
__________________
Taking Free/Paid Requests! Send a PM
--->Donate here if you like my work. <--- (or ask for my paypal in private)
1337norway is offline
farawayf
Senior Member
Join Date: Jan 2019
Old 08-25-2019 , 14:59   Re: edicts spawning with no class
Reply With Quote #3

Quote:
Originally Posted by 1337norway View Post
IsValidEntity or IsValidEdic is probably returning false for the no name edicts. should check on OnEntityCreated classname if it's equal to "\0" or " " and sdkhook and kill it on spawn without checking if it's valid or not as the checks will probably fail. Seems like a bad plugin or possible anti map piracy thing that creates these ents to prevent other servers from running the map. They most likely remove the entity spawner with stripper mod source if it's the map so they can run it fine
crashing with all method. i tried, entitys still spawning.
farawayf is offline
1337norway
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 08-26-2019 , 00:06   Re: edicts spawning with no class
Reply With Quote #4

well you need to find out whats spawning it exactly, if you have debugging skills you can hook the function for on entity creation, look at the stack and see what functions are leading to the call to find whats spawning it
__________________
Taking Free/Paid Requests! Send a PM
--->Donate here if you like my work. <--- (or ask for my paypal in private)
1337norway is offline
Sreaper
髪を用心
Join Date: Nov 2009
Location: Source SDK
Old 09-05-2019 , 10:20   Re: edicts spawning with no class
Reply With Quote #5

Check which env_entity_maker is meant to crash the server and remove it.
__________________

Last edited by Sreaper; 09-05-2019 at 10:21.
Sreaper is offline
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 03:30.


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