raiguard / TaskList

A simple and unobtrusive todo list for Factorio.
https://mods.factorio.com/mod/TaskList
MIT License
10 stars 9 forks source link

Non-recoverable error occurs if loading a game that is saved while player in Editor Extensions #24

Closed ajklotz closed 1 year ago

ajklotz commented 1 year ago

Description

The mod Task List (0.4.3) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event TaskList::on_configuration_changed
__TaskList__/scripts/gui/tasks/index.lua:342: attempt to index a nil value
stack traceback:
    __TaskList__/scripts/gui/tasks/index.lua:342: in function 'new'
    __TaskList__/scripts/player-data.lua:34: in function 'refresh'
    __TaskList__/scripts/migrations.lua:7: in function 'generic'
    __TaskList__/control.lua:93: in function <__TaskList__/control.lua:91>

Reproduction

I went to the main menu to update the Startup Settings for Wire Shortcuts X to set the value of Number of shortcuts to One. Confirmed, and went to load back into my game.

Here is the setting I changed image

ajklotz commented 1 year ago

If I Control-Click Load my game, I get this same error too.

ajklotz commented 1 year ago

If I load back into the game without changing any settings, and attempt to create a new task, I get this error:

The mod Task List (0.4.3) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event TaskList::on_gui_click (ID 1)
__TaskList__/scripts/task.lua:123: attempt to index local 'owner' (a nil value)
stack traceback:
    __TaskList__/scripts/task.lua:123: in function 'new'
    __TaskList__/scripts/gui/edit-task/actions.lua:77: in function 'handler'
    __TaskList__/scripts/gui/edit-task/index.lua:54: in function 'dispatch'
    __TaskList__/control.lua:110: in function <__TaskList__/control.lua:105>
ajklotz commented 1 year ago

Okay...I am able to reproduce this.

Go into Editor Extensions. Save the game while in Editor Extensions. Exit the game and attempt to change any configuration. Load in and get the first error.

This seems to be related to loading back into a game where the save is currently in Editor Extensions

ajklotz commented 1 year ago

Also, this must be a duplicate of #23

raiguard commented 1 year ago

Thanks for the report. This was actually being caused by Editor Extensions' remote interface being bugged. I have fixed it for the next version of EE.

raiguard commented 1 year ago

I will close this one in favor of #23.