[Genhis] [2.0.9] Crash when debugging lua code using FMTK during an exception (GameStateAdapter::getCursorRecordID)

This subforum contains all the issues which we already resolved.
Radjack
Burner Inserter
Burner Inserter
Posts: 5
Joined: Mon Nov 22, 2021 9:13 pm
Contact:

[Genhis] [2.0.9] Crash when debugging lua code using FMTK during an exception (GameStateAdapter::getCursorRecordID)

Post by Radjack »

This occured when I have launched Factorio in Instrument Mode with FMTK through Visual Stuido Code to debug an exception in the Jetpack mod.

The setup is this: Have a character using a Jetpack on Vulcanus, then open Remote View to look at Nauvis. Press the J key to cause the Jetpack mod to switch back to the landed character state. When the mod attempts to swap the controller to the landed character model it encounters a Lua exception stating that the game expected an entity on the Nauvis surface rather than the Vulcanus surface and FMTK catches the excpetion to allow me to work out what I need to change in the mod.

The crash occurs when I attempt to explore the properties of the LuaEntity that I am setting to the character argument of the set_controller call.

I have attached a save file ready to cause the crash, to reproduce, start Factorio using FMTK in VSCode hooked to the Jetpack mod, load the attached save, open the Remote View, look at Nauvis and then press J. The Lua exception will fire, then in VSCode attempt to look at the properties of the "new" variable (the LuaEntity we're passing to the character argument of set_controller), this will cause Factorio to crash. The generated log file and dump file from this crash are also attached.
Attachments
factorio-dump-current.dmp
(1.21 MiB) Downloaded 10 times
factorio-current.log
(63.26 KiB) Downloaded 18 times
Jetpack Crash Report.zip
Reproduction setup.
(1.15 MiB) Downloaded 14 times
Genhis
Factorio Staff
Factorio Staff
Posts: 596
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: [Genhis] [2.0.9] Crash when debugging lua code using FMTK during an exception.

Post by Genhis »

Thanks for the report, it's fixed for the next release. This should hopefully be the last bug from this series (116484 and 116516), I checked the rest of LuaControl functions for similar issues.
Post Reply

Return to “Resolved Problems and Bugs”