What does HRESULT 0x800B000B (PERSIST_E_NOTSELFSIZING) mean?

 
Previous Next
PERSIST_E_SIZEINDEFINITE TRUST_E_NOSIGNATURE

PERSIST_E_NOTSELFSIZING

PERSIST_E_NOTSELFSIZING (0x800B000B) describes object does not carry enough information to delimit its own persisted representation. The persistence format depends on an external length, container record, or caller-owned boundary. Reading the object from an arbitrary stream position cannot determine where that object ends by inspecting its bytes alone. For PERSIST_E_NOTSELFSIZING, distinguish serialized bytes, the sizing interface, and the stream or container that owns framing.

Map the framing owner

LayerResponsibility
ContainerMay store a length prefix or directory entry for the object.
ObjectWrites fields but no complete self-delimiting envelope.
CallerMust pass a bounded substream or exact byte count.

Failure pattern

Concatenating several non-self-sizing objects into one stream without external lengths makes recovery ambiguous. Adding a magic value alone is not a robust length contract when the same bytes may occur in payload data.

Design tests

  1. Persist one object inside its documented container
  2. Attempt sequential reads with explicit bounded substreams
  3. Corrupt the external length and verify the reader fails without consuming the next record

Repair criterion

The container and object agree on framing, version, and byte count, and the reader never scans unbounded data to guess an object boundary.

Never recover a boundary by blind scanning

When the object is not self-sizing, its parent must provide a trusted length or bounded substream. Searching for the next magic value can misidentify payload bytes as framing and can turn one corrupt record into loss of synchronization for every following object.

Incident record for PERSIST_E_NOTSELFSIZING

RecordPurpose
First failing operationAPI name, object state, and exact return point
Original representationUnmodified bytes or a stable hash captured before repair or normalization
Contract identitySchema, protocol, database, or persistence version with feature flags
Negative controlOne intentionally invalid case that must remain rejected

Repeatability versus recovery for PERSIST_E_NOTSELFSIZING

A retry that drops PERSIST_E_NOTSELFSIZING may reflect changed process state, cache contents, timing, or input; repeat the same test in a fresh process and after the correction to distinguish repair from a transient path change.

Serialized envelope for PERSIST_E_NOTSELFSIZING

Format partQuestion
Header and versionObject class and format revision
Length ownershipObject, container, or outer record supplying the boundary
Variable childrenStrings, streams, embedded objects, and optional blocks
Integrity and terminationChecksums, counts, sentinels, or end-of-stream rules

Round-trip states for PERSIST_E_NOTSELFSIZING

Validate PERSIST_E_NOTSELFSIZING with minimum, typical, and maximum object states, include unknown optional fields for extensible formats, and require truncated or overlong data to fail without consuming the next object.

Responsibilities around PERSIST_E_NOTSELFSIZING

  • The object documents the size behavior it actually supports
  • The caller provides a growable stream, conservative buffer, or bounded substream
  • Object state remains stable between related sizing and saving passes
  • Version and framing changes are tested against older readers

Container compatibility for PERSIST_E_NOTSELFSIZING

Container propertyDiagnostic consequence
Seekable streamMay permit length or directory fields to be patched after serialization
Non-seekable streamRequires forward-only framing known before dependent records are emitted
Bounded substreamPrevents one malformed object from consuming bytes owned by the next record
Versioned containerDefines how older readers skip, reject, or preserve unknown persisted fields

Technical references for PERSIST_E_NOTSELFSIZING


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