Description

Platforms .ini config files can end up with incorrect data, due to how ProjectSettings manages the config data. On a Windows machine, if we open the ProjectSettings window, all the data is going to be filled with the content of the Windows*.ini file. Having all the Windows*.ini data filled in the ProjectSettings window, could let user think that modifying properties from there, will also translate to the Windows*.ini file, and that is not the case. The real issue comes from when we have loaded some data from the Windows*ini file inside the ProjectSettings. When an array property is changed via the ProjectSettings window, all the properties inside the Section are added to the Default*.ini file, not only the modified property. This means that some variables that were intended just to be inside the Windows*.ini file, are now written to Default*.ini file.

So now that the Windows*.ini data is also inside Default*.ini file, Linux*.ini file could inherit data from Default*.ini. This of course only happens if inside the Linux*.ini file we have not overwritten the value of the Default*.ini properties.

Steps to Reproduce

This "Steps to Reproduce" are thinked as if the reproducer of the case is working on a Windows machine, but should happen in all platforms.

1- Create a Windows/WindowsGame.ini, and a Linux/LinuxGame.ini file, inside your project Config directory.

2- Add some config information to the Windows.Game.ini file. Example:

[/Script/UnrealEd.ProjectPackagingSettings]
IncludePrerequisites=False
IncludeAppLocalPrerequisites=True
bShareMaterialShaderCode=False

3- Open the ProjectSettings window. The Windows.ini file should be placed inside the ProjectSettings window.

4- Modify an array property. For example, Packaging->List of maps to include in a packaged build.

5- Open the DefaultGame.ini file, and check that modifying the array value, writes all the properties of the array seciton.
Been debugging a bit, this code is inside SettingsEditor:NotifyPostChange. This code checks if the property is an container, or a single variable. Depend on the result, it writes the property or the whole section.

6- When the array value is added, DefaultGame.ini should be filled with all the properties inside the section of the modified array. This properties of the DefaultGame.ini, should also now have the properties of the WindowsGame.ini file.

7- If we now build for Linux, some properties that are inherit from DefaultGame.ini, that comes from WindowsGame.ini, are used for the packaging. The issue is that when an array is modified, all the properties of the section are overwritten (which is not expected by the user), and other platforms might get affected.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-215838 in the post.

1
Login to Vote

Unresolved
ComponentUE - Foundation - Core
Affects Versions5.45.3
Target Fix5.5
CreatedMay 27, 2024
UpdatedJun 4, 2024
View Jira Issue