Merge Signals Combinator

by Hermios

New combinator that multiply signals coming from green wire to signals coming from red wire

7 months ago
1.1
214

b Crash on removing an entity

7 months ago

When I do some blue print planning in editor mode, on deleting (and maybe other operation), I get a crash.
Because of the scale of operations and the relative rarity of the crash, I can not pinpoint it more closely yet, but it happens like maybe once every 30 minutes.

Maybe the log makes it obvious for you already though:

Die Mod Merge Signals Combinator (1.0.4) hat einen Fehler verursacht, der nicht behoben werden kann.
Bitte informiere den Autor der Mod über diesen Fehler.

Error while running event Merge_Signals_Combinator::on_tick (ID 0)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
[C]: in function 'index'
...nals_Combinator
/prototypes/merge-signal-combinator.lua:18: in function 'update_output'
Merge_Signals_Combinator/control.lua:10: in function 'f'
Hermios_Framework/control-libs.lua:20: in function <Hermios_Framework/control-libs.lua:13>

7 months ago

Hei Merikolus
Danke für die Rückmeldung. I can imagine some scenarii where such issue happen, but to my mind, it would occure extremely rarely, more than each 30minutes! So, I believe my scenarii are wrong.
May I ask you to give more details of a situation where it happened. For instance, what do you mean with "blueprint planning"? And "Deleting" (Do you remove the combinator, its ghost, or something else)?
Ideally, can I ask you to create an issue in the github project (Url is in the presentation), if you feel comfortable with it. It would be easier for me to follow

Vielen Dank!

7 months ago

Danke für die Rückmeldung. :)

Maybe it was not well phrased. It happens most often when I'm working in the editor, designing city blocks of 4x4 chunks, so there are no ghosts.
When I do this, there's a lot of bulk instant creation and deletion of entities when I tear down or build several chunks at once.
Thinking about this, maybe the time freeze of the editor mode could be responsible.
Also, I think, but I might be wrong, that the crash does not happen when I delete the combinator(s) manually before using the tear down tool on the remaining chunks.
What I can say is that when I save pre-crash and repeat the action, it crashes again.
I'll try to investigate further. I'll create a GitHub issue if I can create a qualified one. For now, the issue is just a minor annoyance, especially if you are prepared for it and I spend only a fraction of my playtime in the editor.

7 months ago

Ach so. Hab gefunden! Please check the new version of the mod Hermios_Framework. This should fix the issue (Not guaranteed, as I couldn't reproduce THIS problem, but another one which is close, and the changed fixed it!)

7 months ago
(updated 7 months ago)

I think it was related to the removal of entities not being registered in editor mode, maybe because building and tearing down there is no regular build/teardown operation when you do it via copy, paste, delete and blueprints, and hence might not have created the relevant events for your internal list to be updated. The crash always happened when the pause mode was ended, not on the deletion right away.
Whatever you did seems to have addressed the issue, you were faster with your fix than I was with the analysis (kinda what I expected). I can't reproduce the crash anymore so far.

Thanks again for the mod and for the awesome support!

New response