Repository navigation
Open
Description
Description
rsgain easy crashes with an unhandled exception when the scan encounters a file whose full path exceeds the legacy Windows MAX_PATH limit (260 characters). The crash is silent on the console, no error message is printed, the process simply terminates mid-scan.
Environment
OS: Windows 11 (25H2)
rsgain version: 3.7 (latest)
Install path: C:\Program Files\tools\rsgain\rsgain.exe
Shell: PowerShell
Steps to Reproduce
- Have a directory tree containing at least one file whose full path exceeds 260 characters
- Run, e.g.:
rsgain easy -m MAX -p true_peak "M:\Music\Soundtracks\"using this preset (true_peak.ini):
[Global]
TruePeak=true- Observe the console output and wait for it to crash
Expected Behavior
rsgain scans the file successfully, ideally with Windows long-path support.
Actual Behavior
The process crashes with no console error message. Output simply stops mid-scan:
[OK] Applying preset 'true_peak'...
[OK] Building directory tree...
[OK] Found 4
process then terminates, no further output
Windows Event Viewer (Application log) shows:
Faulting application name: rsgain.exe, version: 0.0.0.0, time stamp: 0x69b95866
Faulting module name: ucrtbase.dll, version: 10.0.26100.8875, time stamp: 0x303b538a
Exception code: 0xc0000409
Fault offset: 0x00000000000a527e
Faulting process id: 0x4790
Faulting application path: C:\Program Files\tools\rsgain\rsgain.exe
Faulting module path: C:\WINDOWS\System32\ucrtbase.dll
Additional Context / Evidence
- Confirmed correlation with path length: listing all files under the target directory with PowerShell (
$_.FullName.Length -gt 259) returns several dozen matches in exactly the subtree that crashes. A sibling subtree with no paths over 259 characters scans successfully with the identical command and preset. LongPathsEnableddoes not fix it: enabling Windows' long path support (HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled = 1via elevated PowerShell, followed by a reboot) did not resolve the crash: same exception, same behavior. This suggests the limitation is a buffer internal to rsgain rather than an OS-level rejection of long paths.- Ruled out junctions/symlinks: no directory junctions or reparse points are present in the affected tree (checked via
Get-ChildItem -Recurse -Force -Directory | Where-Object { $_.LinkType }), ruling out a symlink-loop as the cause. - Confirmed workaround: using
substto map a short drive letter directly to the deep subdirectory before scanning avoids the crash entirely, which further confirms the issue is tied to total path length rather than file content, format, or encoding. - Example of an offending path (approximate structure, illustrative):
M:\Music\Soundtracks\Games\The Legend of Heroes\The Legend of Heroes Kiseki Series\01. Sora no Kiseki (Trails in the Sky)\[2015-06-11] THE LEGEND OF HEROES SORA NO KISEKI FC Evolution ORIGINAL SOUNDTRACK\1.24 - Suite White Flower Madrigal - Grief of Knights.m4a(260+ characters total)
Metadata
Metadata
Assignees
Labels
No labels
Activity
complexlogic commentedon Aug 23, 2026
Thanks for the report. I should be able to add long path support relatively easily.