Great mod BTW, I've started using it more and more!
Sometimes, I might accidentally doubly click on a processor. When that happens, the mod enters the editor twice, and after I click on "Exit editor" I get stuck in there, with no way to get out of it (that I know of). E.g. with Space Exploration, I can normally use the Navigation Satellite Uplink (N) to exit editing, but when I'm stuck the game crashes if I use it:
The mod Space Exploration (0.6.90) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event space-exploration::se-remote-view (ID 259)
The mod Compakt circuits (1.0.14) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event compaktcircuit::on_player_changed_surface (ID 53)
__compaktcircuit__/scripts/editor.lua:1250: attempt to index local 'iopoint_info' (a nil value)
stack traceback:
__compaktcircuit__/scripts/editor.lua:1250: in function 'save_packed_circuits'
__compaktcircuit__/scripts/editor.lua:890: in function <__compaktcircuit__/scripts/editor.lua:872>
stack traceback:
[C]: in function 'teleport'
__space-exploration__/scripts/remote-view.lua:369: in function 'stop'
__space-exploration__/scripts/remote-view.lua:688: in function 'toggle'
__space-exploration__/scripts/remote-view.lua:754: in function 'callback'
__space-exploration__/scripts/event.lua:15: in function <__space-exploration__/scripts/event.lua:13>
I tried to find a fix, and my simple solution is to add a guard when editing, so that we you can't enter the editor twice. Here is a diff that works for me:
***************
*** 376,377 ****
--- 376,382 ----
+ local vars = get_vars(player)
+ if vars.editing then
+ return
+ end
+ vars.editing = true
local procinfo = get_procinfo(processor, true)
***************
*** 382,384 ****
- local vars = get_vars(player)
vars.procinfo = procinfo
--- 387,388 ----
***************
*** 437,438 ****
--- 441,443 ----
player.teleport(origin_surface_position, origin_surface_name)
+ vars.editing = false
end
***************
*** 896,897 ****
--- 901,903 ----
end
+ vars.editing = false
end