IncredibleHannes / TPF2-Timetables

The Timetable mod for Transport Fever 2
GNU General Public License v3.0
30 stars 17 forks source link

Lua exception after update the game #102

Open fravaletto opened 1 year ago

fravaletto commented 1 year ago

Hello. After updating the game, this mod broke (the game crashes with lua exceptions). I am attaching the last lines of the log.

Additional info extracted from the previous state: Uncaught exception while in class UI::CSelector Remove SDL Controller: 0 Exception type: Lua exception

This error is usually caused by modding. Some game resources contain incorrect data.

Details:

Error message: [string "L:/SteamLibrary/steamapps/workshop/content/1066780/2408373260/res/config/game_script/timetable_gui.lua"]:545: stack index 4, expected string, received sol.UI::ScrollArea*

Minidump: C:/Steam/userdata/226052235/1066780/local/crash_dump/4e57d530-1469-4349-b075-ef61f98f059c.dmp

UI Component Hierarchy: type: class UI::ScrollArea, id = "", name = "ScrollArea", styleClasses = {} type: class UI::Table, id = "", name = "Table", styleClasses = {} type: class UI::ContentView, id = "", name = "timetable.LineOverview::Content", styleClasses = {} type: class UI::ScrollArea, id = "", name = "timetable.LineOverview", styleClasses = {} type: class UI::CComponent, id = "", name = "wrapper", styleClasses = {"tab-widget-content"} type: class UI::TabWidget, id = "", name = "TabWidget", styleClasses = {} type: class UI::ContentView, id = "", name = "Window::Content", styleClasses = {} type: class UI::Window, id = "", name = "Window", styleClasses = {} type: class UI::WindowContainer, id = "", name = "WindowContainer", styleClasses = {} type: class UI::ViewManager, id = "", name = "ViewManager", styleClasses = {} type: class UI::CComponent, id = "", name = "RendererComponent::Layer2", styleClasses = {} type: class UI::CRendererComponent, id = "mainView", name = "RendererComponent", styleClasses = {"action-selector"} type: class UI::CGameUI, id = "", name = "CGameUI", styleClasses = {"top-gamebar-visible"} type: class UI::CMenuUI, id = "", name = "MenuUI", styleClasses = {} type: class UI::CComponent, id = "", name = "wrap", styleClasses = {"platform-desktop", "ui-classic", "input-mouse", "gamepad-type-xbox"}

In file: urban_games/train_fever/src/Game/scripting/error_handling.h:14

In function: void __cdecl scripting::CheckResult(struct sol::protected_function_result)

CRASHDB_CRASH__ struct lua::LuaException: urban_games/train_fever/src/Game/scripting/error_handling.h:14: void cdecl scripting::CheckResult(struct sol::protected_function_result): [string "2408373260_1::res/config/game_script/timetable_gui.lua"]:545: stack index 4, expected string, received sol.UI::ScrollArea Exception type: Lua exception

This error is usually caused by modding. Some game resources contain incorrect data.

Details:

Error message: [string "L:/SteamLibrary/steamapps/workshop/content/1066780/2408373260/res/config/game_script/timetable_gui.lua"]:545: stack index 4, expected string, received sol.UI::ScrollArea*

Minidump: C:/Steam/userdata/226052235/1066780/local/crash_dump/4e57d530-1469-4349-b075-ef61f98f059c.dmp

UI Component Hierarchy: type: class UI::ScrollArea, id = "", name = "ScrollArea", styleClasses = {} type: class UI::Table, id = "", name = "Table", styleClasses = {} type: class UI::ContentView, id = "", name = "timetable.LineOverview::Content", styleClasses = {} type: class UI::ScrollArea, id = "", name = "timetable.LineOverview", styleClasses = {} type: class UI::CComponent, id = "", name = "wrapper", styleClasses = {"tab-widget-content"} type: class UI::TabWidget, id = "", name = "TabWidget", styleClasses = {} type: class UI::ContentView, id = "", name = "Window::Content", styleClasses = {} type: class UI::Window, id = "", name = "Window", styleClasses = {} type: class UI::WindowContainer, id = "", name = "WindowContainer", styleClasses = {} type: class UI::ViewManager, id = "", name = "ViewManager", styleClasses = {} type: class UI::CComponent, id = "", name = "RendererComponent::Layer2", styleClasses = {} type: class UI::CRendererComponent, id = "mainView", name = "RendererComponent", styleClasses = {"action-selector"} type: class UI::CGameUI, id = "", name = "CGameUI", styleClasses = {"top-gamebar-visible"} type: class UI::CMenuUI, id = "", name = "MenuUI", styleClasses = {} type: class UI::CComponent, id = "", name = "wrap", styleClasses = {"platform-desktop", "ui-classic", "input-mouse", "gamepad-type-xbox"}

In file: urban_games/train_fever/src/Game/scripting/error_handling.h:14

In function: void __cdecl scripting::CheckResult(struct sol::protected_function_result)

Gordon-Dry commented 1 year ago

Try this repo: https://github.com/Gregory365/TPF2-Timetables/tree/scrollbarCrash

fravaletto commented 1 year ago

Thank you! When can we expect this mod to be updated on Steam?

Gregory365 commented 1 year ago

A steam release is planned but only when there is some confirmed stability in the mod Please confirm whether the https://github.com/Gregory365/TPF2-Timetables/tree/scrollbarCrash branch fixes this issue for you?

Related: Issue6, and Issue 9

Gordon-Dry commented 1 year ago

I created multiple lines' timetables and was not able to trigger a crash by moving scrollbars or wildly clicking UI elements.

Gregory365 commented 1 year ago

Thanks for confirming!

Branch has been merged, so above links show 404 Error: New link: Gregory365/develop