✔ Todo List - Continued deprecated


✔ This mod adds a todo list to the single- and multiplayer game to allow players to synchronize their work. This is the Factorio 2.0 version of the mod.

Utilities
a month ago
2.0
7.09K

b Crashes on 2.0.9 (Working on fix 20.0.3)

a month ago

Hey, thanks for porting this to 2.0!

I installed this on a 2.0.9 server running only this and the space age mods, but it crashes the server as soon as you click the "Todo List" button. I've posted the stack trace from the server logs below. Happy to help with debugging/reproducibility if you need

736.395 Error MainLoop.cpp:1429: Exception at tick 527119: The mod ✔ Todo List - Continued (20.0.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Todo-List-Continued::on_gui_click (ID 1)
Todo-List-Continued/todo/features/export_task.lua:6: attempt to index global 'global' (a nil value)
stack traceback:
Todo-List-Continued/todo/features/export_task.lua:6: in function 'update_export_dialog_button_state'
Todo-List-Continued/todo/ui/main_frame.lua:57: in function 'create_maximized_frame'
Todo-List-Continued/todo/features/main_ui.lua:69: in function 'maximize_main_frame'
Todo-List-Continued/todo/features/main_ui.lua:58: in function 'on_maximize_button_click'
Todo-List-Continued/todo/todo.lua:94: in function 'on_gui_click'
Todo-List-Continued/control.lua:20: in function <Todo-List-Continued/control.lua:19>
736.395 Error ServerMultiplayerManager.cpp:84: MultiplayerManager failed: "The mod ✔ Todo List - Continued (20.0.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Todo-List-Continued::on_gui_click (ID 1)
Todo-List-Continued/todo/features/export_task.lua:6: attempt to index global 'global' (a nil value)
stack traceback:
Todo-List-Continued/todo/features/export_task.lua:6: in function 'update_export_dialog_button_state'
Todo-List-Continued/todo/ui/main_frame.lua:57: in function 'create_maximized_frame'
Todo-List-Continued/todo/features/main_ui.lua:69: in function 'maximize_main_frame'
Todo-List-Continued/todo/features/main_ui.lua:58: in function 'on_maximize_button_click'
Todo-List-Continued/todo/todo.lua:94: in function 'on_gui_click'
Todo-List-Continued/control.lua:20: in function <Todo-List-Continued/control.lua:19>"

a month ago

I don't see this in 2.0.8 when just clicking on the icon in the taskbar, but i did just play around with the export/import buttons and there are definitely issues there.

I did previously have issues when initially porting from 1.1 to 2.0 with the global table in a different file (todo.lua), but this one had not come up.

I'll see if i can resolve the import/export issue im now seeing and see if that also resolves this.

a month ago
(updated a month ago)

I made the fix for export/import but the change was only related to the location of the table_to_json and json_to_table scripts in the game code (GameScripts -> Helpers in 2.0). I doubt this change will fix the nil global table issue, but you can try 20.0.1 and see if it fixes it.

I'll see if i can replicate this myself in factorio 2.0.9 in the meantime.

----- Edit ------

Updated my steam to the experimental release of 2.0.9 and not seeing this issue. This is local though and not on a server. Can you try this locally (not on a dedicated server) and see if you get the same error?

----- Edit Edit 2 :) -----

I tried loading a local server myself and was able to replicate the issue. I just now tested a fix changing the initialization call of the global table to be higher up in the todo.lua file and that seems to have fixed it. I have placed this change in 20.0.2. I will make this change live and await further feedback from users as i dont want to spam constant updates. Hopefully these fixes remain easy for the port to 2.0.

a month ago
(updated a month ago)

Thank you so much for your quick look at this issue!

I tried this out, and it looks like I now get a crash in a different place, and on the client instead of the server, which is progress:

Error while running event Todo-List-Continued::on_gui_click (ID 1)
Todo-List-Continued/todo/features/export_task.lua:6: attempt to index
global ‘global’ (a nil value)

stack traceback:
Todo-List-Continued/todo/features/export_task.lua:6: in function
‘update_export_dialog_button_state’
Todo-List-Continued/todo/ui/main_frame.lua:57: in function
‘create_maximized_frame’
Todo-List-Continued/todo/features/main_ui.lua:69: in function
‘maximize_main_frame’
Todo-List-Continued/todo/features/main_ui.lua:58: in function
‘on_maximize_button_click’
Todo-List-Continued/todo/todo.lua:94: in function 'on_gui_click'
Todo-List-Continued/control.lua:20: in function
<Todo-List-Continued/control.lua:19>

When I actually got back into the server, the todo list was live, but then I also hit another client crash when I tried to save a new task:
Error while running event Todo-List-Continued::on_gui_click (ID 1)
Todo-List-Continued/todo/features/add_task.lua:58: attempt to index global
'global' (a nil value)

stack traceback:
Todo-List-Continued/todo/features/add_task.lua:58: in function 'next_task_id'
Todo-List-Continued/todo/features/add_task.lua:48: in function 'assemble_task'
Todo-List-Continued/todo/features/add_task.lua:14: in function 'on_save_new_task_click'
Todo-List-Continued/todo/todo.lua:100: in function 'on_gui_click'
Todo-List-Continued/control.lua:20: in function
<Todo-List-Continued/control.lua:19>

I also got an error when I tried to mark a task complete, didn't grab the stacktrace for that one but I can if it is needed.

Finally, I did actually load this up in a single player game and had no issues with it, so it's something to do with having a dedicated server.

a month ago

Not sure how you set up your local server, but if it helps I am using this docker image here to run mine, that might help with reproducibility: https://hub.docker.com/r/factoriotools/factorio/

Also, I doubt this would be necessary, but if it is helpful, my actual server setup is using this: https://github.com/m-chandler/factorio-spot-pricing

a month ago
(updated a month ago)

Hey there. Thanks for porting this mod to 2.0! I'm still getting this error with version 20.0.2 while hosting a multiplayer game through my client. I've been having some real trouble narrowing down what causes the crash - I've only managed to get it to crash with the specific list of mods I happened to have installed. Todo List on its own does not crash, and Todo List plus each of the mods individually doesn't crash. If I disable any single mod, it also doesn't crash. Then I wondered if it was the fact that I had 8 mods enabled (not counting Elevated Rails, Space Age, and Quality), so I tried disabling a single mod (I did this with several mods) and enabling Squeak Through 2, but it still didn't crash. I also tried with TJ's Cute Biters instead of Squeak Through 2, but no crash. I've included a Google Drive link to my save file.

https://drive.google.com/file/d/1DbL2LXjholcAQ5x2WZYu2faII1nxSSaj/view?usp=sharing

The mod ✔ Todo List - Continued (20.0.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Todo-List-Continued::on_gui_click (ID 1)
Todo-List-Continued/todo/features/export_task.lua:6: attempt to index global 'global' (a nil value)
stack traceback:
Todo-List-Continued/todo/features/export_task.lua:6: in function 'update_export_dialog_button_state'
Todo-List-Continued/todo/ui/main_frame.lua:57: in function 'create_maximized_frame'
Todo-List-Continued/todo/features/main_ui.lua:69: in function 'maximize_main_frame'
Todo-List-Continued/todo/features/main_ui.lua:58: in function 'on_maximize_button_click'
Todo-List-Continued/todo/todo.lua:94: in function 'on_gui_click'
Todo-List-Continued/control.lua:20: in function <Todo-List-Continued/control.lua:19>

Edit: I tried a test with one of my friends. I disabled a mod so that my game wasn't crashing anymore, but they still crashed when opening their Todo List.

The mod ✔ Todo List - Continued (20.0.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Todo-List-Continued::on_gui_click (ID 1)
Todo-List-Continued/todo/features/export_task.lua:6: attempt to index global 'global' (a nil value)
stack traceback:
Todo-List-Continued/todo/features/export_task.lua:6: in function 'update_export_dialog_button_state'
Todo-List-Continued/todo/ui/main_frame.lua:57: in function 'create_maximized_frame'
Todo-List-Continued/todo/features/main_ui.lua<:69:654919324770762760> in function 'maximize_main_frame'
Todo-List-Continued/todo/features/main_ui.lua:58: in function 'on_maximize_button_click'
Todo-List-Continued/todo/todo.lua:94: in function 'on_gui_click'
Todo-List-Continued/control.lua:20: in function <Todo-List-Continued/control.lua:19>

a month ago

I'm getting a similar error in a single-player game, and only when I have some items in my todo list:

The mod ✔ Todo List - Continued (20.0.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Todo-List-Continued::todolist-toggle-ui (ID 235)
Todo-List-Continued/todo/features/export_task.lua:6: attempt to index global 'global' (a nil value)
stack traceback:
Todo-List-Continued/todo/features/export_task.lua:6: in function 'update_export_dialog_button_state'
Todo-List-Continued/todo/ui/main_frame.lua:57: in function 'create_maximized_frame'
Todo-List-Continued/todo/features/main_ui.lua:69: in function 'maximize_main_frame'
Todo-List-Continued/todo/features/main_ui.lua:9: in function 'toggle_main_frame'
Todo-List-Continued/control.lua:48: in function <Todo-List-Continued/control.lua:46>

a month ago

Factorio changed the universal "global" table name from 'global' to 'storage'. All of the errors i've been getting reported point to "global" being nil. Likely because of this change to the modding api.

I'll have to go through the code and find all calls to "global." and update to the new "storage." table.

New response