[1.1.50] Crash with set_chunk_generated_status() + chunk position too big

Bugs that are actually features.
Post Reply
Honktown
Smart Inserter
Smart Inserter
Posts: 1026
Joined: Thu Oct 03, 2019 7:10 am
Contact:

[1.1.50] Crash with set_chunk_generated_status() + chunk position too big

Post by Honktown »

1) What'd you do? Accidentally put a too-large chunk-position into set_chunk_generated_status().
2) What happened?
26.197 Error Chunk.cpp:728: Trying to make chunk at unreasonable position [31249, 999999]
3) Expected? Soft error.

Reproduction:

Code: Select all

/c
local player = game.player
local surface = player.surface
surface.set_chunk_generated_status({(1e6-5) / 32, (1e6 - 5 / 32)}, defines.chunk_generated_status.entities)
The mistake is (1e6 - 5 / 32), which is 999,999 (the 27/32 floored to 0, chunk position is ints).

Log snippet:
crash_chunk_status_log.txt
(7.28 KiB) Downloaded 48 times
There are similar reports about unreasonable positions, but I believe when it is caused script-side (as opposed to a corrupted save), there should be a soft error.

viewtopic.php?f=23&t=90831 is a similar report where the resolution is "fix the unreasonable code" while not considering a soft error as the result vs hard crash.
I have mods! I guess!
Link

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2250
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [1.1.50] Crash with set_chunk_generated_status() + chunk position too big

Post by boskid »

Thanks for the report. In order to not crash, please do not do provide too large chunk positions.

Post Reply

Return to “Not a bug”