Beltlayer

by therax

Route your belts freely underground.

Content
1 year, 9 months ago
0.16 - 1.1
15.4K
Logistics

b crash when attempting to use CUT tool

4 years ago

I was checking out beltlayer on 0.17.62 to see what it was like before adding it to my server. I had a simulated main bus consisting of 4 belts, 1 each of the basic ores. One side belt had a pair of beltlayer connectors spaced one apart, with a 3rd at right angles at the opposite side of the bus in the classic arrangement for pulling stuff off a bus. Underground there's a splitter between the first 2 connectors with the 2nd output of the splitter running to the 3rd connector.

Finding that this all worked as expected, I then attempted to use the CUT tool to remove everything (having a mod "infinity mode" that would actually cut them rather than just mark them). from the surface layer and the game crashed.

I have repeated this multiple times to confirm, and have also confirmed that it DOES NOT occur without "infinity mode" active, meaning the selected objects are only marked for deconstruction, not actually removed. However as I have been using "infinity mode" since it's creation to clean up other test builds including other modded parts without trouble, I have to assume that the issue is something to do with your mod's interaction with the blueprinting copy/cut/paste system and not specific to 'infinity mode'. I know there are other cheat/admin tools out there that do the same instant deconstruct process and I would bet they would invoke the same issue.

I don't see any way to attach images or zips or I'd include some screenshots, but a copy of the error text is pasted below. I'll be happy to work with you to diagnose the source of this error. While I haven't yet gotten into factorio modding, I am a long time programmer as well.

Other than this issue, I like the mod, and can guarentee I'll [ab]use it often in play. =)

error message text
-----8<-----8<-----8<-----8<-----8<-----
The mod Beltlayer caused a non-recoverable error.
Please report this error to the mod author.

Error while running event beltlayer::on_player_setup_blueprint (ID 68)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
beltlayer/lualib/BaseEditor/BaseEditor.lua:907: in function 'order_underground_deconstruction'
beltlayer/Editor.lua:294: in function <beltlayer/Editor.lua:285>
(...tail calls...)
beltlayer/Editor.lua:387: in function 'on_player_setup_blueprint'
beltlayer/control.lua:41: in function <beltlayer/control.lua:41>
stack traceback:
[C]: in function 'newindex'
__beltlayer
/lualib/BaseEditor/BaseEditor.lua:907: in function 'order_underground_deconstruction'
beltlayer/Editor.lua:294: in function <beltlayer/Editor.lua:285>
(...tail calls...)
beltlayer/Editor.lua:387: in function 'on_player_setup_blueprint'
beltlayer/control.lua:41: in function <beltlayer/control.lua:41>
-----8<-----8<-----8<-----8<-----8<-----

4 years ago

Thanks for the report! This should be fixed now.

4 years ago

update: get slightly different error now, but also tried a few other things to narrow down the issue ...

using: factorio 0.17.66, infinity mode 0.3.0, beltlayer 0.4.1

while trying to confirm this fix I ran into a different[?] issue noted here https://mods.factorio.com/mod/beltlayer/discussion/5d57126d436acc000c5c2bea

after starting a fresh game and setting up the same scenario as indicated in the original report, i did the following ::

  • cut/paste ONLY the area containing the beltlayer components :: successful other than the above note
  • cut/paste ONLY the area containing the infinity mode components (the head of the simulated bus) :: successful
  • cut/paste an area containing BOTH the IM and BL components :: FAIL on cut with the message below

please feel free to contact me on discord

ERROR MESSAGE

The mod Beltlayer caused a non-recoverable error.
Please report this error to the mod author.

Error while running event beltlayer::on_player_setup_blueprint (ID 68)
beltlayer/lualib/BaseEditor/BaseEditor.lua:418: attempt to concatenate field 'proxy_prefix' (a nil value)
stack traceback:
beltlayer/lualib/BaseEditor/BaseEditor.lua:418: in function 'proxy_name'
beltlayer/lualib/BaseEditor/BaseEditor.lua:896: in function 'order_underground_deconstruction'
beltlayer/Editor.lua:294: in function <beltlayer/Editor.lua:285>
(...tail calls...)
beltlayer/Editor.lua:387: in function 'on_player_setup_blueprint'
beltlayer/control.lua:41: in function <beltlayer/control.lua:41>

4 years ago

Thanks for the follow up. I believe I've found the cause of this error. It seems to occur only when using the cut-paste-tool, and only when selecting an area that contains ghosts while using the underground view.

4 years ago

Win7 / Factorio 0.17.66 / IM 0.3.0 / BL 0.4.2

First regarding your last post, the cut was performed from the surface, not belt layer, and at the time of the cut there were no ghosts present. The ghosts on the beltlayer were AFTER the cut AND paste. I assume they were left from the cut (and as I understand things shouldnt have been) and were left after the paste because the underground elements were [sort of] pasted to the surface layer.

As for this morning's test (US EDT, utc-4), well, repeating the same conditions, I get yet another error (below). This time, however, the attempted cut was on the surface layer and ONLY around the underground connectors area. No InfinityMode components were included in the attempted cut that generated the error. Are we having fun yet ? LOL.

Also I have fixed the PM issue on discord that you noted elsewhere. I am usually online all day and not far from a computer.

-----8<-----8<-----8<-----8<-----8<-----
The mod Beltlayer caused a non-recoverable error.
Please report this error to the mod author.

Error while running event beltlayer::on_player_setup_blueprint (ID 68)
The mod Beltlayer caused a non-recoverable error.
Please report this error to the mod author.

Error while running event beltlayer::on_marked_for_deconstruction (ID 20)
The mod Infinity Mode caused a non-recoverable error.
Please report this error to the mod author.

Error while running event InfinityMode::on_marked_for_deconstruction (ID 20)
The mod Beltlayer caused a non-recoverable error.
Please report this error to the mod author.

Error while running event beltlayer::script_raised_destroy (ID 78)
beltlayer/lualib/BaseEditor/BaseEditor.lua:352: attempt to index local 'buffer' (a nil value)
stack traceback:
beltlayer/lualib/BaseEditor/BaseEditor.lua:352: in function 'return_transport_line_to_buffer'
beltlayer/lualib/BaseEditor/BaseEditor.lua:361: in function 'return_contents_to_buffer'
beltlayer/lualib/BaseEditor/BaseEditor.lua:1061: in function 'on_player_mined_entity'
beltlayer/Editor.lua:224: in function 'on_player_mined_entity'
beltlayer/Editor.lua:157: in function 'script_raised_destroy'
beltlayer/control.lua:49: in function <beltlayer/control.lua:49>
[C]: in function 'order_deconstruction'
beltlayer/lualib/BaseEditor/BaseEditor.lua:841: in function 'create_deconstruction_proxy'
beltlayer/lualib/BaseEditor/BaseEditor.lua:1105: in function 'on_marked_for_deconstruction'
beltlayer/Editor.lua:348: in function 'on_marked_for_deconstruction'
beltlayer/control.lua:34: in function <beltlayer/control.lua:34>
[C]: in function 'order_deconstruction'
beltlayer/lualib/BaseEditor/BaseEditor.lua:908: in function 'order_underground_deconstruction'
beltlayer/Editor.lua:303: in function <beltlayer/Editor.lua:294>
(...tail calls...)
beltlayer/Editor.lua:396: in function 'on_player_setup_blueprint'
beltlayer/control.lua:41: in function <beltlayer/control.lua:41>
stack traceback:
InfinityMode/scripts/util/conditional-event.lua:100: in function 'handler'
stdlib/stdlib/event/event.lua:315: in function 'pcall'
stdlib/stdlib/event/event.lua:335: in function 'dispatch_event'
stdlib/stdlib/event/event.lua:413: in function <stdlib/stdlib/event/event.lua:369>
stack traceback:
[C]: in function 'destroy'
InfinityMode/scripts/util/conditional-event.lua:100: in function 'handler'
stdlib/stdlib/event/event.lua:315: in function 'pcall'
stdlib/stdlib/event/event.lua:335: in function 'dispatch_event'
stdlib/stdlib/event/event.lua:413: in function <stdlib/stdlib/event/event.lua:369>
stack traceback:
beltlayer/lualib/BaseEditor/BaseEditor.lua:841: in function 'create_deconstruction_proxy'
beltlayer/lualib/BaseEditor/BaseEditor.lua:1105: in function 'on_marked_for_deconstruction'
beltlayer/Editor.lua:348: in function 'on_marked_for_deconstruction'
beltlayer/control.lua:34: in function <beltlayer/control.lua:34>
[C]: in function 'order_deconstruction'
beltlayer/lualib/BaseEditor/BaseEditor.lua:908: in function 'order_underground_deconstruction'
beltlayer/Editor.lua:303: in function <beltlayer/Editor.lua:294>
(...tail calls...)
beltlayer/Editor.lua:396: in function 'on_player_setup_blueprint'
beltlayer/control.lua:41: in function <beltlayer/control.lua:41>
stack traceback:
[C]: in function 'order_deconstruction'
beltlayer/lualib/BaseEditor/BaseEditor.lua:841: in function 'create_deconstruction_proxy'
beltlayer/lualib/BaseEditor/BaseEditor.lua:1105: in function 'on_marked_for_deconstruction'
beltlayer/Editor.lua:348: in function 'on_marked_for_deconstruction'
beltlayer/control.lua:34: in function <beltlayer/control.lua:34>
[C]: in function 'order_deconstruction'
beltlayer/lualib/BaseEditor/BaseEditor.lua:908: in function 'order_underground_deconstruction'
beltlayer/Editor.lua:303: in function <beltlayer/Editor.lua:294>
(...tail calls...)
beltlayer/Editor.lua:396: in function 'on_player_setup_blueprint'
beltlayer/control.lua:41: in function <beltlayer/control.lua:41>
stack traceback:
beltlayer/lualib/BaseEditor/BaseEditor.lua:908: in function 'order_underground_deconstruction'
beltlayer/Editor.lua:303: in function <beltlayer/Editor.lua:294>
(...tail calls...)
beltlayer/Editor.lua:396: in function 'on_player_setup_blueprint'
beltlayer/control.lua:41: in function <beltlayer/control.lua:41>
stack traceback:
[C]: in function 'order_deconstruction'
beltlayer/lualib/BaseEditor/BaseEditor.lua:908: in function 'order_underground_deconstruction'
beltlayer/Editor.lua:303: in function <beltlayer/Editor.lua:294>
(...tail calls...)
beltlayer/Editor.lua:396: in function 'on_player_setup_blueprint'
beltlayer/control.lua:41: in function <beltlayer/control.lua:41>
-----8<-----8<-----8<-----8<-----8<-----

New response