What does HRESULT 0x8899001C (D2DERR_TEXT_RENDERER_NOT_RELEASED) mean?

 
Previous Next
D2DERR_TEXT_EFFECT_IS_WRONG_TYPE D2DERR_EXCEEDS_MAX_BITMAP_SIZE

D2DERR_TEXT_RENDERER_NOT_RELEASED

The scope of D2DERR_TEXT_RENDERER_NOT_RELEASED is Direct2D and DirectWrite text callback contracts. The application retained an IDWriteTextRenderer reference after DrawText or DrawTextLayout returned, invalidating the callback object lifetime contract. Keep 0x8899001C beside the returning method because a wrapper can replace this distinction with a generic subsystem message.

Limits of this code

This is a lifetime error, not a font-cache or text-layout content error. Do not respond with a universal render-target recreation loop unless the returned status specifically documents device-loss recovery; graph, property, numeric, lifetime, and print-state errors require correcting their contract.

Start with the returning API

Text rendering crosses IDWriteTextLayout, drawing effects, renderer callbacks, COM reference counting, font resources, and optional glyph-image formats. A drawing-effect type mismatch, retained callback renderer, and invalid glyph image are separate failures even though all may occur during one DrawTextLayout call.

Reference counting and callback lifetime of the renderer supplied for one draw operation.

Evidence to preserve

  • AddRef/Release trace for the renderer
  • Callback stack and asynchronous work launched from it
  • Text layout and draw call generation
  • Objects retaining the renderer after return

Reproduce without destructive cleanup

Render plain outline text with no drawing effect, then add the effect object, custom renderer, and requested glyph image format one at a time. Track AddRef and Release around callbacks and retain the exact font face and glyph index.

  1. Use a stack-scoped or clearly owned renderer.
  2. Remove asynchronous retention from callbacks.
  3. assert final reference count at draw return.
  4. Copy only immutable data needed after the callback.

Technical references


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