{"record":{"id":"8e403ba482302647","repo":"Tencent/matrix","slug":"bad-extra-info-line-line","errorCode":null,"errorMessage":"bad extra info line: <line>","messagePattern":"bad extra info line: <line>","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"matrix/matrix-android/matrix-resource-canary/matrix-resource-canary-analyzer-cli/src/main/java/com/tencent/matrix/resource/analyzer/CLIMain.java","lineNumber":263,"sourceCode":"            tempHprofFile = new File(new File(\"\").getAbsoluteFile(), \"temp_\" + System.currentTimeMillis() + \".hprof\");\n            StreamUtil.extractZipEntry(zf, hprofEntry, tempHprofFile);\n\n            // Parse extra info if exists.\n            final JSONObject extraInfo = new JSONObject();\n            final ZipEntry extraInfoEntry = zf.getEntry(EXTRA_INFO_NAME);\n            if (extraInfoEntry != null) {\n                BufferedReader br2 = null;\n                try {\n                    br2 = new BufferedReader(new InputStreamReader(zf.getInputStream(extraInfoEntry)));\n                    String line = null;\n                    while ((line = br2.readLine()) != null) {\n                        if (line.startsWith(\"#\")) {\n                            // Skip comment.\n                            continue;\n                        }\n                        final String[] pair = line.split(\"\\\\s*=\\\\s*\");\n                        if (pair.length < 2) {\n                            throw new IllegalStateException(\"bad extra info line: \" + line);\n                        }\n                        final String key = pair[0].trim();\n                        final String value = pair[1].trim();\n                        extraInfo.put(key, value);\n                    }\n                } finally {\n                    StreamUtil.closeQuietly(br2);\n                }\n            }\n\n            // Then do analyzing works and output into directory or zip according to the option. Besides,\n            // store extra info into the result json by the way.\n            analyzeAndStoreResult(tempHprofFile, sdkVersion, manufacturer, leakedActivityKey, extraInfo);\n        } finally {\n            if (tempHprofFile != null) {\n                tempHprofFile.delete();\n            }\n            StreamUtil.closeQuietly(br);","sourceCodeStart":245,"sourceCodeEnd":281,"githubUrl":"https://github.com/Tencent/matrix/blob/3b8293bd65d47eeea7caf1f32a3a5d4d5eab60e7/matrix/matrix-android/matrix-resource-canary/matrix-resource-canary-analyzer-cli/src/main/java/com/tencent/matrix/resource/analyzer/CLIMain.java#L245-L281","documentation":"While parsing the extra-info section of result.info, every non-comment line must contain a key=value pair (split on optional whitespace around '='). Lines with no '=' separator cannot be parsed and abort analysis with IllegalStateException, including the offending line in the message.","triggerScenarios":"result.info extra-info contains a bare line without '=' (e.g. just a key, a stray token, or a corrupted/partial line).","commonSituations":"Manual editing of result.info leaving orphan lines; text editors stripping the '=value' part; concatenation of files without a trailing newline merging two lines.","solutions":["Open result.info and fix/remove the offending line so it is either a '#' comment or key=value","Ensure each key has a value: 'key=value' with '=' separator","Rewrite result.info with proper line endings so lines are not merged"],"exampleFix":"// before (result.info extra section)\nleakCount\nkey=value\n// after\nleakCount=2\nkey=value","handlingStrategy":"validation","validationCode":"for (String line : extraLines) {\n  if (line.startsWith(\"#\") || line.trim().isEmpty()) continue;\n  if (!line.contains(\"=\")) throw new IllegalArgumentException(\"bad extra info line: \" + line);\n}","typeGuard":"null","tryCatchPattern":"try { doAnalyze(args); } catch (IllegalStateException e) { if (e.getMessage().startsWith(\"bad extra info line\")) { /* fix result.info and retry */ } }","preventionTips":["Keep one key=value per line in result.info extra sections","Avoid editors that strip '=' segments; use LF/CRLF consistently","Prefix non-data lines with '#' as comments"],"tags":["cli","parsing","invalid-argument-format"],"backgroundTag":"invalid-argument-format","analyzedSha":"3b8293bd65d47eeea7caf1f32a3a5d4d5eab60e7","analyzedAt":"2026-09-08T08:01:39.722Z","contentChangedAt":"2026-09-08T08:01:39.722Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}