Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide reference path on invalid object id error #2597

Merged
merged 3 commits into from
Jan 2, 2024

Conversation

pyricau
Copy link
Member

@pyricau pyricau commented Jan 2, 2024

Helped with #2567

./shark-cli.sh -h /Users/py/Downloads/2023-09-11_16-18-02_753.hprof   analyze
====================================
HEAP ANALYSIS FAILED

You can report this failure at https://github.com/square/leakcanary/issues
Please provide the stacktrace, metadata and the heap dump file.
====================================
STACKTRACE

java.lang.RuntimeException: Invalid object id reached through path:
┬───
│ GC Root: Thread object
│
├─ android.net.ConnectivityThread instance
│    ↓ Thread.contextClassLoader
├─ dalvik.system.PathClassLoader instance
│    ↓ ClassLoader.runtimeInternalObjects
├─ java.lang.Object[] array
│    ↓ Object[13501]
├─ androidx.core.google.shortcuts.builders.CapabilityBuilder[] class
│    ↓ static CapabilityBuilder.$class$componentType
╰→ UnknownObject336576656 instance
	at shark.PrioritizingShortestPathFinder.findPathsFromGcRoots(PrioritizingShortestPathFinder.kt:186)
	at shark.PrioritizingShortestPathFinder.findShortestPathsFromGcRoots(PrioritizingShortestPathFinder.kt:153)
	at shark.RealLeakTracerFactory.findLeaks(RealLeakTracerFactory.kt:94)
	at shark.RealLeakTracerFactory.createFor$lambda$0(RealLeakTracerFactory.kt:81)
	at shark.HeapAnalyzer.analyze(HeapAnalyzer.kt:179)
	at shark.HeapAnalyzer.analyze(HeapAnalyzer.kt:67)
	at shark.AnalyzeCommand$Companion.analyze(AnalyzeCommand.kt:36)
	at shark.AnalyzeCommand.run(AnalyzeCommand.kt:16)
	at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:139)
	at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:14)
	at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:215)
	at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:212)
	at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:230)
	at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:253)
	at shark.MainKt.main(Main.kt:13)
Caused by: java.lang.IllegalArgumentException: Object id 336576656 not found in heap dump.
	at shark.HprofHeapGraph.findObjectById(HprofHeapGraph.kt:134)
	at shark.PrioritizingShortestPathFinder.findPathsFromGcRoots(PrioritizingShortestPathFinder.kt:182)
	... 14 more
====================================
METADATA

Build.VERSION.SDK_INT: -1
Build.MANUFACTURER: Unknown
LeakCanary version: Unknown
Analysis duration: 2153 ms
Heap dump file path: /Users/py/Downloads/2023-09-11_16-18-02_753.hprof
Heap dump timestamp: 1704195781142
====================================

@pyricau pyricau merged commit 392906f into main Jan 2, 2024
9 checks passed
@pyricau pyricau deleted the py/better_invalid_id_error branch January 2, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant