eduran84 / LTN_Tracker

Other
7 stars 6 forks source link

Random non-recoverable error in data_processing #18

Closed chraledev closed 5 years ago

chraledev commented 5 years ago

non-recoverable error Error while running event LogisticTrainNetwork::on_train_changed_state (ID 23) The mod LTN Tracker caused a non-recoverable error. Please report this error to the mod author.

Error while running event LTN_Tracker::Custom event (ID 215) LTN_Tracker/ltnt/data_processing.lua:454: attempt to perform arithmetic on local 'real_amount' (a nil value) stack traceback: LTN_Tracker/ltnt/data_processing.lua:454: in function <LTN_Tracker__/ltnt/data_processing.lua:437> stack traceback: LogisticTrainNetwork/script/train-events.lua:151: in function 'TrainLeaves' LogisticTrainNetwork/script/train-events.lua:192: in function <LogisticTrainNetwork__/script/train-events.lua:186> stack traceback: [C]: in function 'raise_event' LogisticTrainNetwork/script/train-events.lua:151: in function 'TrainLeaves' LogisticTrainNetwork/script/train-events.lua:192: in function <LogisticTrainNetwork/script/train-events.lua:186

For me the fluid-fix did not really changed anything; may be related, may be unreleated.

To Reproduce No clue actually; I was looking at something else entirely but with factorio still focused, I replayed from my autosave, but it was about 4min in, so I could not recreate my steps exactly :-)

LTN Tracker version 0.9.5

factorio-current.log

chraledev commented 5 years ago

Wuuha... By sheer luck I found something... The error triggered the moment a fluid-train left the station without any fluid loaded because the station-timer reached zero. I suppose <fluid_cargo[item_name]> is nil instead of 0 if no drop ever touched the wagon :-)

eduran84 commented 5 years ago

That sounds like a good guess. Working on a fix.

For me the fluid-fix did not really changed anything

So you still see valid fluid shipments flagged as incorrect cargo?

chraledev commented 5 years ago

So you still see valid fluid shipments flagged as incorrect cargo?

Exactly... And quite random ones, so I guess, the tolerance could be a bit low... I will try 0.01 and 0.1 as tolerance and will get back to you with the results...

eduran84 commented 5 years ago

Do you have a save that can reliably reproduce the issue? Because I can't make that problem appear in my saves. Also, by now I doubt that it is a floating point issue. The tolerance should have been more than enough to fix that.

chraledev commented 5 years ago

reduced the tolerance to 0.01, tested, worked reverted the change back to 0.001, it is still working... x-files...

eduran84 commented 5 years ago

The original error should be fixed with 0.9.6. Still trying to figure out what's happening with incorrect alerts.