AvaloniaUI/Avalonia · warning · InvalidOperationException
No value provided.
Error message
No value provided.
What it means
Centralized ThrowHelper.ThrowInvalidOperationException_InvalidOperation_NoValue throws InvalidOperationException "No value provided." It is a vestigial helper: in this Avalonia codebase it has no active call site (grep finds only the definition). It appears to be retained from the upstream ThrowHelper set for a nullable-value/Option-style guard but is not wired into any public PooledList/PooledStack API.
Source
Thrown at src/Avalonia.Base/Collections/Pooled/ThrowHelper.cs:318
throw GetInvalidOperationException_EnumCurrent(index);
}
[DoesNotReturn]
internal static void ThrowInvalidOperationException_InvalidOperation_EnumFailedVersion()
{
throw new InvalidOperationException("Collection was modified during enumeration.");
}
[DoesNotReturn]
internal static void ThrowInvalidOperationException_InvalidOperation_EnumOpCantHappen()
{
throw new InvalidOperationException("Invalid enumerator state: enumeration cannot proceed.");
}
[DoesNotReturn]
internal static void ThrowInvalidOperationException_InvalidOperation_NoValue()
{
throw new InvalidOperationException("No value provided.");
}
[DoesNotReturn]
internal static void ThrowInvalidOperationException_ConcurrentOperationsNotSupported()
{
throw new InvalidOperationException("Concurrent operations are not supported.");
}
[DoesNotReturn]
internal static void ThrowInvalidOperationException_HandleIsNotInitialized()
{
throw new InvalidOperationException("Handle is not initialized.");
}
[DoesNotReturn]
internal static void ThrowFormatException_BadFormatSpecifier()
{
throw new FormatException("Bad format specifier.");View on GitHub (pinned to 11c5427268)
Solutions
- Unreachable via public APIs — confirm you are not calling an internal helper directly.
- If you fork and wire it, ensure the caller supplies the required value before reaching this guard.
- Treat an unexpected occurrence as a signal to audit which code path reaches it.
Defensive patterns
Strategy: validation
Validate before calling
// Unreachable via public APIs today. If you wire this helper, ensure the // required value is supplied before reaching the guard.
Prevention
- Do not call internal ThrowHelper methods directly from product code.
- Audit call stacks if this surfaces unexpectedly.
- Treat vestigial helpers as dead code unless you fork them in.
When it happens
Trigger: Not reachable through public Avalonia collection APIs — no method calls this helper. Would only fire from a custom/internal call site that a fork adds.
Common situations: Encountering it implies a custom or forked code path invokes the helper; otherwise it is dead code.
Related errors
- Overlap alignment mismatch.
- Enumeration has not started.
- Enumeration has ended.
- Concurrent operations are not supported.
- Handle is not initialized.
AI-assisted analysis of AvaloniaUI/Avalonia@11c5427268 (2026-08-13).
Data as JSON: /api/errors/2b6c219f65bc6a66.
Report an issue: GitHub.