What does HRESULT 0x80093016 (OSS_BAD_ENCRULES) mean?

 
Previous Next
OSS_NULL_FCN OSS_UNAVAIL_ENCRULES

OSS_BAD_ENCRULES

OSS_BAD_ENCRULES (0x80093016) is an OSS ASN.1 runtime result for invalid encoding-rule selector in runtime control state. The OssControl object contains an unknown encoding-rules value, normally because the caller wrote an unsupported value or the object was corrupted. Because rule value immediately before the call is central to this condition, Microsoft’s HRESULT range and the OSS Nokalva return-code documentation should be read together. Start the investigation by recording API used to set BER, DER, PER, or another mode, then separate the encoded value from generated artifacts, call arguments, and the runtime package actually loaded by the process.

What the return code narrows down

At the invalid encoding-rule selector in runtime control state boundary, capture the first OSS function returning the value and note whether the operation was encode, decode, copy, compare, constraint validation, or trace setup. Preserve the selected PDU, encoding rules, and memory writes to the control object; otherwise an outer certificate or security wrapper may hide the useful codec result behind a generic failure.

Build a useful capture

RecordDiagnostic value
rule value immediately before the callLocates the concrete message, allocation, module, or API boundary
API used to set BER, DER, PER, or another modeSeparates payload-dependent behavior from build and process state
memory writes to the control objectMakes the comparison reproducible without rewriting the original artifact

Neighboring statuses: the result

UNAVAIL_ENCRULES names a recognized rule whose implementation is absent; BAD_ENCRULES means the selector itself is not valid.

Test one variable at a time

  1. set the rule through the documented API
  2. initialize a fresh context with default rules
  3. assert the selected rule against a closed enum

Instrumentation

Record the full 32-bit HRESULT and lower OSS return number together with operation direction, symbolic PDU, encoding rule, byte count, and generated-table identifier. Where rule value immediately before the call can expose sensitive content, a hash plus a bounded structural excerpt is safer than the complete payload. Use API used to set BER, DER, PER, or another mode together with OSS module paths and versions logged once per process so packaging differences can be correlated without flooding normal diagnostics.

Keep the original bytes or object graph unchanged while testing set the rule through the documented API. A change in API used to set BER, DER, PER, or another mode after reload, plugin replacement, restart, or schema deployment is evidence about runtime state, not permission to discard the reproducer. When memory writes to the control object points to one message, retain a cryptographic hash and the smallest safe sample instead of logging certificate, subscriber, credential, or private-key material.

Decision matrix

Controlled observationConclusion it supports
set the rule through the documented APIA changed outcome isolates the first proposed control instead of a blind retry
rule value immediately before the call differs between success and failureThe difference localizes the invalid encoding-rule selector in runtime control state boundary before unrelated settings are changed
An independent decoder accepts the same artifactInspect generated schema, selected rules, ABI, and optional OSS modules before declaring the bytes invalid
A fresh control object changes the outcomeInvestigate initialization, lifecycle, allocator ownership, configuration mutation, and concurrent access

Verify the repair: the result

Use documented setters and protect the context from unsynchronized or out-of-bounds writes. A recovery test built around set the rule through the documented API should replay the same operation under the same schema and encoding rule, retain one deliberately invalid control, and verify ownership and cleanup after both outcomes. Success after an unexamined retry is not proof that rule value immediately before the call now satisfies the codec contract.

Technical references


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