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 45 forks source link

Crash loading mod #361

Open amoss opened 1 week ago

amoss commented 1 week ago

Problem Description

This looks like the same issue as in https://github.com/ClaudeMetz/FactoryPlanner/issues/358 but it is present in the latest version (2.0.2). Doesn't require a save - just trying to activate the mod and restart Factorio triggers it.

7.814 Error AppManagerStates.cpp:1631: The mod Factory Planner (2.0.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event factoryplanner::on_configuration_changed
__factoryplanner__/backend/handlers/defaults.lua:123: attempt to index field 'prototypes' (a nil value)
stack traceback:
    __factoryplanner__/backend/handlers/defaults.lua:123: in function 'get_fallback'
    __factoryplanner__/backend/data/District.lua:27: in function 'init'
    __factoryplanner__/backend/migrations/migration_1_1_73.lua:53: in function 'migration_function'
    __factoryplanner__/backend/handlers/migrator.lua:64: in function 'apply_migrations'
    __factoryplanner__/backend/handlers/migrator.lua:102: in function 'migrate_player_tables'
    __factoryplanner__/backend/init.lua:235: in function <__factoryplanner__/backend/init.lua:224>`

factorio-current.log

I've got some of the Py mod enabled as well. Will attach a log for reference.

   1.664 Script @__aai-loaders__/data.lua:5: Log mods once: {
  Milestones = "1.4.1",
  ["aai-loaders"] = "0.2.3",
  base = "2.0.9",
  ["even-distribution"] = "2.0.2",
  factoryplanner = "2.0.2",
  flib = "0.15.0",
  jetpack = "0.4.2",
  pycoalprocessing = "3.0.8",
  pycoalprocessinggraphics = "3.0.0",
  pyindustry = "3.0.1",
  pypostprocessing = "3.0.6",
  pyrawores = "3.0.1",
  pyraworesgraphics = "3.0.0"
}

Reproduction

  1. Start Factorio
  2. Enable Factory Planner
  3. Crash happens! (not quite the template but close :) )
ClaudeMetz commented 3 days ago

Hi, thanks for the report. This is a different error than #358 actually. The crash you got can however only happen when loading a save, which the log confirms. I tried it by starting a new game with your modset, which works fine.

Do you happen to still have the save this occurred with?