[0.18.17] Crash when accessing LuaPlayer.entity_copy_source while player is dead

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
Muppet9010
Filter Inserter
Filter Inserter
Posts: 278
Joined: Sat Dec 09, 2017 6:01 pm
Contact:

[0.18.17] Crash when accessing LuaPlayer.entity_copy_source while player is dead

Post by Muppet9010 »

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.
Attachments
debugadapter_0.18.12.zip
(52.43 KiB) Downloaded 147 times
muppet_streamer_18.0.3.zip
(106.49 KiB) Downloaded 140 times
factorio-current.log
(11.73 KiB) Downloaded 157 times
Last edited by Muppet9010 on Wed Apr 01, 2020 11:07 pm, edited 5 times in total.

justarandomgeek
Filter Inserter
Filter Inserter
Posts: 300
Joined: Fri Mar 18, 2016 4:34 pm
Contact:

Re: [0.18.17] Crash using "--instrument-mod" "debugadapter" in specific use case

Post by justarandomgeek »

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"

User avatar
Muppet9010
Filter Inserter
Filter Inserter
Posts: 278
Joined: Sat Dec 09, 2017 6:01 pm
Contact:

Re: [0.18.17] Crash when accessing LuaControl.entity_copy_source of player while dead

Post by Muppet9010 »

title updated, thanks for the help by looking at this. you obviously know far too much :P

Rseding91
Factorio Staff
Factorio Staff
Posts: 13175
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.18.17] Crash when accessing LuaPlayer.entity_copy_source while player is dead

Post by Rseding91 »

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.

Post Reply

Return to “Resolved Problems and Bugs”