LTN Combinator Modernized


Add a combinator with friendly GUI to manage LTN Control Signals for each LTN Train Stop

Content
15 hours ago
1.0 - 2.0
97.1K
Trains Circuit network

g [Fixed] Crash when placing blueprint using blueprint book

5 days ago
(updated 5 days ago)

A fatal error occurs when attempting to place a blueprint (literally any blueprint; it doesn't even have to include the LTN combinator in the blueprint) while using a blueprint book. Error does not occur when placing a blueprint from inventory or from hotbar.

The mod LTN Combinator Modernized (2.2.5) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event LTN_Combinator_Modernized::on_pre_build (ID 9)
__LTN_Combinator_Modernized__/script/util.lua:119: attempt to index local 'bp' (a nil value)
stack traceback:
    __LTN_Combinator_Modernized__/script/util.lua:119: in function 'get_blueprint'
    __LTN_Combinator_Modernized__/script/ltn_combinator.lua:2015: in function 'handler'
    __core__/lualib/event_handler.lua:72: in function <__core__/lualib/event_handler.lua:70>
4 days ago

I have not been able to reproduce this. Is there any chance you can provide a save game that contains such a bp book that causes this to crash? I would love to track down what's going on here.

a day ago
(updated a day ago)

I did a little bit of my own testing and I narrowed it down to a particular blueprint book of mine that is causing this problem. I tested with multiple blueprint books but this one throws the error even though it does not even have the LTN combinator at all. I have no clue why it's causing the problem. If the underground pipes don't connect for you, that's not a bug. This book's blueprints are made expecting a mod that extends underground belts/pipes to all span 10 tiles instead of 9, 8, 6, 4. What's even more baffling is if I open the book and select the blueprints individually to place down, there is no error.

0eNrVnd1u20YQhV8l4LUUcJe73F0DvSn6Dr0oAkO2GVeoTKkSlTQI/O7Vjy0pjY5mjnZTOFeJZenLkJwMh+fsrL5Wd7N1t1hO++H2bj7/q7r5enxlVd38cfLj9nerfrIYD/Px43L6sP35n+rGtKPqy/aP51E1uVvNZ+uhG2/ft5j2j9XNsFx3o2p6P+/3uNX0sZ/Mtp/tJ09ddVOthnnfjT9PZrNqQ5j2D90W+vxhVHX9MB2m3f5zux++3Pbrp7tuuXnD6PXzi+mi24c0X/cP1ahazFebj837l/j8e78LcGze+80/8DBddvf7X7vn0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HBG7ZzXcU4Kt1XB7ZrJWQw654wbkkLUacshaDTncKmrMIWs15JC1GnICWWMhKJKbXkBQIjeagHuckBPfGETOfGMQuZUfBimLtXj5PVusIUhZrMXL70k9D4NIlxuDSJ/boq17PCnpwYhaco9r6xDIkM8MEGTJ+xAENdx9CHIc98wAOdzwFuaQ3zkAOeRuSZBDfu8A5JA7JiFOIL97AHLYTZMgiN02CYLIuVoMYrdOgiBythaD2O2TIIhcJopBkbwNQRDpIkKQ1kYU84j1Efegaydzdjv6PXTbqZphud4Z+7eL2aTvt7F8rVbdMEz7x9X27y+BfpzOhg12N0tzLs6/15PZ5n2bl/v58mmyfel+/rSYLCfDfMOsfqlONtLchD1MZ93tqpvtVxXcPs0ful1Yr8fzbXDj1+A0B+fPnZbx7kuwRtVsctfNNr/4dbKa3r/7rfvY9avu3e/7g7gwZnTiqP5nwEk3kWT1b230b3XbQ51sTtGn7vb1pQun6PlfJeWYdg==
a day ago

Importing that string gives a book with 3 blueprints. They all work after I import it. There were some bugs in factorio in how it "migrated" blueprints and books from 1.x save games or libraries. Yes, I'd totally like to protect LTN Combinator from tripping on these, but I'll need a save file that has a currently broken blueprint that I can inspect. Importing this to create a new book creates it correctly, so it won't crash.

a day ago
(updated 15 hours ago)

Scratch that. Just reproduced this from this import after creating a fresh reproduce.

It appears that 1.x blueprints that are loaded into 2.x do not have an active_index set. This is what is ultimately responsible for the crash. I'll get something out to protect against this. In the mean time, moving one of the blueprints within the book, or shift-scroll wheel to cycle through the book before pasting it should fix the blueprint book.

Edit: More accurately, the active index points to an un-populated slot in the book.

Edit2: Related to https://forums.factorio.com/viewtopic.php?p=680628. New, more reliable method of determining the "in-use" blueprint was added in 2.0.67. This crash should now be fixed.

New response