Page 1 of 1
Noise expression error causes crash on Preview
Posted: Fri Sep 04, 2020 1:19 am
by super_aardvark
With a certain set of mods, when starting a new game and pressing Play, I get an in-game error popup reading, "Undefined named noise expression 'control-setting:cold:size:multiplier'". I can dismiss the error and continue using the game (though the new game is not started).
If I press Preview in the same circumstance, I get the same error message as a Windows error popup, and when I dismiss that window, Factorio closes.
Expected: the same in-game error message is displayed as for the Play button, and the game doesn't crash.
Re: Noise expression error causes crash on Preview
Posted: Fri Sep 04, 2020 2:07 am
by Loewchen
Post the log after a session with the issue please, see my signature.
Re: Noise expression error causes crash on Preview
Posted: Sat Sep 05, 2020 3:16 pm
by Rseding91
Can you please zip and upload the mods that cause that error somewhere and then post a link here?
Re: Noise expression error causes crash on Preview
Posted: Mon Jul 31, 2023 1:17 am
by Xorimuth
I came across this error whilst modding. Not a big deal, since I just forget to rename the noise expression name I was using.
Just give iron ore the following autoplace:
```
Code: Select all
autoplace = {
name = "iron-ore",
order = "b",
probability_expression = noise.define_noise_function( function(x, y, tile, map)
-- Frequency value from map gen settings
local frequency_multiplier = noise.var("control-setting:ff-seamount:frequency:multiplier")
local desired_frequency = 0.8 / (64 * 64^2)
return desired_frequency * frequency_multiplier
end),
richness_expression = noise.define_noise_function( function(x, y, tile, map)
return 100000
end)
}
```
If you generate a map, it gives the error ingame correctly. If you press "Preview", it crashes with "11.987 Error Util.cpp:86: Undefined named noise expression 'control-setting:ff-seamount:frequency:multiplier'"
Re: Noise expression error causes crash on Preview
Posted: Mon Jul 31, 2023 5:18 pm
by Rseding91
Thanks for the reproduction steps. It's now fixed for the next release.