eduran84 / LTN_Tracker

Other
7 stars 6 forks source link

[Beta 0.1.12] Nil reference opening window #30

Closed 0ptera closed 4 years ago

0ptera commented 5 years ago

Trying to open LTN Tracker with either keybind or shortcut results in this:

1302.924 Error MainLoop.cpp:1183: Exception at tick 116139168: The mod LTN Tracker 1.0 - beta test caused a non-recoverable error.
Please report this error to the mod author.

Error while running event LTN_Tracker_beta::ltnt_toggle_hotkey (ID 166)
__LTN_Tracker_beta__/gui/inventory_tab.lua:314: attempt to index field 'stop_header' (a nil value)
stack traceback:
    __LTN_Tracker_beta__/gui/inventory_tab.lua:314: in function 'update_details'
    __LTN_Tracker_beta__/gui/inventory_tab.lua:422: in function 'update'
    __LTN_Tracker_beta__/gui/main_window.lua:110: in function 'update_tab'
    __LTN_Tracker_beta__/gui/main_window.lua:150: in function <__LTN_Tracker_beta__/gui/main_window.lua:138

I can also reproduce the same error in 0.1.11, which was working fine when I tested it a few days ago.

eduran84 commented 5 years ago

Wow, what an embarrassing bug. I tried make my on_configuration_changed smarter by checking old_version and only reset the UI when necessary. Turns out I never changed my mod_name variable to LTN_Tracker_beta. And it only worked with my test save because I manually reset the UI at exactly the right time. Should be fixed in 0.1.13.

0ptera commented 5 years ago

You are in good company. Most of my mistakes are usually such silly copy-paste errors.