Tencent/matrix · error · IllegalStateException
hprofEntry is absent in result.info.
Error message
hprofEntry is absent in result.info.
What it means
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.
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)
Example fix
// before (result.info) sdkVersion=33 manufacturer=Google // after (result.info) sdkVersion=33 manufacturer=Google hprofEntry=dump.hprof
Defensive patterns
Strategy: validation
Validate before calling
String entry = info.get("hprofEntry");
if (entry == null || zf.getEntry(entry) == null) throw new IllegalArgumentException("hprofEntry missing or not in zip"); Type guard
null
Try / catch
try { doAnalyze(args); } catch (IllegalStateException e) { System.err.println("Invalid result bundle: " + e.getMessage()); System.exit(1); } Prevention
- Ensure hprofEntry matches the actual zip member name exactly
- Don't rename hprof files inside result bundles without updating result.info
When it happens
Trigger: The result zip's result.info lacks 'hprofEntry', or the named entry does not correspond to an actual zip member.
Common situations: Repacking hprof bundles manually and renaming the hprof file without updating result.info; bundles produced by a different Matrix version schema; corrupted/truncated zips.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- sdkVersion is absent in result.info.
- manufacturer is absent in result.info.
- leakedActivityKey is absent in result.info.
- bad extra info line
- Unable to determine bitmap configuration
AI-assisted analysis of Tencent/matrix@3b8293bd65 (2026-09-08).
Data as JSON: /api/errors/0a75b5b743b22480.
Report an issue: GitHub.
Appendix: source
Thrown at matrix/matrix-android/matrix-resource-canary/matrix-resource-canary-analyzer-cli/src/main/java/com/tencent/matrix/resource/analyzer/CLIMain.java:235
final String key = kvPair[0].trim();
final String value = kvPair[1].trim();
resultInfoMap.put(key, value);
}
final String sdkVersionStr = resultInfoMap.get("sdkVersion");
if (sdkVersionStr == null) {
throw new IllegalStateException("sdkVersion is absent in result.info.");
}
final int sdkVersion = Integer.parseInt(sdkVersionStr);
final String manufacturer = resultInfoMap.get("manufacturer");
if (manufacturer == null) {
throw new IllegalStateException("manufacturer is absent in result.info.");
}
final String hprofEntryName = resultInfoMap.get("hprofEntry");
if (hprofEntryName == null) {
throw new IllegalStateException("hprofEntry is absent in result.info.");
}
final ZipEntry hprofEntry = new ZipEntry(hprofEntryName);
final String leakedActivityKey = resultInfoMap.get("leakedActivityKey");
if (leakedActivityKey == null) {
throw new IllegalStateException("leakedActivityKey is absent in result.info.");
}
// We would extract hprof entry into a temporary file.
tempHprofFile = new File(new File("").getAbsoluteFile(), "temp_" + System.currentTimeMillis() + ".hprof");
StreamUtil.extractZipEntry(zf, hprofEntry, tempHprofFile);
// Parse extra info if exists.
final JSONObject extraInfo = new JSONObject();
final ZipEntry extraInfoEntry = zf.getEntry(EXTRA_INFO_NAME);
if (extraInfoEntry != null) {
BufferedReader br2 = null;
try {View on GitHub (pinned to 3b8293bd65)