d2phap/ImageGlass · error · NotSupportedException

IGE: Native codec '{proxy.CodecId}' is missing one of the an

Error message

IGE: Native codec '{proxy.CodecId}' is missing one of the animation entry points.

What it means

Thrown by NativePluginAnimator.Create when the plugin codec API table is missing any of the three animation entry points: GetAnimationInfo, FreeAnimationInfo, or DecodeAnimationFrame. The codec loaded and can decode static rasters, but it does not implement the animation ABI, so the host cannot build a frame-by-frame animator for it.

Source

Thrown at source/ImageGlass.Lib/Plugins/NativePluginAnimator.cs:71

    private readonly Lock _syncLock = new();

    private DispatcherTimer _timer;


    /// <summary>
    /// Builds an animator for the current photo by crossing the ABI once to pull
    /// animation traits and per-frame timing. Releases the native
    /// <see cref="IGAnimationInfo"/> back to the plugin before returning.
    /// </summary>
    public static NativePluginAnimator Create(NativeCodecProxy proxy,
        PhotoMetadata metadata, CancellationToken token)
    {
        var codecApi = proxy.CodecApi;
        if (codecApi->GetAnimationInfo == null
            || codecApi->FreeAnimationInfo == null
            || codecApi->DecodeAnimationFrame == null)
        {
            throw new NotSupportedException(
                $"IGE: Native codec '{proxy.CodecId}' is missing one of the animation entry points.");
        }

        // PHASE 1: register cancellation, allocate a stack slot for the info struct.
        var cancelHandle = PluginHostApiTable.RegisterCancellation(token);
        IGAnimationInfo info = default;
        var infoOwned = false;
        try
        {
            IGStatus status;
            try
            {
                fixed (char* pPath = metadata.FilePath)
                {
                    var pathRef = new IGStringRef { Data = pPath, Length = metadata.FilePath.Length };
                    status = codecApi->GetAnimationInfo(pathRef, &info, (void*)cancelHandle);
                }
            }

View on GitHub (pinned to 4a3c4fecef)

Solutions

  1. Confirm the plugin implements animation decode; if it is static-only, do not register it for animated file types.
  2. Rebuild the plugin against the current SDK so it exports GetAnimationInfo, FreeAnimationInfo, and DecodeAnimationFrame when it claims animation support.
  3. Gate animator creation on a capability flag from the plugin manifest so the host never calls Create on a static-only codec.
  4. Fall back to a built-in animator (SkiaAnimator) for the file if the plugin cannot animate.

Example fix

// before
if (codecApi->GetAnimationInfo == null || codecApi->FreeAnimationInfo == null || codecApi->DecodeAnimationFrame == null)
    throw new NotSupportedException($"IGE: Native codec '{proxy.CodecId}' is missing one of the animation entry points.");

// caller — only request an animator when the codec advertises animation support
if (!proxy.SupportsAnimation)
    throw new NotSupportedException($"IGE: Native codec '{proxy.CodecId}' is missing one of the animation entry points.");
Defensive patterns

Strategy: validation

Validate before calling

// Only request an animator when the codec advertises animation support.
if (!proxy.SupportsAnimation)
    throw new NotSupportedException($"Codec {proxy.CodecId} has no animation entry points");
var animator = NativePluginAnimator.Create(proxy, metadata, token);

Type guard

static bool SupportsAnimation(NativeCodecProxy p) =>
    p.CodecApi->GetAnimationInfo != null && p.CodecApi->FreeAnimationInfo != null && p.CodecApi->DecodeAnimationFrame != null;

Try / catch

try { return NativePluginAnimator.Create(proxy, metadata, token); }
catch (NotSupportedException ex) when (ex.Message.Contains("animation entry points"))
{ _log.Warn($"Codec {proxy.CodecId} has no animation ABI; treating as static."); return null; }

Prevention

When it happens

Trigger: Produced at NativePluginAnimator.cs:71 when any of codecApi->GetAnimationInfo, codecApi->FreeAnimationInfo, or codecApi->DecodeAnimationFrame is null. Reached when the host tries to create an animator for an animated file (GIF/WEBP/AVIF sequence) backed by this plugin.

Common situations: A plugin that supports only static decode of an extension but is registered for an animated container (e.g. a WEBP plugin that does still images only); an older plugin built before the animation ABI existed; a partial plugin implementation; the host mistakenly routed an animated file to a static-only codec.

Related errors


AI-assisted analysis of d2phap/ImageGlass@4a3c4fecef (2026-08-13). Data as JSON: /api/errors/d17c8d4ffdd24dcf. Report an issue: GitHub.