What does HRESULT 0x88990007 (D2DERR_ZERO_VECTOR) mean?

 
Previous Next
D2DERR_DISPLAY_STATE_INVALID D2DERR_INTERNAL_ERROR

D2DERR_ZERO_VECTOR

D2DERR_ZERO_VECTOR means that a Direct2D operation received a vector with zero length in a context that requires a direction. Typical causes are two coincident points, a degenerate geometry calculation, or normalization performed without checking the vector length.

What to check

  • Validate vector length before normalizing it or deriving a direction from it.
  • Handle identical start and end points as a separate case.
  • Check values derived from transforms, animation, layout, or user input for NaN and zero-length results.

Do not replace the vector with an arbitrary direction unless that fallback is meaningful for the visual operation.

Microsoft: Direct2D error codes


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