shadow1ng/fscan · error
%s (LastError: %d) [minidump_first_process_failed]
Error message
%s (LastError: %d) [minidump_first_process_failed]
What it means
Raised in findProcessInSnapshot when the first Process32FirstW call fails, i.e. the snapshot handle exists but iterating it returned zero — corrupted or already-invalid snapshot; includes GetLastError.
Source
Thrown at plugins/local/minidump.go:323
proc32First, err := pm.kernel32.FindProc("Process32FirstW")
if err != nil {
return 0, fmt.Errorf("%s: %w", i18n.Tr("minidump_find_proc_failed", "Process32FirstW"), err)
}
proc32Next, err := pm.kernel32.FindProc("Process32NextW")
if err != nil {
return 0, fmt.Errorf("%s: %w", i18n.Tr("minidump_find_proc_failed", "Process32NextW"), err)
}
lstrcmpi, err := pm.kernel32.FindProc("lstrcmpiW")
if err != nil {
return 0, fmt.Errorf("%s: %w", i18n.Tr("minidump_find_proc_failed", "lstrcmpiW"), err)
}
ret, _, _ := proc32First.Call(snapshot, uintptr(unsafe.Pointer(&pe32)))
if ret == 0 {
//nolint:errorlint // Windows LastError不应该wrapped
return 0, fmt.Errorf(i18n.GetText("minidump_first_process_failed")+" (LastError: %d)", windows.GetLastError())
}
for {
namePtr, err := syscall.UTF16PtrFromString(name)
if err != nil {
return 0, fmt.Errorf("%s: %w", i18n.GetText("minidump_process_name_convert_failed"), err)
}
ret, _, _ = lstrcmpi.Call(
uintptr(unsafe.Pointer(namePtr)),
uintptr(unsafe.Pointer(&pe32.szExeFile[0])),
)
if ret == 0 {
return pe32.th32ProcessID, nil
}
ret, _, _ = proc32Next.Call(snapshot, uintptr(unsafe.Pointer(&pe32)))View on GitHub (pinned to 95cc12e753)
Solutions
- Recreate the snapshot and retry enumeration
- Check privileges and handle limits on the target
- Skip the target process if enumeration keeps failing
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at plugins/local/minidump.go:323 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of shadow1ng/fscan@95cc12e753 (2026-09-06).
Data as JSON: /api/errors/49f34b84ed519137.
Report an issue: GitHub.