{"record":{"id":"ab9b94f06b0400c1","repo":"dotnet/wpf","slug":"invalidepinisf","errorCode":null,"errorMessage":"InvalidEpInIsf","messagePattern":"InvalidEpInIsf","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/CustomAttributeSerializer.cs","lineNumber":686,"sourceCode":"                        return br.ReadUInt64();\n                    case (VarEnum.VT_R4):\n                        return br.ReadSingle();\n                    case (VarEnum.VT_R8):\n                        return br.ReadDouble();\n                    case (VarEnum.VT_DATE):\n                        return DateTime.FromOADate(br.ReadDouble());\n                    case (VarEnum.VT_BOOL):\n                        return br.ReadBoolean();\n                    case (VarEnum.VT_DECIMAL):\n                        return br.ReadDecimal();\n                    case (VarEnum.VT_BSTR):\n                        {\n                            byte[] bytestring = br.ReadBytes((int)memStream.Length);\n                            return System.Text.Encoding.Unicode.GetString(bytestring);\n                        }\n                    default:\n                        {\n                            throw new InvalidOperationException(SR.InvalidEpInIsf);\n                        }\n                }\n            }\n        }\n#if OLD_ISF\n        /// <summary>\n        /// Saves all elements in this list in the stream passed with the tags being generated based on the GuidList\n        /// by the caller and using compressionAlgorithm as the preferred algorith identifier. For ExtendedPropertyCollection associated\n        /// with Ink, drawing attributes and Point properties, we need to write the tag while saving them and hence\n        /// fTag param is true. For strokes, the Tag is stored in the stroke descriptor and hence we don't store the\n        /// tag\n        /// </summary>\n        /// <param name=\"attributes\">Custom attributes to encode</param>\n        /// <param name=\"stream\">If stream is null, then size is calculated only.</param>\n        /// <param name=\"guidList\"></param>\n        /// <param name=\"compressionAlgorithm\"></param>\n        /// <param name=\"fTag\"></param>\n        /// <returns></returns>","sourceCodeStart":668,"sourceCodeEnd":704,"githubUrl":"https://github.com/dotnet/wpf/blob/81131a70a4c573cd62748a5c36908fc4d662daa9/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/CustomAttributeSerializer.cs#L668-L704","documentation":"Thrown by ExtendedPropertySerializer.DecodeAttribute inside CustomAttributeSerializer when decoding an extended property value whose tag corresponds to a data type the decoder does not handle (default case of the tag switch). The ISF tag says the value is of a type this decoder cannot produce, so it refuses rather than return garbage.","triggerScenarios":"Loading ISF ink that contains an extended property encoded with a tag type unsupported by this version's decoder — e.g. data written by a newer or non-WPF ISF implementation using tags this code path doesn't recognize.","commonSituations":"Round-tripping ink between different platforms/versions of ISF writers; ink files created by tablet/ink SDKs with richer extended-property types than WPF supports.","solutions":["Identify the extended property with the unsupported tag in the source ink and remove/convert it to a supported type before saving.","Re-save the ink with a writer that emits only WPF-supported extended property types.","Load the ink in the same version/platform that wrote it, or upgrade to a version supporting the tag.","If the property is optional, tolerate the failure by catching the exception and skipping that attribute during load."],"exampleFix":"// before\nstrokeCollection.Load(isfStream); // throws on unsupported extended property tag\n// after\ntry { strokeCollection.Load(isfStream); }\ncatch (ArgumentException) { isfStream.Position = 0; LoadStrippingUnknownProperties(isfStream); }","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { strokeCollection.Load(isfStream); }\ncatch (ArgumentException ex)\n{\n    Log.Warn(\"Unsupported ISF extended property tag\", ex);\n    // retry with stripped/converted extended properties\n}","preventionTips":["Round-trip ink only with writers emitting WPF-supported extended property types","Convert exotic extended properties to byte[]/string before saving","Test cross-version ink files in CI"],"tags":["ink","isf","deserialization","unsupported-type"],"backgroundTag":"unsupported-enum-value","analyzedSha":"81131a70a4c573cd62748a5c36908fc4d662daa9","analyzedAt":"2026-09-14T10:12:48.479Z","contentChangedAt":"2026-09-14T10:12:48.479Z","schemaVersion":2},"datasetVersion":"2026-09-21T21:30:21.729Z"}