Noise expression error causes crash on Preview

This subforum contains all the issues which we already resolved.
super_aardvark
Inserter
Inserter
Posts: 38
Joined: Thu Sep 15, 2016 6:27 am
Contact:

Noise expression error causes crash on Preview

Post 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.
Loewchen
Global Moderator
Global Moderator
Posts: 9329
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Noise expression error causes crash on Preview

Post by Loewchen »

Post the log after a session with the issue please, see my signature.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14403
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Noise expression error causes crash on Preview

Post by Rseding91 »

Can you please zip and upload the mods that cause that error somewhere and then post a link here?
If you want to get ahold of me I'm almost always on Discord.
Xorimuth
Filter Inserter
Filter Inserter
Posts: 700
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: Noise expression error causes crash on Preview

Post 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'"
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Rseding91
Factorio Staff
Factorio Staff
Posts: 14403
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Noise expression error causes crash on Preview

Post by Rseding91 »

Thanks for the reproduction steps. It's now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”