JanDeDobbeleer/oh-my-posh · error

GetResults manager: 0x%08x

Error message

GetResults manager: 0x%08x

What it means

After awaitAsync succeeds, the code extracts the result (the SessionManager instance) via the IAsyncOperation GetResults vtable slot. A non-zero HRESULT is reported as "GetResults manager: 0x%08x" - the async op claimed to complete but its result could not be retrieved.

Source

Thrown at src/runtime/smtc_windows.go:262

	)
	if hr != 0 {
		return nil, fmt.Errorf("RoGetActivationFactory: 0x%08x", hr)
	}
	defer comRelease(factory)

	var asyncOp unsafe.Pointer
	if hr := comCall(factory, staticsRequestAsync, uintptr(unsafe.Pointer(&asyncOp))); hr != 0 {
		return nil, fmt.Errorf("RequestAsync: 0x%08x", hr)
	}
	defer comRelease(asyncOp)

	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

View on GitHub (pinned to 0976794618)

Solutions

  1. Retry the query; this is often a transient COM state issue.
  2. Check the HRESULT: 0x80004005 suggests an internal WinRT failure - update Windows.
  3. If it reproduces on every call, verify the hardcoded vtable offsets (asyncOpGetResults) match the target Windows version's WinRT ABI.
Defensive patterns

Strategy: fallback

Validate before calling

// No pre-call validation possible for COM GetResults; gate on Windows
if runtime.GOOS != "windows" { skipMediaSegment() }

Try / catch

info, err := env.QueryMediaPlayer(player)
if err != nil {
    log.Debug(err.Error()) // e.g. "GetResults manager: 0x80004005"
    return templateWithoutMedia
}

Prevention

When it happens

Trigger: Calling asyncOpGetResults on a completed IAsyncOperation returns a failing HRESULT, typically E_FAIL or E_POINTER, when the completed status is inconsistent with a valid result object.

Common situations: Race where the operation completes with an error status that awaitAsync's polling misses; COM interop/vtable-slot mismatch if the Windows SDK layout differs from the assumed offsets.

Related errors


AI-assisted analysis of JanDeDobbeleer/oh-my-posh@0976794618 (2026-08-31). Data as JSON: /api/errors/0b2644ca98f11cf3. Report an issue: GitHub.