Describe the bug
graphcoded.exe exits immediately with 0xC000001D (STATUS_ILLEGAL_INSTRUCTION, the usual Windows signature of a Swift runtime trap) and writes nothing to stdout or stderr when USERPROFILE points at a directory other than the real profile. When the shell's supervisor starts the daemon, this shows up only as "daemon unavailable".
Each variable was changed alone, always with GRAPHCODE_SUPPORT_DIR set to a sandbox, using the packaged daemon:
| Overridden variable |
Result |
| none (support dir only) |
listening |
HOME |
listening |
USERPROFILE |
exit 0xC000001D, no output |
LOCALAPPDATA |
listening |
TEMP and TMP |
listening |
To reproduce
$env:GRAPHCODE_SUPPORT_DIR = <sandbox>, and set $env:USERPROFILE to an existing empty directory.
- Run
bin\graphcoded.exe from the built package.
- The process exits with
0xC000001D and no output.
Expected behavior
Either run normally or exit with a clear diagnostic on stderr and a non-trap exit code.
Environment
- GraphCode version: 0.1.77 label, built locally from commit 59ebed1
- OS: Windows 11 Enterprise 26200 x64
- Swift 6.3.3
Additional context
- Likely candidates are
FileManager.default.homeDirectoryForCurrentUser / NSHomeDirectory() call sites (for example IPC/WindowsNamedPipeTransport.swift, SupportDirectory.swift), or a force-unwrap or precondition on profile identity. The root cause was not determined; attach a debugger, or capture a crash dump with WER LocalDumps.
GraphcodeKit/ is shared with macOS, so validate on both platforms per AGENTS.md.
- Redirecting
USERPROFILE is uncommon in practice, but people try it when sandboxing.
Describe the bug
graphcoded.exeexits immediately with0xC000001D(STATUS_ILLEGAL_INSTRUCTION, the usual Windows signature of a Swift runtime trap) and writes nothing to stdout or stderr whenUSERPROFILEpoints at a directory other than the real profile. When the shell's supervisor starts the daemon, this shows up only as "daemon unavailable".Each variable was changed alone, always with
GRAPHCODE_SUPPORT_DIRset to a sandbox, using the packaged daemon:HOMEUSERPROFILELOCALAPPDATATEMPandTMPTo reproduce
$env:GRAPHCODE_SUPPORT_DIR = <sandbox>, and set$env:USERPROFILEto an existing empty directory.bin\graphcoded.exefrom the built package.0xC000001Dand no output.Expected behavior
Either run normally or exit with a clear diagnostic on stderr and a non-trap exit code.
Environment
Additional context
FileManager.default.homeDirectoryForCurrentUser/NSHomeDirectory()call sites (for exampleIPC/WindowsNamedPipeTransport.swift,SupportDirectory.swift), or a force-unwrap or precondition on profile identity. The root cause was not determined; attach a debugger, or capture a crash dump with WER LocalDumps.GraphcodeKit/is shared with macOS, so validate on both platforms per AGENTS.md.USERPROFILEis uncommon in practice, but people try it when sandboxing.