Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Crash opening manager #188

Open
jengo opened this issue Jul 27, 2022 · 5 comments
Open

Crash opening manager #188

jengo opened this issue Jul 27, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@jengo
Copy link

jengo commented Jul 27, 2022

Describe the Bug

I recently upgraded to 0.4.14 and I am now getting an error that is slightly random but very frequent. This exception causes the game to exist.

To Reproduce

Steps to reproduce the behavior:

I have bound the manager to ctrl+t, using those keystrokes usually triggers the error

The mod LTN Manager (0.4.14) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event LtnManager::ltnm-toggle-gui (ID 195)
__LtnManager__/scripts/util.lua:62: attempt to call field 'is_valid_sprite_path' (a nil value)
stack traceback:
	__LtnManager__/scripts/util.lua:62: in function 'slot_table_update'
	__LtnManager__/scripts/gui/trains.lua:165: in function 'update'
	__LtnManager__/scripts/gui/index.lua:134: in function 'update'
	__LtnManager__/scripts/gui/index.lua:34: in function 'open'
	__LtnManager__/scripts/gui/index.lua:66: in function 'toggle'
	__LtnManager__/control.lua:180: in function <__LtnManager__/control.lua:172>

Save file & Username

Save file is large, it's a 1,100 hour game with 1,609 stations lol https://www.icloud.com/iclouddrive/03dWnyfZK09FdSs6Z6NRxbjxg#2021-11-04_py_save-n

Log file

Attach factorio-current.log, found in Factorio's user data directory.

factorio-current.log

@jengo jengo added the bug Something isn't working label Jul 27, 2022
@rydel-tech
Copy link

rydel-tech commented Jul 27, 2022

I can also repeat this.

Problem is the call gui.is_valid_sprite_path(sprite), where is_valid_sprite_path is undefined in flib version 0.10.1. LTN Manager works again if I change the line into

if gui.is_valid_sprite_path and gui.is_valid_sprite_path(sprite) then

Although I am not sure things work as intended.

@Novie53
Copy link
Contributor

Novie53 commented Jul 27, 2022

is_valid_sprite_path is a Factorio API function not flib so just change the gui to game and it works.

if game.is_valid_sprite_path(sprite) then

@Eldrinn-Elantey
Copy link

@Bykow
Copy link

Bykow commented Jul 28, 2022

Same here:

The mod LTN Manager (0.4.14) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event LtnManager::on_gui_click (ID 1)
__LtnManager__/scripts/util.lua:62: attempt to call field 'is_valid_sprite_path' (a nil value)
stack traceback:
	__LtnManager__/scripts/util.lua:62: in function 'slot_table_update'
	__LtnManager__/scripts/gui/stations.lua:147: in function 'update'
	__LtnManager__/scripts/gui/index.lua:138: in function 'update'
	__LtnManager__/scripts/gui/index.lua:97: in function 'dispatch'
	__LtnManager__/control.lua:127: in function 'handle_gui_event'
	__LtnManager__/control.lua:136: in function <__LtnManager__/control.lua:133>
	```

nihilistzsche added a commit that referenced this issue Jul 28, 2022
@Eldrinn-Elantey
Copy link

This problem has been solved here. Is not it so?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants