Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-Recoverable Error on Game Load #435

Open
Merkantore opened this issue Nov 29, 2024 · 0 comments
Open

Non-Recoverable Error on Game Load #435

Merkantore opened this issue Nov 29, 2024 · 0 comments
Labels

Comments

@Merkantore
Copy link

Problem Description

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

Error while running event factoryplanner::on_configuration_changed
__factoryplanner__/backend/handlers/prototyper.lua:131: attempt to index local 'relevant_map' (a nil value)
stack traceback:
	__factoryplanner__/backend/handlers/prototyper.lua:131: in function 'find'
	__factoryplanner__/backend/handlers/prototyper.lua:203: in function 'validate_prototype_object'
	__factoryplanner__/backend/data/Machine.lua:237: in function 'validate'
	__factoryplanner__/backend/data/Line.lua:323: in function 'validate'
	__factoryplanner__/backend/data/Object.lua:291: in function '_validate'
	__factoryplanner__/backend/data/Floor.lua:238: in function 'validate'
	__factoryplanner__/backend/data/Factory.lua:238: in function 'validate'
	__factoryplanner__/backend/data/Object.lua:291: in function '_validate'
	__factoryplanner__/backend/data/District.lua:121: in function 'validate'
	__factoryplanner__/backend/data/Object.lua:291: in function '_validate'
	__factoryplanner__/backend/data/Realm.lua:80: in function 'validate'
	__factoryplanner__/backend/init.lua:193: in function 'refresh_player_table'
	__factoryplanner__/backend/init.lua:248: in function <__factoryplanner__/backend/init.lua:229>

Reproduction

Crash is caused when prototyper.util.find(data_type, prototype, category) is called with
data_type = nil
prototype = offshore-pump
category = nil

So I "fixed" it by adding at the beginning of the find-function:

  if prototype == "offshore-pump" and category == nil and data_type == nil then
    return nil
  end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

1 participant