Error while running event LogisticTrainNetwork::on_train_changed_state (ID 23)
Value (2147483648.000000) outside of range. The data type allows values from -2147483648 to 2147483647 in property tree at ROOT[4].count
stack traceback:
__LogisticTrainNetwork__/script/stop-update.lua:508: in function 'UpdateStopOutput'
__LogisticTrainNetwork__/script/train-events.lua in function 'TrainArrives'
__LogisticTrainNetwork__/script/train-events.lua:199: in function <__LogisticTrainNetwork__/script/train-events.lua:195>
stack traceback:
[C]: in function '__newindex'
__LogisticTrainNetwork__/script/stop-update.lua:508: in function 'UpdateStopOutput'
__LogisticTrainNetwork__/script/train-events.lua in function 'TrainArrives'
__LogisticTrainNetwork__/script/train-events.lua:199: in function <__LogisticTrainNetwork__/script/train-events.lua:195>
I have a provider station for landfill, wich use filter inserters, all works well, no problems there.
I drove a train manually, so the train does not get filled automatically, so I added the station in the train shedule.
It only loads landfill if the train gives set filter to the providing station, but I didn't want to calculate, and I wanted the train to be absolutely full, AND not moving after done filling up.
So I set the condition landfill > 13545615313 ( random very very high number ), showing a G.x number, to be sure the condition would never be met, so the train would never leave so I could come there later and the train would be there for me.
I didn't see the timing, but I assume ( since the on_train_changed_state error ) the game crashed when the train arrived at that station.
I think I uploaded the right factorio-current.
requested items out of bounds
Moderator: Optera
requested items out of bounds
- Attachments
-
- factorio-current.log
- (20.83 KiB) Downloaded 89 times
Re: requested items out of bounds
Reading through your steps to reproduce it seemed odd this error suddenly popped up now in code that was untouched for over a year.
Turns out the recent ui changes allow for numbers outside 32bit int range, earlier versions would cap positive numbers at 2147483647.
Turns out the recent ui changes allow for numbers outside 32bit int range, earlier versions would cap positive numbers at 2147483647.
My Mods: mods.factorio.com
Re: requested items out of bounds
Which GUI is this?Optera wrote: ↑Fri Mar 20, 2020 4:57 pmReading through your steps to reproduce it seemed odd this error suddenly popped up now in code that was untouched for over a year.
Turns out the recent ui changes now allow for numbers outside 32bit int range, earlier versions would cap positive numbers at 2147483647.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: requested items out of bounds
Going by op description that should be Train waiting condition item > n
Edit:
Now i see what happened.... it's a 1 off error from > n while in ltn usually uses >=
I had some really old legacy code in place from a time before we had >= conditions. I guess removing that legacy code will be the cleanest way to fix, since I don't even support directly migrating from such ancient LTN versions.
So it seems no one tried that in the last year.
Edit:
Now i see what happened.... it's a 1 off error from > n while in ltn usually uses >=
I had some really old legacy code in place from a time before we had >= conditions. I guess removing that legacy code will be the cleanest way to fix, since I don't even support directly migrating from such ancient LTN versions.
So it seems no one tried that in the last year.
My Mods: mods.factorio.com
-
- Inserter
- Posts: 48
- Joined: Tue Feb 26, 2019 5:49 pm
- Contact:
Re: requested items out of bounds
I cannot test it right now, but i ran into this a couple month back.
I think this method is very picky and only accepts signed int 32
Code: Select all
https://lua-api.factorio.com/latest/LuaControlBehavior.html#LuaConstantCombinatorControlBehavior.set_signal
Re: requested items out of bounds
I'm always doing strange stuff,
but it seems like it is fixed,
I didn't use the exact same train, but I tried all kind of 'out of bound' conditions, and there was no crash anymore.
but it seems like it is fixed,
I didn't use the exact same train, but I tried all kind of 'out of bound' conditions, and there was no crash anymore.