[Rseding91] Chunk deletion failure

This subforum contains all the issues which we already resolved.
POPISowyNumer
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Thu May 05, 2016 1:31 pm
Contact:

[Rseding91] Chunk deletion failure

Post by POPISowyNumer »

After trying to delete some of the chunks generated via self-written command, game crashed.
Then I tried the command posted as a tip numerous time on the forum, and game crashed as well.

Attached below documents that seem to be the crash logs.
Attachments
factorio-current.log
(23.1 KiB) Downloaded 97 times
factorio-previous.log
(24.27 KiB) Downloaded 90 times

Loewchen
Global Moderator
Global Moderator
Posts: 8284
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Chunk deletion failure

Post by Loewchen »

Post the commands you used, the save file and the .ziped mod folder please.

POPISowyNumer
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Thu May 05, 2016 1:31 pm
Contact:

Re: Chunk deletion failure

Post by POPISowyNumer »

Here's the save dropbox link https://www.dropbox.com/s/6wppkc0hcp7sm ... 3.zip?dl=0
mod list is attached
also while i tried to redo the upper command factorio crashed again, and simultaneously mozilla crashed too, though i do not know how much of a coincidence was that.
commands were:
/c for x=4096,8196 do for y=-8196,8196 do game.player.surface.delete_chunk{x, y} end end
/c game.player.surface.delete_chunk{0, 4}
Attachments
mods.zip
(56.83 MiB) Downloaded 105 times

Loewchen
Global Moderator
Global Moderator
Posts: 8284
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Chunk deletion failure

Post by Loewchen »

Does it crash always when running the command or just once/sometimes?

POPISowyNumer
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Thu May 05, 2016 1:31 pm
Contact:

Re: Chunk deletion failure

Post by POPISowyNumer »

All three times I ran any of those commands it crashed.
Few other variations of this command do nothing.
Among them this one:
/c for chunk in game.player.surface.get_chunks() do
if chunk.x > 2048 or chunk.x < -2048 or chunk.y > 2048 or chunk.y < -2048 then
game.player.surface.delete_chunk(chunk)
end
end
This command was processed by game, and failed to produce any result, be it deletion of chunks or crash.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Chunk deletion failure

Post by Rseding91 »

Both of the crashes in the log files you provided are fixed in 0.16.
If you want to get ahold of me I'm almost always on Discord.

POPISowyNumer
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Thu May 05, 2016 1:31 pm
Contact:

Re: Chunk deletion failure

Post by POPISowyNumer »

Rseding91 wrote:Both of the crashes in the log files you provided are fixed in 0.16.
Rseding91 wrote:fixed in 0.16.
Oh dammit.
So...
Is there any crashless way to get rid of excess chunks in 0.15 or am I stuck with 200MB map until whenever my modpack will be 0.16 compatible?

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Chunk deletion failure

Post by Rseding91 »

POPISowyNumer wrote:
Rseding91 wrote:Both of the crashes in the log files you provided are fixed in 0.16.
Rseding91 wrote:fixed in 0.16.
Oh dammit.
So...
Is there any crashless way to get rid of excess chunks in 0.15
Nope.
If you want to get ahold of me I'm almost always on Discord.

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Chunk deletion failure

Post by Bilka »

Rseding91 wrote:
POPISowyNumer wrote: Is there any crashless way to get rid of excess chunks in 0.15
Nope.
? I don't quite understand; there's mods that delete chunks that work perfectly fine.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

POPISowyNumer
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Thu May 05, 2016 1:31 pm
Contact:

Re: Chunk deletion failure

Post by POPISowyNumer »

I have retested one of the commands, and apparently this time my PC had run out of memory.
Attaching the new crash log
Attachments
factorio-current.log
(37.55 KiB) Downloaded 123 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Chunk deletion failure

Post by Rseding91 »

The crash should be fixed in 0.15.36 (labeled experimental right now).
If you want to get ahold of me I'm almost always on Discord.

POPISowyNumer
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Thu May 05, 2016 1:31 pm
Contact:

Re: Chunk deletion failure

Post by POPISowyNumer »

I have retested the '/c for x=4096,8196 do for y=-8196,8196 do game.player.surface.delete_chunk{x, y} end end' command with much smaller range for x, first for 8000-8196 and then 7800-8000.
Both commands didn't crash the game, suggesting that origin of crash is memory related, but again, both commands failed to delete the chunks, which seems to be quite inconsistent with what command suggests to be for.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Chunk deletion failure

Post by Rseding91 »

POPISowyNumer wrote:I have retested the '/c for x=4096,8196 do for y=-8196,8196 do game.player.surface.delete_chunk{x, y} end end' command with much smaller range for x, first for 8000-8196 and then 7800-8000.
Both commands didn't crash the game, suggesting that origin of crash is memory related, but again, both commands failed to delete the chunks, which seems to be quite inconsistent with what command suggests to be for.
The positions are chunk based not world position based. You asked it to delete all chunks between world positions x=131072 through x=262272.

See: http://lua-api.factorio.com/latest/LuaS ... lete_chunk
If you want to get ahold of me I'm almost always on Discord.

POPISowyNumer
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Thu May 05, 2016 1:31 pm
Contact:

Re: Chunk deletion failure

Post by POPISowyNumer »

Rseding91 wrote:The positions are chunk based not world position based. You asked it to delete all chunks between world positions x=131072 through x=262272.

See: http://lua-api.factorio.com/latest/LuaS ... lete_chunk
Well...
Due to some slight underestimation of how much map would this command reveal /c game.forces.player.chart(game.player.surface, {lefttop = {x = -8192, y = -8192}, rightbottom = {x = 8192, y = 8192}}), I decided to delete some of the excess chunks, to reduce map size and stop factorio from chugging down my entire RAM, which led me to encounter the whole crashing issue.
I assumed values used by this command are the same magnitude as those that are supposed to go in the deleting command.
If that's not right, I ask for some clarification.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Chunk deletion failure

Post by Rseding91 »

POPISowyNumer wrote:
Rseding91 wrote:The positions are chunk based not world position based. You asked it to delete all chunks between world positions x=131072 through x=262272.

See: http://lua-api.factorio.com/latest/LuaS ... lete_chunk
Well...
Due to some slight underestimation of how much map would this command reveal /c game.forces.player.chart(game.player.surface, {lefttop = {x = -8192, y = -8192}, rightbottom = {x = 8192, y = 8192}}), I decided to delete some of the excess chunks, to reduce map size and stop factorio from chugging down my entire RAM, which led me to encounter the whole crashing issue.
I assumed values used by this command are the same magnitude as those that are supposed to go in the deleting command.
If that's not right, I ask for some clarification.
Charting uses world positions and chunk deletion uses chunk positions. Chunk positions are world positions / 32.
If you want to get ahold of me I'm almost always on Discord.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Chunk deletion failure

Post by Rseding91 »

I've updated the Lua docs for 0.16 to better describe the difference between a map position and a chunk position.
If you want to get ahold of me I'm almost always on Discord.

POPISowyNumer
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Thu May 05, 2016 1:31 pm
Contact:

Re: Chunk deletion failure

Post by POPISowyNumer »

Rseding91 wrote:I've updated the Lua docs for 0.16 to better describe the difference between a map position and a chunk position.
So two birds with one stone.
Good to be useful tester

POPISowyNumer
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Thu May 05, 2016 1:31 pm
Contact:

Re: Chunk deletion failure

Post by POPISowyNumer »

Welp.
So I have .36 installed, just checked that to be sure.
I tried to delete some chunks on overly big map... and crash.
Okay, maybe I went too hard on my poor pc, let's size down
Crash again.
So I loaded smallest version of that map i have now, crash again.
AND
on freshly new map it worked as intended.
I am deeply confused.
Attachments
factorio-previous.log
(24.74 KiB) Downloaded 79 times
factorio-current.log
(12.11 KiB) Downloaded 73 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Chunk deletion failure

Post by Rseding91 »

POPISowyNumer wrote:Welp.
So I have .36 installed, just checked that to be sure.
I tried to delete some chunks on overly big map... and crash.
Okay, maybe I went too hard on my poor pc, let's size down
Crash again.
So I loaded smallest version of that map i have now, crash again.
AND
on freshly new map it worked as intended.
I am deeply confused.
Your new crash looks completely different. Can you upload the save you're using and the command you're running that crashes it?
If you want to get ahold of me I'm almost always on Discord.

POPISowyNumer
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Thu May 05, 2016 1:31 pm
Contact:

Re: Chunk deletion failure

Post by POPISowyNumer »

Save's attached, with new crash log
Commands that crashed this save were
/c for x=7,8 do for y=7,8 do game.player.surface.delete_chunk{x, y} end end
and
/c for x=3,4 do for y=3,4 do game.player.surface.delete_chunk{x, y} end end
in the bigger map the values were just a tad bigger.

There's no running radars that cover that space, although I think I was using Bob's MK5 radars on that map before.
Attachments
factorio-current.log
(24.69 KiB) Downloaded 82 times
Bob 1.zip
(2.89 MiB) Downloaded 68 times

Post Reply

Return to “Resolved Problems and Bugs”