Skip to content

Incorrect case for default TextureGroup name causes duplicate Default/default groups #29

@Caritusy

Description

@Caritusy

Description

When decompiling a GameMaker project, the generated Texture Group name for the default texture group appears to be default, while GameMaker's built-in/default Texture Group is named Default.

This creates a case-only duplicate Texture Group:

Texture Group - Default
Texture Group - default

On Windows, since the filesystem is case-insensitive, both Default and default may point to the same cache output file, such as:

TextureGroups\_2048_131\default.xml

This can cause GameMaker's AssetCompiler to fail when compiling texture pages, especially during parallel builds.

Error Log

Example error from GameMaker:

Texture Group - Default
Texture Group - stage1
Texture Group - __YY__0fallbacktexture.png_YYG_AUTO_GEN_TEX_GROUP_NAME_
Texture Group - effects
Texture Group - default
Texture Group - stage2
Texture Group - stage4
Texture Group - stage3
Texture Group - system

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.AggregateException: One or more errors occurred. 
(The process cannot access the file 
'C:\Users\Requiem\AppData\Roaming\GameMakerStudio2-LTS2026\Cache\GMS2CACHE\K3P_0103_N_796250F5\Default\TextureGroups\_2048_131\default.xml' 
because it is being used by another process.)

 ---> System.IO.IOException: The process cannot access the file 
'...\TextureGroups\_2048_131\default.xml' 
because it is being used by another process.

   at GMAssetCompiler.TextureGroup.SaveCacheFile(String _cacheFile)
   at GMAssetCompiler.TexturePage.Compile()

The build command was using parallel jobs:

Igor.exe -j=8 ... Windows Run

Cause

The decompiler seems to output the default Texture Group as:

default

However, GameMaker itself expects/creates the default Texture Group as:

Default

Because both names only differ by case, this creates a problematic duplicate on Windows.

Expected Behavior

The decompiled project should use the same default Texture Group name as GameMaker:

Default

There should not be both Default and default Texture Groups in the generated project.

Suggested Fix

Normalize the default Texture Group name during export/decompilation.

For example:

private static string NormalizeTextureGroupName(string name)
{
    if (string.IsNullOrWhiteSpace(name))
        return "Default";

    if (string.Equals(name, "default", StringComparison.OrdinalIgnoreCase))
        return "Default";

    return name;
}

Then use this normalization both when dumping Texture Group definitions and when generating asset references:

name = NormalizeTextureGroupName(texGroup);
path = $"texturegroups/{NormalizeTextureGroupName(texGroup)}";

This should prevent the generated project from containing both Default and default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions