-
Notifications
You must be signed in to change notification settings - Fork 3
Darkage mapgen triggers Lua OOM #8
Comments
Hmm not good, must be the mapgen causing this issue when generating darkage blocks in new areas. I'll look into this. |
Please read this, it may help: https://forum.minetest.net/viewtopic.php?f=18&t=16043 |
Actually, why not use official API for generating ores/veines, look here, Paramat says it won't produce OOM, since it is done via engine, not lua: https://github.com/minetest/minetest/blob/master/doc/lua_api.txt#L4985 |
I don't have much time at the moment to work on this project but I'm able to merge anything that fixes this. The new optimisations in minetest are great and should be taken advantage of :) |
I'm keen on preserving darkage blocks in old maps too. |
I've updated that advice in the forum and am fairly confident it is correct as of 17th March 2018. Those could be applied (not by me). Even better, replace all that ore generation code with the ore generation API, there are now several types of oregen to choose from. This will increase mapgen speed and reduce Lua lag on a server. |
davisonio: i'd be willing to tackle converting the mapgen to the ore generation API if you are interested in switching over. Let me know. |
https://github.com/kakalak-lumberJack/darkage I have updated the mapgen.lua to use the register_ores method instead of the original custom mapgen (still available but unused in legacy_mapgen.lua in my fork). This should resolve the OOM errors, but I'd like to test it a bit more before I make the PR. I've tried to follow the spirit of the original mapgen within the given limitations of the register_ores methods but have taken a couple liberties to also better suit some of the newer biomes, such as Old red sandstone spawning in dessert stone and dessert_sandstone, etc. I'll be testing and tweaking noise_params and such a bit before I post but I would love to have any testing/feedback on my fork to make sure folks are happy with the prevalence, depths and other characteristics of the ores, before I make a PR. Thanks! |
I have a subgame that I profiled for some troubles, it has darkage mod, lua mem usage at 20-90 mb (print(collectgarbage("count")/1024), it lets me generate blocks for some time and then suddenly stops at "local data = vm:get_data()" step with "Lua: OOM error from mod 'darkage' in callback environment_OnGenerated(): not enough memory". Removing darkage makes server stable, mem use below 40mb at most without oom.
No OOMs on clean game though, I'm still investigating the issue :/
On a side note I noticed pretty damn suspiciously high usage of cpu by this mod even in passive mode:
The text was updated successfully, but these errors were encountered: