Skip to content

Bug in DLC loading #232

Description

@shironosho

Emulator version
2025_04_20

Debug log
logs.zip

steam_settings file
steam_settings_files.zip

Requirement

  • I am uploaded debug log.
  • I am uploaded steam_setting file.
  • I am sure the game not using 3rd party server (Photon, Playfab, GC, etc).
  • I am sure can run the game offline.

Describe the bug

I'm not 100% sure this is a bug in the emulator, but it seems very likely to me.

To give a little backstory, in the game "NieR Replicant ver.1.22474487139..." (appid 1113560), the DLC files seem to not load properly. DLC "NieR Replicant 4 YoRHa" (appid 1408390) contains weapons and costumes. If a weapon from the DLC is equipped, the weapon model is invisible (everything else about the weapon seems to work). If a costume from the DLC is equipped, the game crashes while loading a save.

This bug seems to have been encountered with Steam as well (with no emulators), as it was reported in Steam Community. It was caused by a Steam client update and was later fixed in a newer version. In the discussion about the update, it was reported that it affected at least two other games as well (I don't have those to test them with the emulator).

All the info I listed above was what I found online (after I experienced the same problem). I could not find anything about what was actually fixed in the mentioned client update specifically, and the following is what I discovered after some testing (I couldn't find this mentioned anywhere else online).

Basically, it seems like this bug does not occur if the install path of the game (and the directory with the steam dll) is not "too long". Specifically, if the absolute install path is no longer than 51 characters, including the leading <driveletter>:\ and with no trailing backslash. I believe it's 51 bytes, more specifically, since replacing an ASCII character with a non-ASCII Unicode character causes the bug to appear again. Also, removing three ASCII characters after adding a character that would take three bytes in UTF-8 making it work again seems to hint that this path length is treated as UTF-8 (so 51 bytes in UTF-8 I guess?).

Here are the results of my testing. Of course, BAD means the bug was encountered and GOOD means no bug.

D:\123456789abcdef\NieR Replicant ver.1.22474487139         GOOD
D:\123456789abcdef\x\NieR Replicant ver.1.22474487139       BAD
D:\12345678\x\NieR Replicant ver.1.22474487139              GOOD
D:\123456789abcd\x\NieR Replicant ver.1.22474487139         GOOD
D:\123456789ab\x\y\NieR Replicant ver.1.22474487139         GOOD
D:\123456789ab\x\yz\NieR Replicant ver.1.22474487139        BAD
D:\1\2\3\4\5\6\x\yz\NieR Replicant ver.1.22474487139        BAD
D:\1\2\3\4\5\6\x\y\NieR Replicant ver.1.22474487139         GOOD
C:\Users\xxxxxxx\NieR Replicant ver.1.22474487139           GOOD
C:\Users\xxxxxxx\a\NieR Replicant ver.1.22474487139         GOOD
C:\Users\xxxxxxx\ab\NieR Replicant ver.1.22474487139        BAD
D:\1\2\3\4\5\6\x\yzwwwwwwwwwwwwwwwwwwwwwwwwwww\NieR         GOOD
D:\1\2\3\4\5\6\x\yzwwwwwwwwwwwwwwwwwwwwwwwwwwww\NieR        BAD
D:\1\2\3\4\5\6\x\yzwwwwwwwwwwwwwwwwwwwwwwwwwwあ\NieR        BAD
D:\1\2\3\4\5\6\x\yzwwwwwwwwwwwwwwwwwwwwwwwwwあ\NieR         GOOD

The same bug happens in the original Goldberg emulator. It was also present in the first emulator released with this game by CODEX, but was later fixed in a newer version (called "DLC Fix").

The log file with NOBUG_ prepended is from when the bug doesn't happen and the one with BUG_ is from when it does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions