Palats / mapshot

Factorio mod to export maps as zoomable html
Apache License 2.0
77 stars 12 forks source link

Mapshot hangs after generating map #34

Closed kiwiz closed 11 months ago

kiwiz commented 11 months ago

I'm running mapshot headless using Xvfb. It works perfectly, but Factorio doesn't close after the map generation is complete.

Palats commented 11 months ago

The automatic closing tends indeed to be a bit wonky. Would you have details about your setup? Esp. command line used & mods (if any)

kiwiz commented 11 months ago

I'm using a fairly large mod list, but I can repro without anything loaded. I do see a log line from mapshot reporting that the processing is done:

162.074 Script @__mapshot__/control.lua:121: Mapshot done at mapshot/World/d-bc661d6a/

Command:

xvfb-run \
    ./mapshot render /tmp/World.zip \
    --factorio_binary factorio/bin/x64/factorio \
    --factorio_datadir factorio \
    --tilemin 16 \
    --logtostderr --factorio_verbose &
kiwiz commented 11 months ago

I don't see a marking as done @" log line, so it seems like set_wait_for_screenshots_to_finish might be blocking. I'll do some more testing.

kiwiz commented 11 months ago

Figured it out! Tl;Dr I should've read this more carefully:

Warning: the generation time & disk usage increases very quickly. At maximum resolution, it will take forever to generate and use up several gigabytes of space.

I assumed that seeing Mapshot done at mapshot/World/d-bc661d6a/ meant that the job was done, but the screenshots are actually async! This also explains why the outer portions of my generated maps weren't loading correctly. :]

Palats commented 11 months ago

Ah yes indeed, that is misleading - I've updated the message to help a bit. Thanks for digging into it!