Skip to content

Crashes if you pick "Select a module" on row >10 without entityΒ #13

@Macil

Description

@Macil
The mod Module Inserter (5.2.4) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event ModuleInserter::on_gui_elem_changed (ID 68)
__ModuleInserter__/scripts/gui.lua:677: attempt to index local 'entity_proto' (a nil value)
stack traceback:
	__ModuleInserter__/scripts/gui.lua:677: in function 'handler'
	__ModuleInserter__/control.lua:697: in function <__ModuleInserter__/control.lua:689>

In the Module Inserter menu, if you have 10 or more rows with entities selected already, then the menu adds extra rows. In one of these extra rows without any entity type selected, if you try to pick the "Select a module" item, then it prompts you for a module (instead of ignoring the press as it does on other entity-less rows), and the game crashes once you pick one.

This crash also easily happens if you're in multiplayer, you're not the host, you have some lag, and in row >10 you pick an entity and then pick a module quickly before the UI updates in response to picking the entity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions