Palats / mapshot

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

Always exits with error? #28

Closed AstraLuma closed 1 year ago

AstraLuma commented 1 year ago
 108.343 Script @__mapshot__/control.lua:267: Unique ID: bfa07e93
 108.344 Script @__mapshot__/control.lua:278: Map ID: c580f963
 108.344 Script @__mapshot__/control.lua:70: Mapshot target mapshot/default/
 108.344 Script @__mapshot__/control.lua:71: Mapshot data target mapshot/default/d-bfa07e93/
 108.344 Script @__mapshot__/control.lua:72: Mapshot unique id bfa07e93
 108.344 Script @__mapshot__/control.lua:76: Available surface: 1 nauvis
 108.437 Script @__mapshot__/control.lua:235: Tile size 1024: 4 tiles to generate
 108.437 Script @__mapshot__/control.lua:235: Tile size 512: 4 tiles to generate
 108.438 Script @__mapshot__/control.lua:235: Tile size 256: 9 tiles to generate
 108.438 Script @__mapshot__/control.lua:235: Tile size 128: 16 tiles to generate
 108.439 Script @__mapshot__/control.lua:235: Tile size 64: 42 tiles to generate
 108.441 Script @__mapshot__/control.lua:117: Mapshot done at mapshot/default/d-bfa07e93/
 131.022 Script @__mapshot__/control.lua:307: marking as done @1236812
I1105 04:37:08.244170      41 render.go:194] done file "/opt/factorio/script-output/mapshot-done-126b3ace-8d5a-4e85-8df5-625d2e1c844e" now exists
I1105 04:37:08.244279      41 render.go:200] output at mapshot/default/d-bfa07e93/
Output: /opt/factorio/script-output/mapshot/default/d-bfa07e93
I1105 04:37:08.244380      41 factorio.go:139] interrupt requested
I1105 04:37:08.244389      41 render.go:205] removed done-file "/opt/factorio/script-output/mapshot-done-126b3ace-8d5a-4e85-8df5-625d2e1c844e": <nil>
 131.124 Received SIGINT, shutting down
 131.616 Quitting: signal.
 131.659 Info BlueprintShelf.cpp:720: Saving blueprint storage.
 131.899 Goodbye
I1105 04:37:09.067831      41 factorio.go:151] Factorio returned: exit status 255
I1105 04:37:09.180875      41 root.go:37] temp dir "/tmp/mapshot3171645376" removed
Error: error while running Factorio: exit status 255

This is being executed in A Context, but I've been struggling tonight with behavior parity between "executing in situ" and "manual invocation".

Palats commented 1 year ago

Indeed, it returns an error more often than not, and the CLI mostly picks up whatever error code Factorio binary returned and carries it around. I haven't checked recently but at the time I never found a good way to have a clean exit really.

AstraLuma commented 1 year ago

If the mod indicates it's done, it doesn't matter what the exit code is factorio is, right?

Palats commented 1 year ago

Indeed, that's true - and given that having a meaningful error code from Factorio does not seem to work out, let's ignore it when there is some evidence that the render is done.

Palats commented 1 year ago

Build 0.0.16 changes the behavior for the CLI render command.