{"record":{"id":"0a75b5b743b22480","repo":"Tencent/matrix","slug":"hprofentry-is-absent-in-result-info","errorCode":null,"errorMessage":"hprofEntry is absent in result.info.","messagePattern":"hprofEntry is absent in result\\.info\\.","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":235,"sourceCode":"                final String key = kvPair[0].trim();\n                final String value = kvPair[1].trim();\n                resultInfoMap.put(key, value);\n            }\n\n            final String sdkVersionStr = resultInfoMap.get(\"sdkVersion\");\n            if (sdkVersionStr == null) {\n                throw new IllegalStateException(\"sdkVersion is absent in result.info.\");\n            }\n            final int sdkVersion = Integer.parseInt(sdkVersionStr);\n\n            final String manufacturer = resultInfoMap.get(\"manufacturer\");\n            if (manufacturer == null) {\n                throw new IllegalStateException(\"manufacturer is absent in result.info.\");\n            }\n\n            final String hprofEntryName = resultInfoMap.get(\"hprofEntry\");\n            if (hprofEntryName == null) {\n                throw new IllegalStateException(\"hprofEntry is absent in result.info.\");\n            }\n            final ZipEntry hprofEntry = new ZipEntry(hprofEntryName);\n\n            final String leakedActivityKey = resultInfoMap.get(\"leakedActivityKey\");\n            if (leakedActivityKey == null) {\n                throw new IllegalStateException(\"leakedActivityKey is absent in result.info.\");\n            }\n\n            // We would extract hprof entry into a temporary file.\n            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 {","sourceCodeStart":217,"sourceCodeEnd":253,"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#L217-L253","documentation":"CLIMain.doAnalyze requires the result.info 'hprofEntry' key naming the zip entry that holds the .hprof heap dump, which it then extracts into a temp file. If the key is absent, it cannot locate the dump and throws IllegalStateException.","triggerScenarios":"The result zip's result.info lacks 'hprofEntry', or the named entry does not correspond to an actual zip member.","commonSituations":"Repacking hprof bundles manually and renaming the hprof file without updating result.info; bundles produced by a different Matrix version schema; corrupted/truncated zips.","solutions":["Regenerate the bundle so result.info contains hprofEntry=<zip entry name> and that entry exists in the zip","Add/fix the 'hprofEntry=<name>' line to match the actual .hprof entry name inside the zip","Unzip and confirm the hprof entry name matches exactly (case-sensitive)"],"exampleFix":"// before (result.info)\nsdkVersion=33\nmanufacturer=Google\n// after (result.info)\nsdkVersion=33\nmanufacturer=Google\nhprofEntry=dump.hprof","handlingStrategy":"validation","validationCode":"String entry = info.get(\"hprofEntry\");\nif (entry == null || zf.getEntry(entry) == null) throw new IllegalArgumentException(\"hprofEntry missing or not in zip\");","typeGuard":"null","tryCatchPattern":"try { doAnalyze(args); } catch (IllegalStateException e) { System.err.println(\"Invalid result bundle: \" + e.getMessage()); System.exit(1); }","preventionTips":["Ensure hprofEntry matches the actual zip member name exactly","Don't rename hprof files inside result bundles without updating result.info"],"tags":["cli","heap-dump","missing-config-field"],"backgroundTag":"missing-required-config-field","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"}