Page 1 of 1

[Rseding] [0.17.75] Crash with RollingStock wheels direction_count of 0

Posted: Wed Nov 06, 2019 1:15 pm
by Muppet9010
If you set RollingStock's wheel's direction_count to 0 the game crashes when you hover the RollingStock over a railway track and the game tries to draw the wheels.

https://wiki.factorio.com/Prototype/RollingStock#wheels
https://wiki.factorio.com/Types/Rotated ... tion_count


data.lua code used to reproduce the issue:

Code: Select all

data.raw["cargo-wagon"]["cargo-wagon"].wheels = {
	direction_count = 0,
	filename = "__core__/graphics/empty.png",
	width = 1,
	height = 1
}

Re: [0.17.75] Crash with RollingStock wheels direction_count of 0

Posted: Wed Nov 06, 2019 3:48 pm
by valneq
Muppet9010 wrote:
Wed Nov 06, 2019 1:15 pm
If you set RollingStock's wheel's direction_count to 0 the game crashes when you hover the RollingStock over a railway track and the game tries to draw the wheels.

https://wiki.factorio.com/Prototype/RollingStock#wheels
https://wiki.factorio.com/Types/Rotated ... tion_count


data.lua code used to reproduce the issue:

Code: Select all

data.raw["cargo-wagon"]["cargo-wagon"].wheels = {
	direction_count = 1,
	filename = "__core__/graphics/empty.png",
	width = 1,
	height = 1
}
The example code sets that value to 1. Does a value of 1 or a value of 0 reproduce the crash?

Re: [0.17.75] Crash with RollingStock wheels direction_count of 0

Posted: Wed Nov 06, 2019 3:52 pm
by Muppet9010
thanks, corrected. value of 0 is what causes the crash.

Re: [Rseding] [0.17.75] Crash with RollingStock wheels direction_count of 0

Posted: Mon Nov 11, 2019 11:43 am
by Rseding91
Thanks for the report. It's now fixed for the next version of 0.17. I also made it so wheels are optional and you can just not define them to not have them draw.