[Genhis][2.0.8] Crash accessing opened field of character in cutscene

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
Penguin_Spy
Burner Inserter
Burner Inserter
Posts: 6
Joined: Sun Feb 26, 2017 3:09 am
Contact:

[Genhis][2.0.8] Crash accessing opened field of character in cutscene

Post by Penguin_Spy »

Using Lua, if you access the opened field of a character entity while that character is attached to a player and that player is watching a cutscene, the game crashes.
To reproduce:
  1. Create a new world through the Freeplay scenario (to use the crash site cutscene)
  2. While watching the cutscene, run the following command:

    Code: Select all

    /c game.player.print(game.player.cutscene_character.opened)
    
  3. The game crashes (not a Lua error)
The following code also causes the same crash, so the error is not unique to the Freeplay scenario or the cutscene_character field:

Code: Select all

-- save the character entity
/c character = game.player.character
-- start a 7 second cutscene
/c game.player.set_controller{type=defines.controllers.cutscene, waypoints={{position={0,-10},transition_time=300,time_to_wait=120}}}
-- access the character's opened field (using game.print so parses as valid Lua)
/c game.print(character.opened)
The expected result would be reading a value of nil (as I'm pretty no GUI should be open during a cutscene).

The crash log is attached; at first glance it appears to be a null pointer dereference in GameStateAdapter::getGuiTarget.
factorio-current.log
(20.13 KiB) Downloaded 7 times
I exist.

Genhis
Factorio Staff
Factorio Staff
Posts: 213
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: [Genhis][2.0.8] Crash accessing opened field of character in cutscene

Post by Genhis »

Thanks for the report and for providing easy reproduction steps - issues get fixed a lot quicker if I can just copy a few commands and see it crash. :) It's now fixed for the next release.

Post Reply

Return to “Resolved Problems and Bugs”