Page 1 of 1

Screenshot causes crash with very small resolution values

Posted: Sat Nov 07, 2020 5:25 am
by GhostPirate
Running the following command is guaranteed to cause a crash:

game.take_screenshot{resolution={0.25,0.25}}

It seems that when the resolution is below 1 pixel, the game cannot handle it gracefully.

Log file attached.

Re: Screenshot causes crash with very small resolution values

Posted: Sat Nov 07, 2020 5:55 am
by valneq
While it is not acceptable that the game crashes there, I still wonder: why exactly do you even try doing that?

Re: Screenshot causes crash with very small resolution values

Posted: Sat Nov 07, 2020 6:01 am
by NotRexButCaesar
valneq wrote: Sat Nov 07, 2020 5:55 am While it is not acceptable that the game crashes there, I still wonder: why exactly do you even try doing that?
The things we have to do to find bugs in this game.

Re: Screenshot causes crash with very small resolution values

Posted: Sat Nov 07, 2020 6:42 am
by GhostPirate
@Valneq:

It was actually an accident:

- Try to take screenshots of very big base, but UPS is slow and walking is slow and train tracks are intentionally separate networks to prevent clogs
- Learn to use game.take_screenshot instead of /screenshot command
- Try to use parameters "position", "resolution" and "zoom", but accidentally put "resolution=0.25" instead of "zoom=0.25" for the last parameter
- Get confused when game returns errors that says "expects table, not double"
- Ok, think maybe game allows different x and y zoom amounts, no problem, change "0.25" to "{0.25,0.25}"
- Game crashes
- Read log file to try to understand why
- Realize I have "resolution" twice and no zoom
- Silly me
- Realize game still shouldn't crash
- Submit bug report, knowing full well developers are going to say "... ... ... why?"

Re: Screenshot causes crash with very small resolution values

Posted: Sat Nov 07, 2020 6:59 am
by valneq
Fair enough.

After all, you are just following my call for bug reports, see here:
viewtopic.php?f=5&t=90670

Re: Screenshot causes crash with very small resolution values

Posted: Sat Nov 07, 2020 10:07 am
by posila
... ... ... why?

Thanks for the report.
Fixed for 1.1