ED_Alloc: no free edicts

Discussion in 'Mapping Questions & Discussion' started by zenarium, Jul 3, 2013.

  1. zenarium

    zenarium L2: Junior Member

    Messages:
    82
    Positive Ratings:
    2
    Hello,

    I stated making a map one year ago. I had my questions and this community answered to all. But at some point the error "ED_Alloc: no free edicts" appeared and nobody could help me.

    I know what the error means and what generates it is when i turn on the lights of a disco. I sued to have a lightball on that disco but I had to remove it because everytime I turn it on the disco( which is actually a ufo flying around the map) disapears and I have to go back to a backup copy. I don't have the lightball anymore but I still have 15-20 lights on that disco and 3 musics.

    One year ago I gave up because I understood that I have to remove the disco in order to my map work. Now I am back and I want to put my map online!

    Is there any way I can keep my ufo/disco or I have to delete it? And another problem is that the map isn't finished yet. I still have to create some entities for healthstations, video cameras, etc...

    I played in some complex maps in the past. Mario kart, for example, has 2 discos and it works fine! Is it because the lights are always turned on on that map?


    Edit: I found my older post: http://forums.tf2maps.net/showthread.php?t=20125&page=2 I was vreally angry one year ago with this error. I wanna try again. I delete the disco if I need to but it's strange that I exceded the limit of entities.
     
    Last edited: Jul 3, 2013
  2. henke37

    aa henke37

    Messages:
    1,955
    Positive Ratings:
    465
    It is quite simple: you ran out of entity address space. You have too many networked entities.
     
  3. zenarium

    zenarium L2: Junior Member

    Messages:
    82
    Positive Ratings:
    2

    How do I know how many entities I have and how much is the max?

    And is there any way to solve this? As I wrote above, I played in complex maps with many entities and they work fine.

    I know that if I delete my disco the problem is solved but I don't wanna go the easy way.
     
  4. Beetle

    Beetle L9: Fashionable Member

    Messages:
    627
    Positive Ratings:
    174
    The compile log shows you percentages
     
  5. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,538
    The compile log doesn't help for this, because entity count(or data) is not the same as edict count.

    The hard limit is 2048 edicts, run-time functions will add a variable amount, up to potentially around 600. You can see how many edicts are currently used by entering cl_showents in the console and looking at the numbers (the last number, highest, will be what you want to look at). If you load the map with only you on it, there will be only a handful of non-map edicts created compared to a full server of people. You'll want to keep that last number around or below 1400 to be safe.
     
  6. zenarium

    zenarium L2: Junior Member

    Messages:
    82
    Positive Ratings:
    2
    How do I acess the console in hammer?
     
  7. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,538
    There isn't one. That's an in-game command.
     
  8. zenarium

    zenarium L2: Junior Member

    Messages:
    82
    Positive Ratings:
    2
    This is what appears on the console:

    Ent 0: class 'CWorld'
    Ent 1: class 'CTFPlayer'
    Ent 25: class 'CTFTeam'
    Ent 26: class 'CTFTeam'
    Ent 27: class 'CTFTeam'
    Ent 28: class 'CTFTeam'
    Ent 30: class 'CTFPlayerResource'
    Ent 31: class 'CTFObjectiveResource'
    Ent 32: class 'CMonsterResource'
    Ent 33: class 'CMannVsMachineStats'
    Ent 34: class 'CTFGameRulesProxy'
    Ent 35: class 'CVoteController'
    Ent 38: class 'CParticleSystem'
    Ent 40: class 'CParticleSystem'
    Ent 42: class 'CParticleSystem'
    Ent 44: class 'CParticleSystem'
    Ent 46: class 'CParticleSystem'
    Ent 48: class 'CParticleSystem'
    Ent 50: class 'CParticleSystem'
    Ent 52: class 'CParticleSystem'
    Ent 54: class 'CParticleSystem'
    Ent 55: class 'CParticleSystem'
    Ent 56: class 'CParticleSystem'
    Ent 57: class 'CParticleSystem'
    Ent 58: class 'CParticleSystem'
    Ent 62: class 'CBaseEntity'
    Ent 63: class 'CBaseEntity'
    Ent 64: class 'CBaseEntity'
    Ent 65: class 'CBaseEntity'
    Ent 68: class 'CBaseEntity'
    Ent 69: class 'CBaseEntity'
    Ent 151: class 'CDynamicProp'
    Ent 153: class 'CDynamicProp'
    Ent 155: class 'CWaterLODControl'
    Ent 156: class 'CSpotlightEnd'
    Ent 157: class 'CBeam'
    Ent 158: class 'CSpotlightEnd'
    Ent 159: class 'CBeam'
    Ent 160: class 'CSpotlightEnd'
    Ent 161: class 'CBeam'
    Ent 162: class 'CSpotlightEnd'
    Ent 163: class 'CBeam'
    Ent 164: class 'CSpotlightEnd'
    Ent 165: class 'CBeam'
    Ent 166: class 'CSpotlightEnd'
    Ent 167: class 'CBeam'
    Ent 168: class 'CSpotlightEnd'
    Ent 169: class 'CBeam'
    Ent 170: class 'CSpotlightEnd'
    Ent 171: class 'CBeam'
    Ent 172: class 'CSpotlightEnd'
    Ent 173: class 'CBeam'
    Ent 174: class 'CTFViewModel'
    Ent 175: class 'CTFViewModel'
    Ent 177: class 'CTFScatterGun'
    Ent 178: class 'CTFLunchBox_Drink'
    Ent 179: class 'CTFBat'
    Ent 180: class 'CTFWearable'
    Ent 181: class 'CTFWearable'
    Ent 182: class 'CTFWearable'
    Ent 183: class 'CTeamRoundTimer'
    Ent 184: class 'CSceneEntity'


    Does it mean I have 184 entities?

    Edit: I confirmed that 184 isn't the number of entities because I added 5 more lights( 10 more entities).
     
    Last edited: Jul 4, 2013
  9. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,538
    Your edit is actually what I was getting at with edicts not being the same as entities. Some entities require the usage of more than one edict (entity dictionary, a space for data in the engine), such as lights, ropes, and other things. Notice in your post the pairs of CSpotlightEnd and CBeam? If I remember correctly each pair is from one entity, because it is technically two components.

    If you are really that low, I'm confused as to how you are getting the no free edicts error.
     
  10. zenarium

    zenarium L2: Junior Member

    Messages:
    82
    Positive Ratings:
    2
    You are as confused as me...

    The entities are always there but the error only occurs when I turn on the lights of the disco. What happens is that some lights are on and when I press a buttom those lights turn off and the disco lights turn on. I also have some musics that I select with other 3 buttoms and that part works fine. Do you think that the error occurs because I turn off 10-15 lights and turn on 15-20 at the same time?
     
  11. Blade x64

    aa Blade x64 Logical insanity

    Messages:
    217
    Positive Ratings:
    521
    I've been having troubles with edicts as well. It appears that there are edicts unaccounted for when using certain edict commands.

    Using report_entities on this map, I get "Total 1115 entities (0 empty, 1093 edicts)." Using cl_entityreport I get a list of 467 ents, but the numbering ends on Ent 1660. When using sv_lowedict_action 1 with sv_lowedict_threshold 2048 (you need to be recording a log file for it to show), I get "L 07/04/2013 - 12:48:15: Warning: free edicts below threshold. 386 free edicts remaining." when I run the map.
     
  12. zenarium

    zenarium L2: Junior Member

    Messages:
    82
    Positive Ratings:
    2
    Anyone wanna add me on skpe so I can share my screen and show my map?

    My skype username: zenarium

    And that way we can also talk and try to discover a solution.
     
  13. zenarium

    zenarium L2: Junior Member

    Messages:
    82
    Positive Ratings:
    2
    I found the problem! The problem was a logic_timer that was affecting every light of the disco. Don't know why it was generating the error but I eliminated it and now the disco works fine.

    If I don't have more problems, the map is almost done and soon I will launch my server.
     
  14. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,538
    I saw that today's update fixed an issue related to edicts, perhaps it wasn't actually the fault of you overdoing something.
     
  15. theharribokid

    aa theharribokid

    Messages:
    867
    Positive Ratings:
    839
    Today's update patched Windows server's from crashing on 32 player stock maps since the Major Update, not sure if Sourcemod threw them over the entity edge or something