-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Crash, heap dump missing #1417
Comments
When we reach the limit of hprof files, we remove the oldest. The analyzer service is serial, and each hprof is renamed where handled, it's very likely that this resets lastModified to a more recent value and therefore the oldest hprof is the one that hasn't been handled yet, leading to this error. Fix is probably to reset lastModified to the same date after the move (file.setLastModified()) |
I haven't been able to repro, last modified doesn't seem to change on my emulator. I'm not sure what else this could be, so will apply the enforcement of last modified. |
* Added LeakCanary.Config.maxStoredHeapDumps (default 7) to enabling configuring how many hprof files are retained. * Added LeakCanary.Config.requestWriteExternalStoragePermission (default false) to stop having those pesky double LeakCanary notifications on first leak for most users. * Added tracking of why files were removed in case #1417 happens again.
* Added LeakCanary.Config.maxStoredHeapDumps (default 7) to enabling configuring how many hprof files are retained. * Added LeakCanary.Config.requestWriteExternalStoragePermission (default false) to stop having those pesky double LeakCanary notifications on first leak for most users. * Added tracking of why files were removed in case #1417 happens again.
HeapAnalyzer crashes because the heap dump file passed to the service didn't exist
Not sure how this can happen. Worth noticing that 2 seconds before we were successfully parsing and handling a hprof (same? another one?)
The latest release of leakcanary does not block if an analysis is in progress, so there might be concurrency issue or old cleanup code that's too aggressive.
The text was updated successfully, but these errors were encountered: