{"record":{"id":"fee14ddca640ae4a","repo":"fyne-io/fyne","slug":"todo-only-know-how-to-handle-dataintdec-type-here","errorCode":null,"errorMessage":"TODO only know how to handle DataIntDec type here","messagePattern":"TODO only know how to handle DataIntDec type here","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/fyne/internal/mobile/binres/binres.go","lineNumber":668,"sourceCode":"// If the value was not already present in pool, it is added.\nfunc addAttributeNamespace(attr xml.Attr, nattr *Attribute, tbl *Table, pool *Pool) error {\n\t// get type spec and value data type\n\tref, err := tbl.RefByName(\"attr/\" + attr.Name.Local)\n\tif err != nil {\n\t\treturn err\n\t}\n\tnt, err := ref.Resolve(tbl)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif len(nt.values) == 0 {\n\t\tpanic(\"encountered empty values slice\")\n\t}\n\n\tif len(nt.values) == 1 {\n\t\tval := nt.values[0]\n\t\tif val.data.Type != DataIntDec {\n\t\t\tpanic(\"TODO only know how to handle DataIntDec type here\")\n\t\t}\n\n\t\tt := DataType(val.data.Value)\n\t\tswitch t {\n\t\tcase DataString, DataAttribute, DataType(0x3e):\n\t\t\t// TODO identify 0x3e, in bootstrap.xml this is the native lib name\n\t\t\tnattr.RawValue = pool.ref(attr.Value)\n\t\t\tnattr.TypedValue.Type = DataString\n\t\t\tnattr.TypedValue.Value = uint32(nattr.RawValue)\n\t\tcase DataIntBool, DataType(0x08):\n\t\t\tnattr.TypedValue.Type = DataIntBool\n\t\t\tswitch attr.Value {\n\t\t\tcase \"true\":\n\t\t\t\tnattr.TypedValue.Value = 0xFFFFFFFF\n\t\t\tcase \"false\":\n\t\t\t\tnattr.TypedValue.Value = 0\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"invalid bool value %q\", attr.Value)","sourceCodeStart":650,"sourceCodeEnd":686,"githubUrl":"https://github.com/fyne-io/fyne/blob/8860ee95c356385effa5a7be51adb11c6be9d2b6/cmd/fyne/internal/mobile/binres/binres.go#L650-L686","documentation":"In addAttributeNamespace, when a resolved attribute type spec has exactly one value, the encoder assumes that value is stored as DataIntDec (decimal integer) and then reinterprets the integer itself as a DataType tag (string/bool/etc.). If the single value has any other storage type (string, hex, float), there is no code path for it and the function panics with this TODO.","triggerScenarios":"A manifest attribute whose framework type spec contains exactly one value typed as something other than DataIntDec - an attribute whose format definition is stored as a string in the vendored tables - during 'fyne package -os android'.","commonSituations":"Same class as the empty-values panic: newer or unusual android: attributes; vendored framework data lagging the SDK; fyne versions behind current Android releases.","solutions":["Remove the recently added attribute from the custom manifest (bisect to identify it)","Update fyne to a version whose vendored tables encode the attribute as DataIntDec","Patch addAttributeNamespace to handle the additional data type and contribute the fix upstream"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Pre-flight: diff your custom manifest attributes against a known-good baseline\n// (attributes encoded successfully by your current fyne version).\nfunc checkAttrs(custom, baseline []string) error {\n    known := map[string]bool{}\n    for _, a := range baseline { known[a] = true }\n    for _, a := range custom {\n        if !known[a] { return fmt.Errorf(\"unvetted manifest attribute %q may not be encodable\", a) }\n    }\n    return nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Test packaging in CI whenever the manifest changes, not only on release day","Prefer standard attributes with int/bool semantics; exotic typed attributes stress the old tables","Upgrade fyne together with, not long after, your target SDK bump"],"tags":["android","xml","manifest","binres","packaging","go"],"backgroundTag":null,"analyzedSha":"8860ee95c356385effa5a7be51adb11c6be9d2b6","analyzedAt":"2026-08-15T22:01:51.624Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}