JanDeDobbeleer/oh-my-posh · error
get_Size: 0x%08x
Error message
get_Size: 0x%08x
What it means
After obtaining the sessions vector view, the code asks for its element count via the IVectorView get_Size slot. A non-zero HRESULT is wrapped as "get_Size: 0x%08x" - the session collection size could not be read.
Source
Thrown at src/runtime/smtc_windows.go:274
if err := awaitAsync(asyncOp); err != nil {
return nil, fmt.Errorf("await RequestAsync: %w", err)
}
var manager unsafe.Pointer
if hr := comCall(asyncOp, asyncOpGetResults, uintptr(unsafe.Pointer(&manager))); hr != 0 {
return nil, fmt.Errorf("GetResults manager: 0x%08x", hr)
}
defer comRelease(manager)
var sessions unsafe.Pointer
if hr := comCall(manager, managerGetSessions, uintptr(unsafe.Pointer(&sessions))); hr != 0 {
return nil, fmt.Errorf("GetSessions: 0x%08x", hr)
}
defer comRelease(sessions)
var size uint32
if hr := comCall(sessions, vectorViewGetSize, uintptr(unsafe.Pointer(&size))); hr != 0 {
return nil, fmt.Errorf("get_Size: 0x%08x", hr)
}
for i := uint32(0); i < size; i++ {
var session unsafe.Pointer
if hr := comCall(sessions, vectorViewGetAt, uintptr(i), uintptr(unsafe.Pointer(&session))); hr != 0 {
continue
}
info, ok := readMediaSession(session, player)
comRelease(session)
if ok {
return info, nil
}
}
// No matching session in the SMTC list — surface a closed status so the
// caller hides cleanly, mirroring the PowerShell script's contract.
return &MediaInfo{Status: "closed"}, nil
}View on GitHub (pinned to 0976794618)
Solutions
- Retry the query - transient COM issues often clear.
- If deterministic, verify the hardcoded vtable slot indices (vectorViewGetSize) against the actual IVectorView`1 ABI for the running Windows version.
- Confirm the sessions object wasn't double-released (defer comRelease ordering) in modified code.
Defensive patterns
Strategy: fallback
Validate before calling
// Gate on environment before calling
if runtime.GOOS != "windows" { skipMediaSegment() } Try / catch
info, err := env.QueryMediaPlayer(player)
if err != nil && strings.Contains(err.Error(), "get_Size") {
return templateWithoutMedia
} Prevention
- Keep oh-my-posh and Windows in versions known to work together
- Treat collection-access HRESULT errors as 'no sessions available'
- Test the media segment after major Windows updates
When it happens
Trigger: The vectorViewGetSize vtable call on the IVectorView of sessions returns a failing HRESULT, usually from an invalid collection pointer or ABI/vtable-slot mismatch.
Common situations: Windows builds whose WinRT metadata layout differs from the hardcoded vtable offsets; a corrupted or early-released collection object.
Related errors
- QueryInterface IAsyncInfo: 0x%08x
- RoInitialize: 0x%08x
- RoGetActivationFactory: 0x%08x
- RequestAsync: 0x%08x
- GetResults manager: 0x%08x
AI-assisted analysis of JanDeDobbeleer/oh-my-posh@0976794618 (2026-08-31).
Data as JSON: /api/errors/2d94b279d5ed2b9e.
Report an issue: GitHub.