Open Someone3x7 opened 9 years ago
Thanks for the report and the patch, I'll have a look at it shortly. (I wanted to have a look this weekend, but didn't get around it yet. For now, let me just acknowledge your report).
Out of curiousity, how large were these worlds?
Besides your patch, it would be good to write a test case to check if all files are open. However, it seems that the resource module can only list the maximum number of open files, but not the current amount of open files.
The last few worlds had a little over 1,000,000 chunks each. Takes my old i5 couple days to parse one. I didn't want to get too deep into correcting the issue as I'm loosing my mind slowly and tend to make stupid mistakes with code these days.
With a large world world.iter_nbt caused a too many files open exception since it never closes the region files. The simple fix is to add a few lines to close the region files in world.py at line 95 so it looks like this:
edit: Updated fix after encountering again in an even larger world.