There is no reason why exceeding max_entities should cause a crash. Maybe it's a crash in your script, from a failed ent_create and accessing a NULL pointer?