What does HRESULT 0x80004035 (CO_E_PREMATURE_STUB_RUNDOWN) mean?

 
Previous Next
CO_E_UNREVOKED_REGISTRATION_ON_APARTMENT_SHUTDOWN E_ADS_BAD_PATHNAME

CO_E_PREMATURE_STUB_RUNDOWN

COM stub was rundown while external clients remained

CO_E_PREMATURE_STUB_RUNDOWN is HRESULT 2147500085 (0x80004035) from winerror.h. The documented description is “The object has been rundown by the stub manager while there are external clients.” The value must be interpreted at marshaled object lifetime managed by a stub manager across apartment or process boundaries.

The server-side stub was released or disconnected even though external clients still held references. For reliable triage of this result, store the native HRESULT and symbolic identity before generic error handling rewrites either one.

Where the result appears

  • This result may surface in marshaled object lifetime managed by a stub manager across apartment or process boundaries.

Typical causes and interpretation

Common cause categories are: the server calls CoDisconnectObject too early; lifetime bookkeeping is corrupted; shutdown races with clients; custom marshaling violates reference rules. Investigate this result through falsifiable cause hypotheses and keep the first lower-level failure that explains the observed HRESULT.

Key distinction: the server-side stub was released or disconnected even though external clients still held references.

Correct handling and recovery

The appropriate recovery is to preserve server objects until documented disconnect conditions, serialize shutdown with proxy lifetime, and investigate reference-count or marshaling bugs. Do not loop on it; retry only under a documented transient condition with bounded delay and post-operation reconciliation.

After observing it, separate local resource cleanup from server-side reconciliation and perform each only for the failing activity ID.

Practical scenario

A service tears down a session object immediately after its local owner releases it, while a remote client still holds a proxy; lifetime is tied to external references instead.

Difference from related HRESULTs

RPC_E_DISCONNECTED is observed by a caller after disconnection; this code diagnoses premature server-side stub rundown.

Preserve the neighboring-result distinction in metrics and incident reports to avoid applying the wrong remediation.

References


Looking for a different code? Search another status or error code.