[kovarex] [0.17.25] crash when loading game

Bugs that are actually features.
Sheridan
Burner Inserter
Burner Inserter
Posts: 12
Joined: Wed Dec 13, 2017 5:27 pm
Contact:

[kovarex] [0.17.25] crash when loading game

Post by Sheridan »

I play on my own server. My recent actions in the world: I launched a large enough reconstruction of a concrete pavement, there were a lot of bots in the air. I ran on other matters, but caught desynchronization, which grew to 30 jumps and grew further. I decided to restart the game, but after loading the card, the game began to crash. And although the server continued to work, but after restarting it also began to crash.
Fortunately, I have 512 autosave slots and I found the last "good" save. Therefore, I can show you what has changed in the world.
End of log file:

Code: Select all

  11.351 Verbose BlueprintLibrary.cpp:872: Player shelf: playerIndex = 0, nextRecordID = 356; timestamp = 1554462359; records: (id: 0, 355; label: "Old rails", preview: false, empty: false; book [id: 0, 350; label
: "Прямая", preview: false, empty: false] [id: 0, 351; label: "Тупик", preview: false, empty: false] [id: 0, 352; label: "T", preview: false, empty: false] [id: 0, 353; label: "+", preview: false, empty: false] [i
d: 0, 354; label: "Г", preview: false, empty: false]) (id: 0, 343; label: "Railroad", preview: false, empty: false; book [id: 0, 338; label: "4x", preview: false, empty: false] [id: 0, 339; label: "3x", preview: f
alse, empty: false] [id: 0, 340; label: "2x", preview: false, empty: false] [id: 0, 341; label: "1x", preview: false, empty: false] [id: 0, 342; label: "Linear", preview: false, empty: false]) (id: 0, 337; label:
"Railroad concrete", preview: false, empty: false; book [id: 0, 327; label: "1x", preview: false, empty: false] [id: 0, 328; label: "", preview: false, empty: false] [id: 0, 329; label: "3x", preview: false, empty
: false] [id: 0, 330; label: "4x", preview: false, empty: false] [id: 0, 331; label: "Linear", preview: false, empty: false] [id: 0, 332; label: "4x +", preview: false, empty: false] [id: 0, 333; label: "3x +", pr
eview: false, empty: false] [id: 0, 334; label: "2x +", preview: false, empty: false] [id: 0, 335; label: "1x +", preview: false, empty: false] [id: 0, 336; label: "Linear +", preview: false, empty: false]) (id: 0
, 349; label: "Rails stations", preview: false, empty: false; book [id: 0, 344; label: "Граница v.2.3", preview: false, empty: false] [id: 0, 345; label: "Жижепогрузчик v.1", preview: false, empty: false] [id: 0,
346; label: "Оутпост v 1.7", preview: false, empty: false] [id: 0, 347; label: "Рудопогрузочная v.1.3", preview: false, empty: false] [id: 0, 348; label: "Уранопогрузочная v.1.0", preview: false, empty: false]
Factorio crashed. Generating symbolized stacktrace, please wait ...
Raw stacktrace: 0xae64cb, 0xc7077d, 0x9df238, 0x9e1e15, 0x9e1f2e, 0x9f0833, 0xdb832c, 0xdba05c, 0xefaece, 0xefcccd, 0x180c61f, 0x794a, 0
  16.481 Warning Logger.cpp:503: Symbols.size() == 22, usedSize == 12
#0  0x0000000000c7077d in std::__uniq_ptr_impl<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::_M_ptr() const at /usr/include/c++/8/bits/unique_ptr.h:150
#1  0x00000000009df238 in std::unique_ptr<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::get() const at /usr/include/c++/8/bits/unique_ptr.h:343
#2  0x00000000009e1e15 in std::unique_ptr<LoggerFileWriteStream, std::default_delete<LoggerFileWriteStream> >::operator->() const at /usr/include/c++/8/bits/unique_ptr.h:337
#3  0x00000000009e1f2e in Logger::flush() at /tmp/factorio-build-TDBZHf/src/Util/Logger.cpp:541
#4  0x00000000009f0833 in Logger::logStacktrace(StackTraceInfo*) at /tmp/factorio-build-TDBZHf/src/Util/Logger.cpp:527
#5  0x0000000000db832c in Logging::flush() at /tmp/factorio-build-TDBZHf/src/Util/Logging.cpp:66
#6  0x0000000000dba05c in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, std::string const&) at /tmp/factorio-build-TDBZHf/src/Util/Logging.cpp:91
#7  0x0000000000efaece in Chunk::Chunk(Surface&, ChunkPosition const&) at /tmp/factorio-build-TDBZHf/src/Surface/Chunk.cpp:682 (discriminator 3)
#8  0x0000000000efcccd in Surface::getChunk(ChunkPosition const&) at /tmp/factorio-build-TDBZHf/src/Surface/Surface.cpp:228 (discriminator 2)
#9  0x000000000180c61f in AdvancedTile::registerEntity(Entity*) at /tmp/factorio-build-TDBZHf/src/Map/AdvancedTile.cpp:33
#10 0x000000000000794a in Surface::addEntityWithoutSetup(Entity*) at /tmp/factorio-build-TDBZHf/src/Surface/Surface.cpp:111
#11 (nil) in Map::loadData(MapDeserialiser&, GlobalModSettings const&, ProgressObserver*, bool) at /tmp/factorio-build-TDBZHf/src/Map/Map.cpp:690
#12 (nil) in Map::load(MapDeserialiser&, GlobalModSettings const&, ProgressObserver*, bool) at /tmp/factorio-build-TDBZHf/src/Map/Map.cpp:320
#13 0x0000000000000210 in std::__uniq_ptr_impl<Map, std::default_delete<Map> >::_M_ptr() const at /usr/include/c++/8/bits/unique_ptr.h:150
#14 0x0000000000001000 in std::unique_ptr<Map, std::default_delete<Map> >::get() const at /usr/include/c++/8/bits/unique_ptr.h:343
#15 0x0000000000000050 in std::unique_ptr<Map, std::default_delete<Map> >::release() at /usr/include/c++/8/bits/unique_ptr.h:365
#16 0x00007f8e6c000000 in std::unique_ptr<Map, std::default_delete<Map> >::operator=(std::unique_ptr<Map, std::default_delete<Map> >&&) at /usr/include/c++/8/bits/unique_ptr.h:289
#17 0x00007f8f04000000 in Scenario::loadFactory(Filesystem::Path const*, Filesystem::Path const&, ScenarioExecutionContext, LoadType, MapDeserialiser*, InputType, InputHandler*, MultiplayerManagerBase*, bool, Prog
ressObserver*, bool, InputListener*) at /tmp/factorio-build-TDBZHf/src/Scenario/Scenario.cpp:202
#18 0x00007f8f1008e154 in ParallelScenarioLoader::doLoad(ParallelScenarioLoader*, MapDeserialiser*, InputType, InputHandler*, MultiplayerManagerBase*, bool) at /tmp/factorio-build-TDBZHf/src/Scenario/ParallelScena
rioLoader.cpp:156
#19 0x0000000000252000 in execute_native_thread_routine at tmpDutlx.fake.c:?
#20 0x0000000000001000 in ?? at ??:0
#21 0x0000000000000230 in ?? at ??:0
Stack trace logging done
  21.560 Warning Logger.cpp:503: Symbols.size() == 17, usedSize == 11
  21.561 Error Chunk.cpp:682: Trying to make chunk at unreasonable position [-20, -32772]
Logger::writeStacktrace skipped.
  21.561 Error Util.cpp:97: Unexpected error occurred. If you're running the latest version of the game you can help us solve the problem by posting the contents of the log file on the Factorio forums.
Please also include the save file(s), any mods you may be using, and any steps you know of to reproduce the crash.
  21.561 Uploading log file
Game save and log file available here: https://drive.google.com/drive/folders/ ... sp=sharing
Last "good" save: _autosave188-last-good.zip
First "bad" save: _autosave189-first-bad.zip
Current "bad" save: _autosave266-current-bad.zip

Dominik
Former Staff
Former Staff
Posts: 658
Joined: Sat Oct 12, 2013 9:08 am
Contact:

Re: [0.17.25] crash when loading game

Post by Dominik »

Making chunk at unreasonable position. I think we had this somewhere before? Is it already fixed?

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

Re: [0.17.25] crash when loading game

Post by Bilka »

Dominik wrote:
Fri Apr 26, 2019 12:19 pm
Making chunk at unreasonable position. I think we had this somewhere before? Is it already fixed?
That is a common error when dividing by zero somewhere. This here doesn't happen in a place that was recently fixed (stickers and streams), so it's is unlikely that it is already fixed.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

kovarex
Factorio Staff
Factorio Staff
Posts: 8194
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.17.25] crash when loading game

Post by kovarex »

Is it possible to reproduce it base don the last good save? Is just loading it and waiting enough, or do we need to do something specific?

kovarex
Factorio Staff
Factorio Staff
Posts: 8194
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [kovarex] [0.17.25] crash when loading game

Post by kovarex »

I did a little research:

In the -first-bad, there are 2 entities with weird position.

One splitter is off.
One transport belt is off.

But when I loaded the last-good, the belt is on its place, but the splitter is already off, far enough to be almost unreachable, but not that far enough, to trigger the "unreasonable position" bug.
By a weird coincidence, around half the distance.

The belt, that is on correct position {-628, -101}, has then bad position on the first bad {-628, -1 048 677}
And now the magic trick:
1048677 - 101 = 1 048 576 = 2^20
And this is, I believe, too big of a co-incidence.
In other words, there is exactly 1 bit difference in the number representing the y coordinate of the entity.

When I compare the other wrong entity (the splitter, which was supposed to be vertically on -103, I suppose by the missing space), I could do the same.
Its y position is -524391, so the difference between the original, and changed position is 524391 - 103 = 524 288 = 2^19
And this is almost certainly NOT a coincidence.

Since there is exactly 2 bits difference, I can almost surely assume, that this is not problem of factorio, but memory corruption and I'm moving it to not a bug.
You should try to do a ram/cpu test on your computer.
Attachments
missing-splitter.png
missing-splitter.png (1.39 MiB) Viewed 1521 times

Post Reply

Return to “Not a bug”