cff29546 / pzmap2dzi

A command-line tool to convert Project Zomboid map data into Deep Zoom format
MIT License
53 stars 17 forks source link

BufferError: cannot close exported pointers exist #6

Open Slakinator opened 1 year ago

Slakinator commented 1 year ago

VERY confused with what is happening here, trying my best to fix this issue but found no help. Any ideas?

job: 0/0 worker: 0/16
job: 0/0 worker: 0/16
job: 0/0 worker: 0/16
job: 0/0 worker: 0/16
job: 0/0 worker: 0/16
job: 0/0 worker: 0/16
job: 0/0 worker: 0/16
job: 0/0 worker: 0/16
job: 0/0 worker: 0/16
job: 0/0 worker: 0/16
D:\SteamLibrary\steamapps\common\ProjectZomboid\media\texturepacks\Erosion.pack: version 0, 5 pages
D:\SteamLibrary\steamapps\common\ProjectZomboid\media\texturepacks\ApCom.pack: version 0, 1 pages
D:\SteamLibrary\steamapps\common\ProjectZomboid\media\texturepacks\RadioIcons.pack: version 0, 1 pages
D:\SteamLibrary\steamapps\common\ProjectZomboid\media\texturepacks\ApComUI.pack: version 0, 1 pages
D:\SteamLibrary\steamapps\common\ProjectZomboid\media\texturepacks\JumboTrees2x.pack: version 0, 12 pages
D:\SteamLibrary\steamapps\common\ProjectZomboid\media\texturepacks\Tiles2x.floor.pack: version 1, 4 pages
D:\SteamLibrary\steamapps\common\ProjectZomboid\media\texturepacks\Tiles2x.pack: version 1, 152 pages
job: 17069/17069 worker: 0/16
job: 0/0 worker: 0/16
job: 0/0 worker: 0/16
job: 0/0 worker: 0/16
job: 0/0 worker: 0/16
job: 0/0 worker: 0/16
job: 0/0 worker: 0/16
render [base] for map [default]
Preparing data
Planning tasks
Working
job:[(21, 677, 222, [[1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0, 0, 0]])] error, Exception: cannot close exported pointers exist
Traceback (most recent call last):
  File "C:\Users\user\Desktop\pzmap2dzi-main\pzmap2dzi\mptask.py", line 53, in _run
    result = self.worker.on_job(arg)
  File "C:\Users\user\Desktop\pzmap2dzi-main\pzmap2dzi\scheduling.py", line 326, in on_job
    cl.cleanup()
  File "C:\Users\user\Desktop\pzmap2dzi-main\pzmap2dzi\scheduling.py", line 248, in cleanup
    self.mem.release(index)
  File "C:\Users\user\Desktop\pzmap2dzi-main\pzmap2dzi\shared_memory_image.py", line 54, in release
    self.created[index].close()
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\multiprocessing\shared_memory.py", line 230, in close
    self._mmap.close()
BufferError: cannot close exported pointers exist
worker[8] error[cannot close exported pointers exist]
job: 3983/1371044 worker: 0/16 cache: 372.00 MB
time used 0:00:11.125183
cache max used: 440.00 MB
Render stopped by hotkey.
All done
Press any key to continue . . .
cff29546 commented 1 year ago

It seems the shared memory acceleration is not working correctly on your machine. You could try to turn off shared memory acceleration by setting enable_cache to false in conf.yaml.

Also, can you offer your machine specifications (including the python and OS version) so I can try to reproduce and analyze the problem?

Slakinator commented 1 year ago

It seems the shared memory acceleration is not working correctly on your machine. You could try to turn off shared memory acceleration by setting enable_cache to false in conf.yaml.

Also, can you offer your machine specifications (including the python and OS version) so I can try to reproduce and analyze the problem?

Omfg so this is a massive problem. For whatever reason, trying to run this after changing that conf file literally filled the entire rest of my m.2 drive. I waited a few hours and it said it was out of space, so I went in to check the folder and it was 289GB??? Something must have seriously broken here, what it made was not even useable.

I suppose now I can tell you my OS version is Win 10 64-bit (build 19045) and that the python used for this is 3.10.11 My PC is running 64GB RAM, a newly installed Gigabyte 4070, and an intel 12600k CPU

cff29546 commented 1 year ago

Omfg so this is a massive problem. For whatever reason, trying to run this after changing that conf file literally filled the entire rest of my m.2 drive. I waited a few hours and it said it was out of space, so I went in to check the folder and it was 289GB??? Something must have seriously broken here, what it made was not even useable.

You do need more storage for isometric map output. For game version 41, it will take around 450GB. You can check the Requirement section on the project README.md.

Storage: The full output size of isometric map for game version 41.78 is around 450GB (or 2.5TB with lossless png format) and consists of 4M files.

Alternatively, you could run run_top_view_only.bat for a top view only map to reduce the space and time usage.

Slakinator commented 1 year ago

Wow that is a lot of space, and I'm sorry for not catching that. Unfortunately, top view seems to not work even when downloaded properly. I'm getting a blank black nothingness with no options showing up under the layers tab and it appears to be non functional on both firefox and chrome. Unsure why.

cff29546 commented 1 year ago

Wow that is a lot of space, and I'm sorry for not catching that. Unfortunately, top view seems to not work even when downloaded properly. I'm getting a blank black nothingness with no options showing up under the layers tab and it appears to be non functional on both firefox and chrome. Unsure why.

Thank you for the feedback. I just located and fixed an issue preventing the UI from working when only top-view data exists. You can update to the latest code and redo the rendering. Or you can overwrite the pzmap.js in your output with the new html/pzmap.js

Slakinator commented 1 year ago

Well would you look at that, it works on my end. And no problem, glad I can help you out!