I just tested the new release 1.6.1 on our app and simulated a leak. I see the heap being analyzed in the notification then it stop. Here what I found in the logs :
07-25 16:19:35.555 32020 32046 D LeakCanary: Analysis in progress, working on: BUILDING_LEAK_TRACE
07-25 16:19:35.862 32020 32046 E AndroidRuntime: Process: com.ourapp:leakcanary, PID: 32020
07-25 16:19:35.862 32020 32046 E AndroidRuntime: at com.squareup.leakcanary.AbstractAnalysisResultService.sendResultToListener(AbstractAnalysisResultService.java:39)
07-25 16:19:35.862 32020 32046 E AndroidRuntime: at com.squareup.leakcanary.internal.HeapAnalyzerService.onHandleIntentInForeground(HeapAnalyzerService.java:69)
07-25 16:19:35.862 32020 32046 E AndroidRuntime: at com.squareup.leakcanary.internal.ForegroundService.onHandleIntent(ForegroundService.java:55)
07-25 16:19:35.885 32020 32046 E AndroidRuntime: at com.squareup.leakcanary.AbstractAnalysisResultService.sendResultToListener(AbstractAnalysisResultService.java:39)
07-25 16:19:35.885 32020 32046 E AndroidRuntime: at com.squareup.leakcanary.internal.HeapAnalyzerService.onHandleIntentInForeground(HeapAnalyzerService.java:69)
07-25 16:19:35.885 32020 32046 E AndroidRuntime: at com.squareup.leakcanary.internal.ForegroundService.onHandleIntent(ForegroundService.java:55)
07-25 16:19:50.959 1172 10944 I ActivityManager: Process com.ourapp:leakcanary (pid 32020) has died: prcp FGS
07-25 16:19:50.960 1172 10944 W ActivityManager: Scheduling restart of crashed service com.ourapp/com.squareup.leakcanary.internal.HeapAnalyzerService in 1000ms
07-25 16:19:22.998 32020 32046 D LeakCanary: Analysis in progress, working on: READING_HEAP_DUMP_FILE
07-25 16:19:23.008 32020 32046 D LeakCanary: Analysis in progress, working on: PARSING_HEAP_DUMP
07-25 16:19:25.342 32020 32046 D LeakCanary: Analysis in progress, working on: DEDUPLICATING_GC_ROOTS
07-25 16:19:26.619 32020 32046 D LeakCanary: Analysis in progress, working on: FINDING_LEAKING_REF
07-25 16:19:26.628 32020 32046 D LeakCanary: Analysis in progress, working on: FINDING_SHORTEST_PATH
07-25 16:19:35.555 32020 32046 D LeakCanary: Analysis in progress, working on: BUILDING_LEAK_TRACE
07-25 16:19:35.828 32020 32046 E JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 1297124)
07-25 16:19:35.862 32020 32046 E AndroidRuntime: FATAL EXCEPTION: IntentService[HeapAnalyzerService]
07-25 16:19:35.862 32020 32046 E AndroidRuntime: Process: com.ourapp:leakcanary, PID: 32020
07-25 16:19:35.862 32020 32046 E AndroidRuntime: java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 1297124 bytes
07-25 16:19:35.862 32020 32046 E AndroidRuntime: at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1582)
07-25 16:19:35.862 32020 32046 E AndroidRuntime: at android.app.ContextImpl.startForegroundService(ContextImpl.java:1538)
07-25 16:19:35.862 32020 32046 E AndroidRuntime: at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:669)
07-25 16:19:35.862 32020 32046 E AndroidRuntime: at android.support.v4.content.ContextCompat.startForegroundService(ContextCompat.java:570)
07-25 16:19:35.862 32020 32046 E AndroidRuntime: at com.squareup.leakcanary.AbstractAnalysisResultService.sendResultToListener(AbstractAnalysisResultService.java:39)
07-25 16:19:35.862 32020 32046 E AndroidRuntime: at com.squareup.leakcanary.internal.HeapAnalyzerService.onHandleIntentInForeground(HeapAnalyzerService.java:69)
07-25 16:19:35.862 32020 32046 E AndroidRuntime: at com.squareup.leakcanary.internal.ForegroundService.onHandleIntent(ForegroundService.java:55)
07-25 16:19:35.862 32020 32046 E AndroidRuntime: at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:76)
07-25 16:19:35.862 32020 32046 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
07-25 16:19:35.862 32020 32046 E AndroidRuntime: at android.os.Looper.loop(Looper.java:193)
07-25 16:19:35.862 32020 32046 E AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:65)
07-25 16:19:35.862 32020 32046 E AndroidRuntime: Caused by: android.os.TransactionTooLargeException: data parcel size 1297124 bytes
07-25 16:19:35.862 32020 32046 E AndroidRuntime: at android.os.BinderProxy.transactNative(Native Method)
07-25 16:19:35.862 32020 32046 E AndroidRuntime: at android.os.BinderProxy.transact(Binder.java:1127)
07-25 16:19:35.862 32020 32046 E AndroidRuntime: at android.app.IActivityManager$Stub$Proxy.startService(IActivityManager.java:4296)
07-25 16:19:35.862 32020 32046 E AndroidRuntime: at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1562)
07-25 16:19:35.862 32020 32046 E AndroidRuntime: ... 10 more
07-25 16:19:35.885 32020 32046 E AndroidRuntime: android.os.TransactionTooLargeException: data parcel size 1297124 bytes
07-25 16:19:35.885 32020 32046 E AndroidRuntime: java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 1297124 bytes
07-25 16:19:35.885 32020 32046 E AndroidRuntime: at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1582)
07-25 16:19:35.885 32020 32046 E AndroidRuntime: at android.app.ContextImpl.startForegroundService(ContextImpl.java:1538)
07-25 16:19:35.885 32020 32046 E AndroidRuntime: at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:669)
07-25 16:19:35.885 32020 32046 E AndroidRuntime: at android.support.v4.content.ContextCompat.startForegroundService(ContextCompat.java:570)
07-25 16:19:35.885 32020 32046 E AndroidRuntime: at com.squareup.leakcanary.AbstractAnalysisResultService.sendResultToListener(AbstractAnalysisResultService.java:39)
07-25 16:19:35.885 32020 32046 E AndroidRuntime: at com.squareup.leakcanary.internal.HeapAnalyzerService.onHandleIntentInForeground(HeapAnalyzerService.java:69)
07-25 16:19:35.885 32020 32046 E AndroidRuntime: at com.squareup.leakcanary.internal.ForegroundService.onHandleIntent(ForegroundService.java:55)
07-25 16:19:35.885 32020 32046 E AndroidRuntime: at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:76)
07-25 16:19:35.885 32020 32046 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
07-25 16:19:35.885 32020 32046 E AndroidRuntime: at android.os.Looper.loop(Looper.java:193)
07-25 16:19:35.885 32020 32046 E AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:65)
07-25 16:19:35.885 32020 32046 E AndroidRuntime: Caused by: android.os.TransactionTooLargeException: data parcel size 1297124 bytes
07-25 16:19:35.885 32020 32046 E AndroidRuntime: at android.os.BinderProxy.transactNative(Native Method)
07-25 16:19:35.885 32020 32046 E AndroidRuntime: at android.os.BinderProxy.transact(Binder.java:1127)
07-25 16:19:35.885 32020 32046 E AndroidRuntime: at android.app.IActivityManager$Stub$Proxy.startService(IActivityManager.java:4296)
07-25 16:19:35.885 32020 32046 E AndroidRuntime: at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1562)
07-25 16:19:35.885 32020 32046 E AndroidRuntime: ... 10 more
07-25 16:19:50.916 32020 32046 I Process : Sending signal. PID: 32020 SIG: 9
Let me know if you need more infos...
Thanks!
Pixel 2 xl - Android O Beta
This looks like a duplicate of #968.
Yes, may be. But #968 was regarding sharing.
In this case it fail 100% of the time while analyzing. If really duplicate we can close.
Thanks @eboudrant , this isn't a duplicate.
Would you mind trying to reproduce in the sample app (so that we can see if it's device related)? Also, is there any chance you could share the heap dump file that caused this?
Sounds like we might have to do things slightly differently...
Thanks ... I just tested with the sample app on the same device and it worked, likely related to our app. Let me see if I can share our heap dump.
I have an idea for a fix, when we have that we'll ask folks to test. Essentially we should write things to the file system instead of passing around all the data through IPC.
I'm consistently getting that crash too. The notification progress bar freezes:

Then a few seconds after the leakcanary service crashes:
09-05 16:16:48.435 E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 1143044)
09-05 16:16:48.445 E/AndroidRuntime: FATAL EXCEPTION: IntentService[HeapAnalyzerService]
Process: com.myapp.app.preview:leakcanary, PID: 18931
java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 1143044 bytes
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1527)
at android.app.ContextImpl.startForegroundService(ContextImpl.java:1483)
at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:655)
at android.support.v4.content.ContextCompat.startForegroundService(ContextCompat.java:570)
at com.squareup.leakcanary.AbstractAnalysisResultService.sendResultToListener(AbstractAnalysisResultService.java:39)
at com.squareup.leakcanary.internal.HeapAnalyzerService.onHandleIntentInForeground(HeapAnalyzerService.java:69)
at com.squareup.leakcanary.internal.ForegroundService.onHandleIntent(ForegroundService.java:55)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:76)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: android.os.TransactionTooLargeException: data parcel size 1143044 bytes
at android.os.BinderProxy.transactNative(Native Method)
at android.os.BinderProxy.transact(Binder.java:764)
at android.app.IActivityManager$Stub$Proxy.startService(IActivityManager.java:4873)
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1507)
at android.app.ContextImpl.startForegroundService(ContextImpl.java:1483)聽
at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:655)聽
at android.support.v4.content.ContextCompat.startForegroundService(ContextCompat.java:570)聽
at com.squareup.leakcanary.AbstractAnalysisResultService.sendResultToListener(AbstractAnalysisResultService.java:39)聽
at com.squareup.leakcanary.internal.HeapAnalyzerService.onHandleIntentInForeground(HeapAnalyzerService.java:69)聽
at com.squareup.leakcanary.internal.ForegroundService.onHandleIntent(ForegroundService.java:55)聽
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:76)聽
at android.os.Handler.dispatchMessage(Handler.java:106)聽
at android.os.Looper.loop(Looper.java:164)聽
at android.os.HandlerThread.run(HandlerThread.java:65)聽
I just upgraded to 1.6.1 from 1.5.4(was gettting too many Not allowed to start service Intent crashes). I'm running it on a Nexus 6P Android 8.1.
Got the same issue on one of production apps.
Will provide additional info in case of successful reproducing.
Device: Google Pixel (1st generation)
OS: Android P (with September patches)
Leak Canary version 1.6.1

Looks like duplicate of this #1049
@vbuberen @mateusgrb @eboudrant Hello, guys. Could you please test my fix? #1102
@IlyaGulya how can I test it?
@mateusgrb compile main leakcanary module, and use it in your project as dependency instead of the maven one
We are seeing this in our main app now too.
Most helpful comment
I have an idea for a fix, when we have that we'll ask folks to test. Essentially we should write things to the file system instead of passing around all the data through IPC.