Sharparam/cybersyn-combinator

Cybersyn constant combinator displays unknown signal, that can cause a non-recoverable error.

Closed this issue · 2 comments

Description

The cybersyn constant combinator displays an unknown signal available for selection from the "Unsorted" tab, selecting it causes a non-recoverable error, the signal does not appear in regular constant combinators.
image
image

The mod Cybersyn Combinator (0.4.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event cybersyn-combinator::on_gui_elem_changed (ID 69)
Invalid signal (can't be empty).
stack traceback:
	[C]: in function 'set_signal'
	__cybersyn-combinator__/scripts/combinator.lua:230: in function 'set_slot'
	__cybersyn-combinator__/scripts/combinator.lua:145: in function 'set_item_slot'
	__cybersyn-combinator__/scripts/gui.lua:382: in function 'handler'
	__flib__/gui-lite.lua:169: in function <__flib__/gui-lite.lua:152>

factorio-current.log

Expected behaviour

The signal should not exist, or should not show for the player (as it is already the case for regular constant combinators).

Actual behaviour

Cybersyn constant combinator shows "Unsorted" tab, with a single unknown signal in it, that can cause a non-recoverable error when selected.

Steps to reproduce

  1. Use a clean Factorio 1.1.80 install without any mods.
  2. Add Cybersyn Combinator mod and it's dependencies (Project Cybersyn and Factorio Library).
  3. Create a new sandbox save.
  4. Turn on "research all technologies" cheat from the top left menu.
  5. Take a cybersyn and a regular constant combinators from inventory, place them down.
  6. Look at regular constant combinator GUI, to check if any unknown signals show there.
  7. Select the unknown signal from cybersyn constant combinator GUI to cause a non-recoveralbe error.
    test-save.zip

Context

I was playing a normal game, and got curious what the unknown signal does, I made a backup and clicked the signal, which caused an error.

Possible fix

Mod version

0.4.1

Factorio version

1.1.80

Operating system

Windows 10 Home x64 Version 21H2 OS Build 19044.2728

I wonder if that signal has en empty name/ID and thus causes the issue.

I'll have to add a check for that similar to what prevents setting the each/anything/everything signals.

Unfortunately it is not possible to apply a filter to the signal picker in mods, as that functionality is only available to the internal UI, there's a forum thread about that here: https://forums.factorio.com/viewtopic.php?p=554711

This is now fixed in v0.4.2 which I just uploaded to the mod portal. Thanks for reporting the bug!