[Dominik][0.17.43] Crash on save after placing modded 1x1 entity with fluid box
Posted: Tue May 28, 2019 5:05 pm
I hit a crash on save after adding a new 1x1 furnace to my mod, placing an entity made via the new recipe onto the map, and using the furnace with an input (filled water barrels) that produced a water output. At least one autosave that took place partway through these actions did succeed. Here are the log, mods folder, most recent successful map save, most recent successful autosave, interrupted temporary save file, and spindump report generated after the crash handler failed to exit:
https://www.icloud.com/iclouddrive/00kS ... #crashdata
Based on the crash trace, I would make the fairly obvious guess that there's something about the fluid box specification for the new entity that the engine didn't handle. The spec for that fluid box can be found in __LogisticResearch__/prototypes/entities/omega-production.lua, on lines 138-141 (in the 'omega-barreler' entity). The mkfluidbox() function lives in __LogisticResearch__/localutil.lua, lines 97-114. The resulting fluid box specification is:
Another interesting tidbit is that the furnace's fluid output failed to connect to a pipe while pointed south; I had to rotate it to be pointed east before fluid would flow. I've found that pipe connections in general with non-integer positions don't behave very well either visually or functionally.
Please note that as I was making edits to my mod immediately before I experienced the crash, the code that was in effect at the time of the crash differs in one respect - specifically, in __LogisticResearch__/prototypes/omega-crafting.lua, lines 656 and 657 (updating item names of the inputs and outputs of the modified recipes) did not exist. (Apologies for not just uploading the mod as it was at that time; I didn't realize the discrepancy until just now and the upload is large enough to not want to repeat it for such a small difference.)
https://www.icloud.com/iclouddrive/00kS ... #crashdata
Based on the crash trace, I would make the fairly obvious guess that there's something about the fluid box specification for the new entity that the engine didn't handle. The spec for that fluid box can be found in __LogisticResearch__/prototypes/entities/omega-production.lua, on lines 138-141 (in the 'omega-barreler' entity). The mkfluidbox() function lives in __LogisticResearch__/localutil.lua, lines 97-114. The resulting fluid box specification is:
Code: Select all
fluid_boxes = {
{
production_type = "output",
pipe_connections = {{type = "output", position = {0, 0.5}},
pipe_covers = pipecoverspictures(),
base_level = 1,
base_area = 50,
secondary_draw_orders = { north = -1 }
},
off_when_no_fluid_recipe = true
}
Please note that as I was making edits to my mod immediately before I experienced the crash, the code that was in effect at the time of the crash differs in one respect - specifically, in __LogisticResearch__/prototypes/omega-crafting.lua, lines 656 and 657 (updating item names of the inputs and outputs of the modified recipes) did not exist. (Apologies for not just uploading the mod as it was at that time; I didn't realize the discrepancy until just now and the upload is large enough to not want to repeat it for such a small difference.)