ClaudeMetz / FactoryPlanner

A mod for Factorio. Allows you to plan out your production in detail.
https://mods.factorio.com/mod/factoryplanner
MIT License
89 stars 43 forks source link

Migration to Space Age causes an error #352

Open dbene opened 13 hours ago

dbene commented 13 hours ago

Problem Description

Hi, i tired updating our dedicated server to space age and during startup following error occurred. I tested a local singleplayer savegame and the same error in factoryplanner::on_configuration_changed happend.

   0.000 2024-10-21 18:08:44; Factorio 2.0.7 (build 79385, linux64, headless)
   0.000 Operating system: Linux
   0.000 Program arguments: "/opt/factorio/bin/x64/factorio" "--port" "34197" "--server-settings" "/factorio/config/server-settings.json" "--server-banlist" "/factorio/config/server-banlist.json" "--rcon-port" "27015" "--server-whitelist" "/factorio/config/server-whitelist.json" "--use-server-whitelist" "--server-adminlist" "/factorio/config/server-adminlist.json" "--rcon-password" <private> "--server-id" "/factorio/config/server-id.json" "--start-server-load-latest" 
   0.000 Config path: /opt/factorio/config/config.ini
   0.000 Read data path: /opt/factorio/data
   0.000 Write data path: /factorio [45885/76587MB]
   0.000 Binaries path: /opt/factorio/bin
   0.028 System info: [CPU: Intel Xeon Processor (Skylake, IBRS, no TSX), 4 cores, RAM: 7751 MB]
   0.029 Environment: DISPLAY=<unset> WAYLAND_DISPLAY=<unset> DESKTOP_SESSION=<unset> XDG_SESSION_DESKTOP=<unset> XDG_CURRENT_DESKTOP=<unset> SDL_VIDEODRIVER=<unset> __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
   0.031 Running in headless mode
   0.031 Audio is disabled
   0.032 Info ModManager.cpp:434: FeatureFlag expansion-shaders = true
   0.032 Info ModManager.cpp:434: FeatureFlag freezing = true
   0.032 Info ModManager.cpp:434: FeatureFlag quality = true
   0.032 Info ModManager.cpp:434: FeatureFlag rail-bridges = true
   0.032 Info ModManager.cpp:434: FeatureFlag segmented-units = true
   0.032 Info ModManager.cpp:434: FeatureFlag space-travel = true
   0.032 Info ModManager.cpp:434: FeatureFlag spoiling = true
   0.038 Loading mod core 0.0.0 (data.lua)
   0.067 Loading mod base 2.0.7 (data.lua)
   0.347 Loading mod elevated-rails 2.0.7 (data.lua)
   0.405 Loading mod flib 0.15.0 (data.lua)
   0.430 Loading mod quality 2.0.7 (data.lua)
   0.454 Loading mod factoryplanner 2.0.1 (data.lua)
   0.472 Loading mod space-age 2.0.7 (data.lua)
   0.905 Loading mod base 2.0.7 (data-updates.lua)
   0.949 Loading mod quality 2.0.7 (data-updates.lua)
   1.028 Loading mod space-age 2.0.7 (data-updates.lua)
   1.294 Checksum for core: 649243273
   1.294 Checksum of base: 2653731351
   1.294 Checksum of elevated-rails: 1891730324
   1.294 Checksum of flib: 2235140407
   1.294 Checksum of quality: 3715527832
   1.294 Checksum of factoryplanner: 2719536303
   1.294 Checksum of space-age: 3499025889
   2.131 Prototype list checksum: 4009678113
   2.279 Info PlayerData.cpp:66: Local player-data.json available, timestamp 1729534121
   2.279 Info PlayerData.cpp:73: Cloud player-data.json unavailable
   2.282 Factorio initialised
   2.282 Info ServerSynchronizer.cpp:20: nextHeartbeatSequenceNumber(0) initialized Synchronizer nextTickClosureTick(0).
   2.283 Info ServerMultiplayerManager.cpp:803: updateTick(18446744073709551615) changing state from(Ready) to(PreparedToHostGame)
   2.283 Info ServerMultiplayerManager.cpp:803: updateTick(18446744073709551615) changing state from(PreparedToHostGame) to(CreatingGame)
   2.283 Loading map /factorio/saves/dbsFactory.zip: 6879516 bytes.
   2.298 Loading level.dat: 22202220 bytes.
   2.314 Info Scenario.cpp:178: Map version 1.1.110-0
   2.320 Info PrototypeMigrationList.cpp:195: Activating migration base/1.2.0 stack inserter rename.json
   2.320 Info PrototypeMigrationList.cpp:195: Activating migration base/2.0.0-biter-egg.json
   2.320 Info PrototypeMigrationList.cpp:195: Activating migration base/2.0.0-internal.json
   2.320 Info PrototypeMigrationList.cpp:195: Activating migration base/2.0.0-internal2.json
   2.321 Info PrototypeMigrationList.cpp:195: Activating migration base/2.0.0-internal3.json
   2.321 Info PrototypeMigrationList.cpp:195: Activating migration base/2.0.0.json
   2.321 Info PrototypeMigrationList.cpp:195: Activating migration space-age/aquilo-tilesets.json
   2.321 Info PrototypeMigrationList.cpp:195: Activating migration space-age/biolab.json
   2.321 Info PrototypeMigrationList.cpp:195: Activating migration space-age/internal.json
   2.321 Info PrototypeMigrationList.cpp:195: Activating migration space-age/jelly-yum-rename.json
   2.322 Info PrototypeMigrationList.cpp:195: Activating migration space-age/shattered-planet.json
   2.322 Info PrototypeMigrationList.cpp:195: Activating migration space-age/tungsten-belt-rename.json
   3.219 Info ItemStack.cpp:271: Fixing non-stackable ItemStack count from 7 to 1 for: pointer: 0x000070f02a3ce248, item pointer: (nil), ID: 318, count: 7, stack size: 1, prototype stack size: 1, prototype type: item.
   4.035 Blueprint storage "blueprint-storage-2.dat" was not found, trying to load previous version storage "blueprint-storage.dat"
   5.150 Loading script.dat: 465330 bytes.
   5.168 Checksum for script __level__/control.lua: 2463946943
   5.206 Checksum for script __factoryplanner__/control.lua: 3753729346
   5.224 Applying migration: Base Mod: 2.0.0.lua
   5.471 Error ServerMultiplayerManager.cpp:84: MultiplayerManager failed: "The mod Factory Planner (2.0.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event factoryplanner::on_configuration_changed
__factoryplanner__/backend/migrations/migration_1_2_15.lua:10: bad argument #1 of 2 to 'pairs' (table expected, got nil)
stack traceback:
    [C]: in function 'pairs'
    __factoryplanner__/backend/migrations/migration_1_2_15.lua:10: in function 'migration_function'
    __factoryplanner__/backend/handlers/migrator.lua:63: in function 'apply_migrations'
    __factoryplanner__/backend/handlers/migrator.lua:101: in function 'migrate_player_tables'
    __factoryplanner__/backend/init.lua:235: in function <__factoryplanner__/backend/init.lua:224>"
   5.471 Info ServerMultiplayerManager.cpp:803: updateTick(18446744073709551615) changing state from(CreatingGame) to(InitializationFailed)
   5.471 Info CommandLineMultiplayer.cpp:211: Exit point.
   5.484 Info ServerMultiplayerManager.cpp:146: Quitting multiplayer connection.
   5.484 Info ServerMultiplayerManager.cpp:803: updateTick(18446744073709551615) changing state from(InitializationFailed) to(Closed)
   5.618 Info UDPSocket.cpp:233: Closing socket
   5.619 Goodbye

Mods from mod-list.json

I know it is recommended to start a new save game with space age but i would appreciate being able to continue existing ones.

Reproduction

  1. Update server to Space Age
  2. Update mods
  3. Starting server with old save game
ClaudeMetz commented 13 hours ago

Hello, appreciate the nice report! Could you provide me the save file for this? It's hard to debug migrations otherwise.

dbene commented 12 hours ago

yes. here we go. dbsFactory_preUpdate.zip

ClaudeMetz commented 10 hours ago

Thanks