{"record":{"id":"0b2644ca98f11cf3","repo":"JanDeDobbeleer/oh-my-posh","slug":"getresults-manager-0x-08x","errorCode":null,"errorMessage":"GetResults manager: 0x%08x","messagePattern":"GetResults manager: 0x%08x","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/runtime/smtc_windows.go","lineNumber":262,"sourceCode":"\t)\n\tif hr != 0 {\n\t\treturn nil, fmt.Errorf(\"RoGetActivationFactory: 0x%08x\", hr)\n\t}\n\tdefer comRelease(factory)\n\n\tvar asyncOp unsafe.Pointer\n\tif hr := comCall(factory, staticsRequestAsync, uintptr(unsafe.Pointer(&asyncOp))); hr != 0 {\n\t\treturn nil, fmt.Errorf(\"RequestAsync: 0x%08x\", hr)\n\t}\n\tdefer comRelease(asyncOp)\n\n\tif err := awaitAsync(asyncOp); err != nil {\n\t\treturn nil, fmt.Errorf(\"await RequestAsync: %w\", err)\n\t}\n\n\tvar manager unsafe.Pointer\n\tif hr := comCall(asyncOp, asyncOpGetResults, uintptr(unsafe.Pointer(&manager))); hr != 0 {\n\t\treturn nil, fmt.Errorf(\"GetResults manager: 0x%08x\", hr)\n\t}\n\tdefer comRelease(manager)\n\n\tvar sessions unsafe.Pointer\n\tif hr := comCall(manager, managerGetSessions, uintptr(unsafe.Pointer(&sessions))); hr != 0 {\n\t\treturn nil, fmt.Errorf(\"GetSessions: 0x%08x\", hr)\n\t}\n\tdefer comRelease(sessions)\n\n\tvar size uint32\n\tif hr := comCall(sessions, vectorViewGetSize, uintptr(unsafe.Pointer(&size))); hr != 0 {\n\t\treturn nil, fmt.Errorf(\"get_Size: 0x%08x\", hr)\n\t}\n\n\tfor i := uint32(0); i < size; i++ {\n\t\tvar session unsafe.Pointer\n\t\tif hr := comCall(sessions, vectorViewGetAt, uintptr(i), uintptr(unsafe.Pointer(&session))); hr != 0 {\n\t\t\tcontinue","sourceCodeStart":244,"sourceCodeEnd":280,"githubUrl":"https://github.com/JanDeDobbeleer/oh-my-posh/blob/0976794618c5ed95de0985dded50de1b4dc914cb/src/runtime/smtc_windows.go#L244-L280","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Retry the query; this is often a transient COM state issue.","Check the HRESULT: 0x80004005 suggests an internal WinRT failure - update Windows.","If it reproduces on every call, verify the hardcoded vtable offsets (asyncOpGetResults) match the target Windows version's WinRT ABI."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// No pre-call validation possible for COM GetResults; gate on Windows\nif runtime.GOOS != \"windows\" { skipMediaSegment() }","typeGuard":null,"tryCatchPattern":"info, err := env.QueryMediaPlayer(player)\nif err != nil {\n    log.Debug(err.Error()) // e.g. \"GetResults manager: 0x80004005\"\n    return templateWithoutMedia\n}","preventionTips":["Keep Windows updated - vtable/ABI issues stem from version drift","Degrade the prompt gracefully: media info is optional","Report persistent HRESULTs upstream with the exact code"],"tags":["windows","com","winrt","async"],"backgroundTag":"com-hresult-failure","analyzedSha":"0976794618c5ed95de0985dded50de1b4dc914cb","analyzedAt":"2026-08-31T23:41:19.708Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}