What does HRESULT 0x88985006 (DWRITE_E_ALREADYREGISTERED) mean?

 
Previous Next
DWRITE_E_FONTCOLLECTIONOBSOLETE DWRITE_E_CACHEFORMAT

DWRITE_E_ALREADYREGISTERED

DWRITE_E_ALREADYREGISTERED means that the application tried to register the same DirectWrite loader interface more than once with a factory. It is usually a lifecycle or initialization-order defect, not evidence that the font file itself is invalid.

Typical cause

Custom font collection and font file loaders are registered with a DirectWrite factory and must remain valid while that factory can call them. Microsoft documents that a loader instance can be registered only once; duplicate registration commonly occurs when several components independently initialize the same singleton or retry after a partial startup path.

How to fix it

  • Centralize factory ownership and make loader registration idempotent at that boundary.
  • Match every successful registration with an orderly unregister operation during shutdown, not from the loader’s destructor.
  • Keep the loader object alive until unregistering is complete, because DirectWrite can retain a reference to it.

Microsoft: RegisterFontCollectionLoader · Microsoft: custom font collection lifecycle


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