shadowmage45 / AncientWarfare

Updated Ancient Warfare mod for Minecraft 1.5.2+
http://ancientwarfare.wikispaces.com/
Other
10 stars 8 forks source link

Chicken Farms have unlimited storage causing server crash if the Farm block is broken #8

Closed TechStack closed 10 years ago

TechStack commented 10 years ago

Chicken farms appear to have unlimited storage. I broke a chicken farm on my server after it had been running for days and 37K entities (eggs from what I could see) had exploded from the block before I finally killed the server because it was running at 100% cpu usage.

Note the chicken farm had ~ 20 chickens in it at the time.

We haven't tried but are concerned the problem may also extend to other farm blocks.

TechStack commented 10 years ago

This was for .034 beta.

shadowmage45 commented 10 years ago

Thanks for the report -- I will investigate this shortly, and hope to have a resolution for this weekends update.

You are correct in thinking that it might effect more civic blocks, as they all share 90% of the same code.

It is likely related to my handling of inventory overflow -- if the civic inventory is full and does an action that would add an item, it just stuffs it into an invisible 'overflow' inventory (which it them attempts to dump into the normal inventory every few ticks). It sounds like I didn't cap/bound the upper range for size on the overflow, and/or did not tell the farm to stop harvesting eggs when the normal inventory is full.

Should be an easy thing to fix, thanks again for the report.

TechStack commented 10 years ago

Sounds great, we've been working on making a public ( no white list) server for AW. This bug was the main thing stopping me from making an announcement with the IP because its too easy for someone force the server to crash. Your welcome to join us on the server if you play your own mod :)

Also we have found other bugs. Is git hub your preferred for us to use to report them ?

shadowmage45 commented 10 years ago

Yes, github is an excellent place to report bugs, and the most likely place where the information will be retained until I get it fixed :)

If you get them listed today/tomorrow morning, I will try and get them fixed for this weekends release as well :)