ReikaKalseki / Reika_FactorioMods_Issues

The issue tracker for all of my Factorio mods - EndgameCombat, NauvisDay, Geothermal, Oreverhaul, and the rest.
5 stars 1 forks source link

Nauvis Day crash - Fluid amount has to be positive #218

Closed MissingInAction86 closed 5 years ago

MissingInAction86 commented 5 years ago

Hi. My game crashes to the main menu using the Nauvis Day mod. Game version is 0.17.74 and mod version is the latest (1.17.24). The message reads "fluid amount has to be positive". I suspect it has something to do with me deconstructing 10 (I think) oil refineries, since it was the only fluid related entity I modified. I wanted to upgrade them to the filtered version. The crash happened about 15 minutes after the deconstruct. Reloading causes a crash at the exact same time, like clockwork. Unfortunately I no longer have a save for before the deconstruction. Here is a screenshot and also the log file: https://pastebin.com/bKqDpiJ3 NauvisDay Bug

Please let me know if I can give you more information. On a side note, this is a brilliant mod. I wish they add something like this to vanilla as an option other than research/other cost increases.

ReikaKalseki commented 5 years ago

That line of code is for the gas boiler.

Additionally, this should not be possible; the line throwing the error is entry.input.fluidbox[1] = fluid, but that is inside a if fluid and fluid.name == "petroleum-gas" and fluid.amount >= 1 then block, thus barring it from running when the fluid amount is less than one.

Or are they considering an amount of zero as invalid?

MissingInAction86 commented 5 years ago

I did not consider the gas boilers that might be the issue, since I upgraded from the normal boiler to gas about 30 minutes before starting on the refineries. As for your question regarding 0 = invalid, I have no idea. I'm no programmer. The last programming I did was in 2002 using Java :) EDIT: Is there some ingame test or other thing I can do that can help troubleshoot this issue?

ReikaKalseki commented 5 years ago

I tested it myself. Indeed it appears not: https://i.imgur.com/Q3lpIdE.jpg

This is a thing they had to specifically impose; I do not know why they did not just make it auto-null the fluid stack, like the way MC handles zero-size ItemStack objects.

Either way, fixed.

entry.input.fluidbox[1] = fluid.amount > 0 and fluid or nil

MissingInAction86 commented 5 years ago

Thank you for the speedy fix. However, the mod on the portal is still the same version as before and the issue happened again now (after I checked for an updated mod).

ReikaKalseki commented 5 years ago

Fixed and released are not synonyms.

MissingInAction86 commented 5 years ago

Got it, thank you