{"record":{"id":"543109477ea9bf01","repo":"d2phap/ImageGlass","slug":"ige-native-codec-proxy-codecid-returned-statu","errorCode":null,"errorMessage":"IGE: Native codec '{proxy.CodecId}' returned status {status} for GetAnimationInfo of '{metadata.FilePath}'.","messagePattern":"IGE: Native codec '(.+?)' returned status (.+?) for GetAnimationInfo of '(.+?)'\\.","errorType":"exception","errorClass":"InvalidDataException","httpStatus":null,"severity":"error","filePath":"source/ImageGlass.Lib/Plugins/NativePluginAnimator.cs","lineNumber":104,"sourceCode":"                    var pathRef = new IGStringRef { Data = pPath, Length = metadata.FilePath.Length };\n                    status = codecApi->GetAnimationInfo(pathRef, &info, (void*)cancelHandle);\n                }\n            }\n            catch (Exception ex)\n            {\n                proxy.FailureManager.RecordSoftFailure(proxy.Plugin.PluginId,\n                    $\"managed exception during GetAnimationInfo: {ex.Message}\");\n                throw new InvalidDataException(\n                    $\"IGE: Native codec '{proxy.CodecId}' threw during GetAnimationInfo of '{metadata.FilePath}'.\", ex);\n            }\n\n            if (status == IGStatus.Canceled)\n            {\n                token.ThrowIfCancellationRequested();\n            }\n            if (status != IGStatus.OK)\n            {\n                throw new InvalidDataException(\n                    $\"IGE: Native codec '{proxy.CodecId}' returned status {status} for GetAnimationInfo of '{metadata.FilePath}'.\");\n            }\n            infoOwned = true;\n\n            if (info.FrameCount <= 0 || info.Frames == null)\n            {\n                throw new InvalidDataException(\n                    $\"IGE: Native codec '{proxy.CodecId}' reported zero frames for '{metadata.FilePath}'.\");\n            }\n\n            // PHASE 2: copy per-frame timing into the SKCodecFrameInfo[] expected by AnimatorImpl.\n            // Only Duration + AlphaType are meaningful here -- the host does not composite.\n            var frames = new SKCodecFrameInfo[info.FrameCount];\n            for (var i = 0; i < info.FrameCount; i++)\n            {\n                var f = info.Frames[i];\n                frames[i] = new SKCodecFrameInfo\n                {","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/d2phap/ImageGlass/blob/4a3c4feceffc5a8bb5e56ba836509634aaae47a9/source/ImageGlass.Lib/Plugins/NativePluginAnimator.cs#L86-L122","documentation":"Thrown by NativePluginAnimator.Create when the plugin's GetAnimationInfo returns an IGStatus other than OK (Canceled routes to cancellation instead). The plugin ran but reported a failure code; the status value is interpolated so the caller can see whether it was InvalidData, Unsupported, OutOfMemory, etc.","triggerScenarios":"Produced at NativePluginAnimator.cs:104 when status != IGStatus.OK after the GetAnimationInfo native call. Reached when the host asks for animation info on a file the plugin cannot parse as animated.","commonSituations":"A still image misidentified as animated (codec routed to the animator path for a non-animated file); a malformed/truncated animated file; an animated sub-format the plugin does not support (e.g. an APNG in a GIF-only plugin); the file is not actually in the plugin's expected format despite the extension.","solutions":["Map the IGStatus code to its meaning (InvalidData → not a valid animated file, Unsupported → feature not supported) and route accordingly.","Verify the file is genuinely animated and not a still image routed to the animator by mistake (check the codec's animation-capability gate).","Try opening the file in another viewer; if valid, the plugin may not support that animated variant — report upstream.","Fall back to treating it as a single-frame image (skip animator creation) if GetAnimationInfo reports Unsupported."],"exampleFix":"// before\nif (status != IGStatus.OK)\n    throw new InvalidDataException($\"IGE: Native codec '{proxy.CodecId}' returned status {status} for GetAnimationInfo of '{metadata.FilePath}'.\");\n\n// after — downgrade Unsupported to a non-animated decode instead of throwing\nif (status == IGStatus.Unsupported)\n    return null; // caller falls back to static decode\nif (status != IGStatus.OK)\n    throw new InvalidDataException($\"IGE: Native codec '{proxy.CodecId}' returned status {status} for GetAnimationInfo of '{metadata.FilePath}'.\");","handlingStrategy":"try-catch","validationCode":"// Confirm the file is genuinely animated before requesting animation info.\nif (!metadata.IsAnimated) return null; // static decode path","typeGuard":null,"tryCatchPattern":"try { return NativePluginAnimator.Create(proxy, metadata, token); }\ncatch (InvalidDataException ex) when (ex.Message.Contains(\"returned status\") && ex.Message.Contains(\"GetAnimationInfo\"))\n{ _log.Warn($\"Plugin status on animation info: {ex.Message}; falling back to static.\"); return null; }","preventionTips":["Map IGStatus codes to actions: Unsupported → static fallback, InvalidData → corrupt file, OutOfMemory → smaller decode.","Do not route still images into the animator path.","Keep a built-in animator fallback for extensions backed by a flaky plugin.","Log the exact status code for plugin-author triage."],"tags":["plugin","codec","native","animation","status-code"],"backgroundTag":null,"analyzedSha":"4a3c4feceffc5a8bb5e56ba836509634aaae47a9","analyzedAt":"2026-08-13T16:58:15.523Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}