{"record":{"id":"8a00821b95584aeb","repo":"dotnet/wpf","slug":"global-custom-attribute-tag-embedded-in-isf-stream-does-not","errorCode":null,"errorMessage":"Global Custom Attribute tag embedded in ISF stream does not match guid table","messagePattern":"Global Custom Attribute tag embedded in ISF stream does not match guid table","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/InkSerializer.cs","lineNumber":741,"sourceCode":"                            // Load the Index into the Stroke Descriptor Table which will be used by the stroke following this till\n                            // a next different Index is found\n                            bytesDecodedInCurrentTag = SerializationHelper.Decode(inputStream, out strokeDescriptorTableIndex);\n                            break;\n                        }\n\n                    default:\n                        {\n                            if ((uint)isfTag >= KnownIdCache.CustomGuidBaseIndex || ((uint)isfTag >= KnownTagCache.KnownTagCount && ((uint)isfTag < (KnownTagCache.KnownTagCount + KnownIdCache.OriginalISFIdTable.Length))))\n                            {\n                                ISFDebugTrace(\"  CUSTOM_GUID=\" + guidList.FindGuid(isfTag).ToString());\n\n                                // Loads any custom property data\n                                bytesDecodedInCurrentTag = remainingBytesInStream;\n\n                                Guid guid = guidList.FindGuid(isfTag);\n                                if (guid == Guid.Empty)\n                                {\n                                    throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage(\"Global Custom Attribute tag embedded in ISF stream does not match guid table\"), \"inkdata\");\n                                }\n\n\n                                object data;\n\n                                // load the custom property data from the stream (and decode the type)\n                                localBytesDecoded = ExtendedPropertySerializer.DecodeAsISF(inputStream, bytesDecodedInCurrentTag, guidList, isfTag, ref guid, out data);\n                                if (localBytesDecoded > bytesDecodedInCurrentTag)\n                                {\n                                    throw new ArgumentException(ISFDebugMessage(\"Invalid ISF data\"), \"inkdata\");\n                                }\n\n\n                                // add the guid/data pair into the property collection (don't redecode the type)\n                                _coreStrokes.ExtendedProperties[guid] = data;\n                            }\n                            else\n                            {","sourceCodeStart":723,"sourceCodeEnd":759,"githubUrl":"https://github.com/dotnet/wpf/blob/81131a70a4c573cd62748a5c36908fc4d662daa9/src/Microsoft.DotNet.Wpf/src/PresentationCore/MS/internal/Ink/InkSerializedFormat/InkSerializer.cs#L723-L759","documentation":"While decoding an ISF stream, a Global Custom Attribute (extended property) tag was encountered whose tag index does not map to any GUID in the current guid table. The library cannot resolve which property the data belongs to, so it rejects the stream with ArgumentException.","triggerScenarios":"DecodeISF/DecodeRawISF reads a custom-attribute tag whose FindGuid lookup in the guidList returns Guid.Empty — i.e., the stream references a custom GUID tag not present in the decoder's known/registered guid table.","commonSituations":"ISF written by a newer WPF version or third-party vendor with custom extended properties that the consuming app's guid table lacks; stream crossed process/machine boundaries with different registered custom attributes; hand-crafted or fuzzed ISF payloads.","solutions":["Ensure the application that serializes the ink and the one that deserializes it share the same custom extended-property GUID registrations.","Use the same .NET/WPF version on both ends, or strip unknown custom attributes before transfer.","Check the stream for corruption or third-party ISF extensions; re-export from the original source.","Catch ArgumentException around DecodeISF and fall back to loading the strokes without the custom attributes where possible."],"exampleFix":"// before\ncollection = serializer.DecodeISF(stream);\n// after\ntry { collection = serializer.DecodeISF(stream); }\ncatch (ArgumentException e) {\n    log.Warn(\"ISF custom attribute not in guid table: \" + e.Message);\n    collection = DecodeCoreStrokesOnly(stream); // tolerant path\n}","handlingStrategy":"validation","validationCode":"// Confirm both ends register the same custom extended-property GUIDs before transfer\nif (!knownGuidTable.Contains(customGuid)) log.Warn(\"Custom ISF attribute {guid} unknown to reader\", customGuid);","typeGuard":"static bool HasKnownGuid(Guid g, IReadOnlyCollection<Guid> table) => table.Contains(g);","tryCatchPattern":"try { serializer.DecodeISF(stream); }\ncatch (ArgumentException ex) when (ex.Message.Contains(\"guid table\")) { return DecodeWithoutCustomAttributes(stream); }","preventionTips":["Share a single source of truth for custom extended-property GUIDs between writer and reader apps.","Strip vendor-specific custom attributes before persisting ink for later reload.","Pin the same WPF/.NET version across services that exchange ISF data."],"tags":["wpf","ink","isf","extended-properties","guid"],"backgroundTag":"invalid-argument-format","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"}