Please see JustARandomGeek's first post below for a more succinct reproduction process.
Old Title: [0.18.17] Crash using "--instrument-mod" "debugadapter" in specific use case
I'm logging this here first rather than with JustARandomGeek as its a hard game crash. However, I fully appreciate that the issue is surfacing from the vsCode extension and so it may not be an interest to other than him.
With a the attached muppet_streamer mod extract it to a folder in the Factorio mods folder.
Open the mod folder in VS Code with the debug adpater.
Add a breakpoint on scripts\leaky-flamethrower.lua line 85.
Run the game within the VSCode debugger.
Start a new game
Kill the player: /c game.player.character.die()
Click respawn and before the respawn timer completes do the next step.
Run the command to trigger the mod replacing "muppet9010" with your player name: /muppet_streamer_leaky_flamethrower {"delay":0, "ammoCount":5, "target":"muppet9010"}
The breakpoint will be hit in VS Code
In VScode hover over the variable "targetPlayer" on the line 85.
Give the game a second and the game will crash.
[0.18.17] Crash when accessing LuaPlayer.entity_copy_source while player is dead
- Muppet9010
- Filter Inserter
- Posts: 279
- Joined: Sat Dec 09, 2017 6:01 pm
- Contact:
[0.18.17] Crash when accessing LuaPlayer.entity_copy_source while player is dead
- Attachments
-
- debugadapter_0.18.12.zip
- (52.43 KiB) Downloaded 181 times
-
- muppet_streamer_18.0.3.zip
- (106.49 KiB) Downloaded 164 times
-
- factorio-current.log
- (11.73 KiB) Downloaded 186 times
Last edited by Muppet9010 on Wed Apr 01, 2020 11:07 pm, edited 5 times in total.
-
- Filter Inserter
- Posts: 302
- Joined: Fri Mar 18, 2016 4:34 pm
- Contact:
Re: [0.18.17] Crash using "--instrument-mod" "debugadapter" in specific use case
After some digging, this same crash is also reproduced by `/c game.print(game.player.entity_copy_source.valid)` while the current player is dead, even without my debugger attached, so it looks like this is a base game bug that I simply revealed by attempting to access every possible property.
A more correct title is probably "Crash when accessing LuaPlayer.entity_copy_source while player is dead"
A more correct title is probably "Crash when accessing LuaPlayer.entity_copy_source while player is dead"
- Muppet9010
- Filter Inserter
- Posts: 279
- Joined: Sat Dec 09, 2017 6:01 pm
- Contact:
Re: [0.18.17] Crash when accessing LuaControl.entity_copy_source of player while dead
title updated, thanks for the help by looking at this. you obviously know far too much
Re: [0.18.17] Crash when accessing LuaPlayer.entity_copy_source while player is dead
Thanks for the report. It's now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.