What does HRESULT 0x88990011 (D2DERR_BAD_NUMBER) mean?

 
Previous Next
D2DERR_UNSUPPORTED_VERSION D2DERR_WRONG_FACTORY

D2DERR_BAD_NUMBER

D2DERR_BAD_NUMBER belongs to Direct2D geometry and numeric validation. A numeric input contains NaN, infinity, an invalid range, or another value Direct2D cannot accept.

Locate the first rejecting layer

Direct2D geometry processing depends on finite coordinates, valid matrices, closed geometry sinks, fill rules, and tolerances. A scanner failure identifies geometry processing, while a bad-number result can be raised by many APIs before rasterization. Preserve the path segments and numeric inputs at the first method that rejects them.

coordinates, matrices, opacity, dimensions, rectangles, effect properties, or tolerances at the failing call.

Controlled reproduction

Build the geometry segment by segment with identity transform and moderate coordinates. Check every sink close result, then add the original transform, tolerance, and extreme values independently.

  1. assert finite values before Direct2D calls.
  2. Use identity transforms and unit-sized geometry.
  3. Add calculations back one at a time.
  4. Test overflow and divide-by-zero paths.

Evidence to preserve

  • Every floating-point argument in hexadecimal or round-trip form
  • Source calculation and unit conversion
  • Matrix determinant and rectangle ordering
  • First API that validates or defers the number

Misleading responses

SCANNER_FAILED can be a downstream geometry-processing failure; BAD_NUMBER directly identifies invalid numeric data. 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.

Technical references


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