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

Leak analysis failed: Object id not found in heap dump. #1516

Closed
kolphi opened this issue Jul 31, 2019 · 2 comments · Fixed by #1518
Closed

Leak analysis failed: Object id not found in heap dump. #1516

kolphi opened this issue Jul 31, 2019 · 2 comments · Fixed by #1518
Milestone

Comments

@kolphi
Copy link

kolphi commented Jul 31, 2019

Leak Analysis failed

Tried to analyze the files after the dump

2019-07-31_15-23-33_731.zip

Steps to Reproduce

Was doing some tests in our QA application, the application reported to freeze and dump files. When checking the files, "Analysis failed" screen was shown.

[Provide a sample project, a .hprof file or a failing test]
Hprof file attached to this issue

Version Information

  • LeakCanary version: 2.0-beta-1
  • Android OS version: Android 8.0.0 (Samsung Galaxy S8+)
  • Gradle version: 5.1.1
@pyricau
Copy link
Member

pyricau commented Jul 31, 2019

Thanks for the heap dump. Error reproduced:

java.lang.IllegalArgumentException: Object id 327163240 not found in heap dump.
	at shark.internal.HprofInMemoryIndex.indexedObject(HprofInMemoryIndex.kt:86)
	at shark.HprofHeapGraph.findObjectById(HprofHeapGraph.kt:75)
	at shark.internal.PathFinder.sortedGcRoots(PathFinder.kt:298)
	at shark.internal.PathFinder.enqueueGcRoots(PathFinder.kt:234)
	at shark.internal.PathFinder.findPathsFromGcRoots(PathFinder.kt:183)
	at shark.internal.PathFinder.findPathsFromGcRoots(PathFinder.kt:159)
	at shark.HeapAnalyzer.findLeaks(HeapAnalyzer.kt:122)
	at shark.HeapAnalyzer.analyze(HeapAnalyzer.kt:103)
	at shark.HeapAnalyzer.analyze$default(HeapAnalyzer.kt:82)
	at shark.LegacyHprofTest.analyzeHprof(LegacyHprofTest.kt:125)
	at shark.LegacyHprofTest.analyzeHprof(LegacyHprofTest.kt:113)
	at shark.LegacyHprofTest.bug(LegacyHprofTest.kt:32)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

@pyricau
Copy link
Member

pyricau commented Jul 31, 2019

@kolphi I will fix this for the next release. FYI, here's are the leaktraces:

┬
├─ com.jumio.analytics.JumioAnalytics
│    Leaking: NO (a class is never leaking)
│    GC Root: System class
│    ↓ static JumioAnalytics.mAgent
│                            ~~~~~~
├─ com.jumio.analytics.agents.FixedRateQuotaAgent
│    Leaking: UNKNOWN
│    ↓ FixedRateQuotaAgent.mEventDispatcher
│                          ~~~~~~~~~~~~~~~~
├─ com.jumio.analytics.http.HttpEventDispatcher
│    Leaking: UNKNOWN
│    ↓ HttpEventDispatcher.context
│                          ~~~~~~~
╰→ com.jumio.nv.NetverifyActivity
​     Leaking: YES (Activity#mDestroyed is true)

┬
├─ com.jumio.auth.AuthenticationSDK
│    Leaking: NO (AuthenticationSDK↓ is not leaking and a class is never leaking)
│    GC Root: System class
│    ↓ static AuthenticationSDK.instance
├─ com.jumio.auth.AuthenticationSDK
│    Leaking: NO (MainActivity↓ is not leaking)
│    ↓ AuthenticationSDK.rootActivity
├─ com.jumio.qa.MainActivity
│    Leaking: NO (MainActivity$QaAppPagerAdapter↓ is not leaking and Activity#mDestroyed is false)
│    ↓ MainActivity.mSdkFragmentPagerAdapter
├─ com.jumio.qa.MainActivity$QaAppPagerAdapter
│    Leaking: NO (Fragment[]↓ is not leaking)
│    ↓ MainActivity$QaAppPagerAdapter.mFragments
├─ androidx.fragment.app.Fragment[]
│    Leaking: NO (DvFragment↓ is not leaking)
│    ↓ array Fragment[].[3]
├─ com.jumio.qa.view.DvFragment
│    Leaking: NO (Fragment#mFragmentManager is not null)
│    Fragment.mTag=android:switcher:2131296475:3
│    ↓ DvFragment.mRoot
│                 ~~~~~
╰→ android.widget.ScrollView
​     Leaking: YES (ObjectWatcher was watching this)
​     mContext instance of com.jumio.qa.MainActivity with mDestroyed = false
​     View#mParent is null
​     View#mAttachInfo is null (view detached)
​     View.mWindowAttachCount = 1
​     key = e4157a1a-b2ce-4775-9520-d5cfab82e6df
​     watchDurationMillis = 75359
​     retainedDurationMillis = 70357

@pyricau pyricau changed the title Lean analysis failed 2.0-beta-1 Leak analysis failed: Object id not found in heap dump. Jul 31, 2019
@pyricau pyricau added this to the 2.0 Next Release milestone Jul 31, 2019
pyricau added a commit that referenced this issue Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants