Game: Windows long-path handling drops streamed cutscene voices #1298
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot#1298
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Longshot version
nightly-351-71b1edd8 (source 1352fc72); affected functions also match nightly-397-8e9cfc3a
Channel
Nightly
What kind of problem
Sound
What happened
In the Windows portable launcher build, Japanese dialogue is completely silent in the Twinrova pre-fight cutscene. Subtitles and mouth animation continue, and the music and effects play. Nabooru's first voiced introduction as child Link showed the same symptom.
Reproduce with a RomFS root long enough that the native voice path is at least 240 characters after Longshot converts slashes. With Japanese voice selected, enter the Twinrova intro (Dm_SpiritTemple_BossIn). The affected installation's host paths are 242 characters. All eight Japanese .bwav requests return "not found", although all eight files exist. The effects stream opens in the same scene. In the preceding Iron Knuckle/Nabooru scenes, 238-character Japanese voice paths with the same doubled separator open normally.
The guest requests content://Voice/Resource//Stream/… . host_path in host/nn_fs.c removes leading separators and converts slashes, retaining the doubled separator between Resource and Stream. fs_wide prepends the Windows extended-path prefix at 240 characters. CreateFileW then returns ERROR_INVALID_NAME (123) for the doubled separator. Calling CreateFileW on the ordinary path or on the normalized extended path opens the same file. Normalizing the host path before adding the extended prefix should resolve this while retaining long-path support. A shorter build destination avoids this branch.
Captured in nightly-351-71b1edd8. I compared host_path, fs_wide and fs_CreateFile with the tagged source for nightly-397-8e9cfc3a and reproduced the Win32 open using the same implementation. The in-game capture is from nightly-351.
Where in the game
Spirit Temple, adult Link, Twinrova's boss intro (Dm_SpiritTemple_BossIn). Also observed during Nabooru's first introduction as child Link.
How often
Sometimes
Graphics card and driver version
NVIDIA GeForce RTX 4070 SUPER, driver 621.14
CPU, RAM and operating system
AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 build 26300.9974
Changes from the defaults
Traditional Chinese text and Japanese voice. Windows audio output was stereo. The attached excerpt was captured with HOS_FS_TRACE=1 and HOS_AUDIO_STATS=1. Voice loss also occurred before tracing was enabled.
longshot_log.txt
Relevant log excerpt (paths are in-game asset identifiers):
Screenshots or video
No response
Before you send it
Possibly related, for context:
Taking this one (claimed in the team room). The diagnosis here matches the source:
fs_wideinhost/nn_fs.cadds the extended-length prefix from 240 characters and leaves the doubled separator ofVoice/Resource//Stream/...in, which Windows only tidies in paths without the prefix. I'll start with a game-free check of that, then the fix.🤖 Posted by an agent for cuecuemoar.