[Dominik][0.17.43] Crash on save after placing modded 1x1 entity with fluid box

Things that we don't consider worth fixing at this moment.
AngeloidBeta
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sun Apr 14, 2019 8:53 am
Contact:

[Dominik][0.17.43] Crash on save after placing modded 1x1 entity with fluid box

Post by AngeloidBeta »

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:

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
}
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.)
AngeloidBeta
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sun Apr 14, 2019 8:53 am
Contact:

Re: [0.17.43] Crash on save after placing modded 1x1 entity with fluid box

Post by AngeloidBeta »

UPDATE: The crash appears to have vanished after I removed the spurious "secondary_draw_orders = {north = -1}" specification from the fluid box. It makes sense that secondary_draw_order[ s ] wouldn't be sensible or expected if there is no 4-way (or other) pipe_pictures, but I would have expected the inconsistency to either be ignored or cause an error at startup rather than crash.
AngeloidBeta
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sun Apr 14, 2019 8:53 am
Contact:

Re: [0.17.43] Crash on save after placing modded 1x1 entity with fluid box

Post by AngeloidBeta »

UPDATE #2: Even with the crash resolved, the fluid box continues to exhibit incorrect behavior. Specifically, any time a save is loaded, the 1x1 furnace becomes unable to output fluid to any existing receiver (pipe, tank, etc.) until said receiver is deconstructed and a new one placed. Rotating the furnace does not fix it unless the rotation places the fluid output in connection with an entity that has been placed after the save was loaded. The furnace continues to receive and process input normally until the output inventory is full while in this broken state.
AngeloidBeta
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sun Apr 14, 2019 8:53 am
Contact:

Re: [Dominik][0.17.43] Crash on save after placing modded 1x1 entity with fluid box

Post by AngeloidBeta »

Fixed the fluid box by correcting the pipe connection position to not be in the center of the entity.
Dominik
Former Staff
Former Staff
Posts: 658
Joined: Sat Oct 12, 2013 9:08 am
Contact:

Re: [Dominik][0.17.43] Crash on save after placing modded 1x1 entity with fluid box

Post by Dominik »

Hi, sorry I only got to it now. I am glad you were able to fix it. That pipes do not connect correctly with wrong position of the connection is to be expected, but that crash is wrong. But I was not able to reproduce the crash (Klonan had to fix your mod which had errors on load, I am not sure that it did not affect it). I will put this to won't fix now but let me know if you at any time find some more simple way to get the crash (ideally in some small setup). Thank you.
Post Reply

Return to “Won't fix.”