Questions tagged [leakcanary]

LeakCanary is a memory leak detection library for Android and Java.

Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

How to resolve a memory leak? MainActivity leaked (Flutter)

I'm encountering a memory leak issue in my Flutter application, and LeakCanary has detected a potential problem. I'm having difficulty pinpointing the root cause. I am currently working with mapbox. I ...
Stephen Essoun's user avatar
1 vote
2 answers
32 views

I'm getting a native crash in my application. This crash is frequent in the release build and has never occurred in debug

I tried looking into the systrace in Perfetto UI but just couldn't figure out the reason for crash. The logs for the crashes showed multiple calls related to the G.C so suspected it to be a memory ...
newbie_coder's user avatar
0 votes
1 answer
31 views

How to prevent leaking Fragment

I have the following Activity: class SwitchFragAct extends AppCompatActivity { Fragment a; Fragment b; onClickSwitchFrags(View v) { FragmentManager mgr = getSupportFragmentManager(); ...
Scott McDiggles's user avatar
0 votes
0 answers
15 views

exploiting program with stack canary by using BOF

I've started learning about information security and trying to solve some tasks about this topic. The program i have to exploit contains stack canary. It's a simple program asking password for 3 times ...
junia's user avatar
  • 33
0 votes
0 answers
59 views

Can we identify the line number responsible for memory leaks in an Android app?

I'm trying to find the line number causing a memory leak in an Android app. Is there a way to pinpoint the exact line? I have tried using LeakCanary library to find the memory leaks in the Android app....
Amit Gaikwad's user avatar
0 votes
0 answers
28 views

How to set AdListener to null

I have a banner ad and its callbacks that I display but when I finish the activity LeakCanary shows a memory leak: com.android.gms,ads.nonagon.ad.webview Leaking: YES (View.mContext references a ...
Lance Samaria's user avatar
0 votes
0 answers
126 views

ComposeView leak: ViewTreeObserver.OnGlobalLayoutListener leaking even if it is removed during onDispose

So I have this Composable that I use to detect if a keyboard is visible: @Composable fun keyboardVisibilityAsState(): State<Boolean> { val keyboardState = remember { mutableStateOf(false) } ...
Alvin Dizon's user avatar
  • 1,885
0 votes
0 answers
50 views

How can I find fs_base in gdb?

I'm studying about master canary these days and I want to know where exactly fs:0x28 is. Is there any way to access to fs_base instead of using $fs_base command? (My gdb is outdated so I can't use the ...
Hannah's user avatar
  • 1
0 votes
0 answers
64 views

How to figure out where canary and return address are located?

I have this code gave me from my professor, he also wrote other versions of the same software going to uncomment parts of code in order to show us how a stack works but I don't really understand. #...
Ludovico Latini's user avatar
1 vote
3 answers
233 views

ConnectivityManager Callback Memory Leak - Android

I'm using LeakCanary and it found a memory leak in ConnectivityManager. I've never used ConnectivityManager before and it's not in my project from anything that I wrote. I'm assuming maybe a 3rd party ...
Lance Samaria's user avatar
0 votes
0 answers
59 views

Android Studio - How can I turn off leak canary for UI test automation builds (not unit tests)

So I need to turn off leak canary for UI test automation builds. I followed documentation on official website for leak canary but it was not that helpful. I had this implementation on build.gradle(:...
Varian Wrynn's user avatar
0 votes
0 answers
15 views

Custom back press handler causes mem leak

have registered custom back press with handler onCreate in fragment. But leak canary tells there is memory leak when the fragment gets destroyed. This is on back press implementation called on ...
Solomon Boloshe's user avatar
0 votes
0 answers
43 views

How to use Leakcanary for Service (like InputMethodService)

My application is Keyboard IME Service, with some UI for config and testing. D/LeakCanary: LeakCanary is currently disabled: Waiting for debugger to detach. comes first. Then D/LeakCanary: Watching ...
Chester Fung's user avatar
0 votes
0 answers
11 views

How can I customize garbage collection in LeakCanary 2.10?

I'd like to use more thorough garbage collection than the LeakCanary default, prior to marking an object detained. This seemed to help with avoiding spurious Service-related leaks in earlier ...
Uli's user avatar
  • 2,868
0 votes
0 answers
139 views

LeakCanary RenderNodeAnimator instance memory leak

On my app, when I change theme, I get an instant memory leak notification from LeakCanary. The code I use to change theme: fun execute(isDark: Boolean){ if (isDark) { AppCompatDelegate....
lacrimosa's user avatar
0 votes
0 answers
52 views

Memory Leaks in Android - Fast Pace App Usage

I am currently developing an app and I am encountering some memory leak issues. I am using leak canary to detect them. My problem is, when I use the app like a normal human would o, leak canary ...
lacrimosa's user avatar
0 votes
0 answers
177 views

JobInfoSchedulerService Leaked

use google firebase implementation 'com.google.android.datatransport:transport-runtime:3.1.8',when i open my app i find this leaked: ==================================== HEAP ANALYSIS RESULT ==========...
bill liang's user avatar
0 votes
1 answer
896 views

received Activity#onDestroy() callback and Activity#mDestroyed is true - Android

How can I resolve this leak? ┬─── │ GC Root: Global variable in native code │ ├─ com.samsung.android.content.clipboard.SemClipboardManager$2 instance │ Leaking: UNKNOWN │ Retaining 204.4 kB in ...
jo jo's user avatar
  • 1,798
1 vote
1 answer
292 views

Activity with Navigation component cause A Memory Leak after Start New Root Activity or Calling Finish()

My app start with this Activity _ A _ Which has FragmentContainer that get initialized as following <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/...
Abdalla Maged's user avatar
2 votes
1 answer
780 views

Android - Leakcanary spot memory leak in Activities using Android webview - Problem identified in Samsung Android 13 (One ui 5)

folks Using leakcanary tool we have noticed recently memory leaks in activities that use webview. The issue just occurs in some models like Samsung devices with Android 13 (one ui 5). We were not able ...
DRBF's user avatar
  • 131
1 vote
0 answers
194 views

Leak canary detecting leaks but I dont know how the leak is occuring

I am getting the following leak from leak canary. But I dont know what is the reason. I also cannot replicate the leak.. The leak occurs randomly so I am not able to trace the leak. Here, I get leak ...
Diken Mhrz's user avatar
0 votes
1 answer
160 views

Memory Leak After Upgrading Ads Library For Android

I have upgraded the ads library to the following today: implementation 'com.google.android.gms:play-services-ads:21.5.0' I'm using Interstitial Ads only. Now, I'm getting the following memory leak as ...
Pablo Alfonso's user avatar
0 votes
0 answers
80 views

Memory-Leak or LeakCanary Bug

Here’s the situation: I’m using Navigation component, Airbnb Epoxy, TwoPaneSlidnig, Databinding and MVVM architecture I have one Activity, few Fragments, two Navhost (one for detail-pane and the main ...
Amit's user avatar
  • 53
0 votes
1 answer
267 views

Fragment Memory Leak during FragmentTransaction Android Studio

I am using LeakCanary to monitor memory leaks in my mobile app in Android Studio. They were found in an activity that makes a FragmentTransaction operation with two Fragments. They are both ...
Samy Sylvester's user avatar
0 votes
0 answers
19 views

maven dependency downlaoded for leakcanary shark but jar's not getting added to intellij ide classpath

I have maven project where i have downloaded below dependency <dependency> <groupId>com.squareup.leakcanary</groupId> <artifactId>shark</artifactId> <...
Sachin K.r's user avatar
0 votes
0 answers
74 views

Fragment leaks whenever I replace it with a new fragment in android studio (Java) leak canary

I still don't how to ask in stack but I hope you guys can understand my problem , I have been struggling to solve this leak that happens to me , I have a splash fragment that its only job is to show a ...
Ãssãssîñ's user avatar
0 votes
0 answers
117 views

Leak canary memory leak

How to fix this memory leak? The log is generated when closing an activity. There is AutoLogoutColumn class that wraps content and logs out the app when it is idle for a while. Its reporting ...
dqualias's user avatar
  • 358
0 votes
1 answer
711 views

Memory Leaking Android

Do you guys have any suggestion what can cause this memory leak that I got from the Leak Canary? Below is the description I am getting from the report. Steps to reproduce are, In the Settings menu, ...
Milos's user avatar
  • 394
0 votes
1 answer
236 views

I get this report from leak canary, how can I fix the problems identified

This is the output from leak canary after running the app. Th code below is the standard log output from leak canary and the references are based on the current app that uses exoplayer to play mp3 ...
PATRICK OKELLO's user avatar
0 votes
0 answers
60 views

How resolve the memory leak due to TextToSpeech?

android.speech.tts.TextToSpeech$Connection$1 instance │ Leaking: UNKNOWN │ Retaining 3.6 MB in 5653 objects │ Anonymous subclass of android.speech.tts.ITextToSpeechCallback$Stub ...
Prasanna Kumar's user avatar
0 votes
0 answers
41 views

Leak Canary SemClipboardManager - android

My device is samsung VERSION.SDK_INT: 24 and get me bellow leak, How can I resolve this? GC Root: Global variable in native code com.samsung.android.content.clipboard.SemClipboardManager$2 instance ...
jo jo's user avatar
  • 1,798
1 vote
0 answers
89 views

How to handle an interface leak from leak canary?

I keep getting this leak in the canary about the interface from SubroutineParentItemAdapter Class wherein used in Subroutine Fragment. I do not understand how SubroutineParentItemAdapter....
Gilbert Almazan's user avatar
0 votes
1 answer
493 views

LeakCanary is currently disabled: test class org.junit.Test was found in classpath

I added LeakCanary library to my project and i got this error message : LeakCanary is currently disabled: test class org.junit.Test was found in classpath. I found an answer which include this code ...
Yağmur Şancı's user avatar
1 vote
2 answers
395 views

lifecycle SavedStateHandlesVM instance memory leak in fragment

I have a fragment which gets data from an api, When i navigate to any other fragment i get this memory leak and I am using the LeakCanary library to monitor memory leaks in my app. I received this ...
YOUSEF -ELSAYED's user avatar
-1 votes
1 answer
107 views

Can I integrate leak canary to AOSP build system?

Can i add leak canary aar to Android.mk dependency and use leak canary as part of system app
ArathyAnand's user avatar
0 votes
1 answer
464 views

Memory leak in LeakCanary for Android

Below are the logs I got through Leak Canary. I am new to this and I am not sure what exactly is the issue here. Can you please help me how can I fix the same. ├─ android.app.AppOpsManager$3 instance │...
shree's user avatar
  • 158
1 vote
2 answers
1k views

Android MainActivity Data Leak after Changing app to Darkmode

I have a basic android app for now, where there's 2 fragments they are showing text only and 1 bottom navigation bar The app checks if the default mode is Darkmode or no so i can update my design... ...
Yousef Elsayed's user avatar
2 votes
0 answers
339 views

Details Activity leaked due to interstitial ad and some objects

In this app, I implemented an Admob interstitial ad in one activity, it should appeared after two clicks / entered the activity, Leak canary shows this ad causes a leak the leak canary debug details ...
Dr Mido's user avatar
  • 2,474
0 votes
1 answer
244 views

LeakCanary not installed in launcher

I did the change as suggested in app:build.gradle -> debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1' But when i pushed my apk, then i cannot see the Leak Canary in my ...
Harsh's user avatar
  • 1
0 votes
1 answer
98 views

AndroidJUnitRunner cannot find extra class com.squareup.leakcanary.FailTestOnLeakRunListener

I am trying to run leak canary along with my Android Instrumentation tests. I followed the LeakCanary documentation https://square.github.io/leakcanary/upgrading-to-leakcanary-2.0/#running-leakcanary-...
Sourabh's user avatar
  • 545
2 votes
1 answer
1k views

ExternalSyntheticLambda1 Leak Canary

I'm using LeakCanary to detect leaks in the app I'm working on. And I have no idea where this one comes from. What might ExternalSyntheticLambda1 refer to? I used binding first, and I decided to ...
Ana's user avatar
  • 41
0 votes
0 answers
113 views

i want a regex function for parsing shellcode to get hex address in python

b'%25$lx\n%37$lx\n%27$lx\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\...
qasim hussain nasir's user avatar
3 votes
1 answer
1k views

LeakCanary View.mContext references a destroyed activity (Custom View)

I'm trying to figure out how to resolve my memory leak. I have a CustomActivity, which adds a Fragment that contains a com.example.CustomViewGroup, which has a reference to a com.example.CustomView. ...
VIN's user avatar
  • 6,576
3 votes
0 answers
2k views

app memory leaks likely related to Jetpack Compose and Paging

I recently converted parts of my project to Jetpack Compose I show a list of text items using LazyColumn with data supplied through Pager. But I keep getting lots of warnings from LeakCanary about ...
LXJ's user avatar
  • 1,259
1 vote
1 answer
167 views

Android leakcanary obfuscate

Confusion can't use leakcanary LeakCanary plugin has been imported java.lang.NullPointerException have integrated Leakcanary for the first time in my app, The trace is generated like the following. ...
Sidnio's user avatar
  • 152
0 votes
1 answer
522 views

LeakCanary is currently disabled caused by leakcanary.LeakAssertions was found in classpath

I have been trying to add LeakCanary to my codebase. I've read the instructions from the Getting started where I also found out that LeakCanary has a test environment detection and I should add the ...
Ruan_Lopes's user avatar
  • 1,379
3 votes
2 answers
799 views

Sceneform - How to fix leaking SceneView?

I've been using SceneView for loading 3D models for almost a year now but I never understood what caused this leak. I would implement LeakCanary, but just this one leak because I couldn't figure out ...
DIRTY DAVE's user avatar
  • 2,449
2 votes
0 answers
249 views

How to fix Dialog Fragment memory leak?

I'm trying to destroy my dialog fragment but after onDestroy is called leakcanary notification is appeared and this log print for me. I take this error with BottomSheetDialogFragment too. I'm setting ...
hamidbayati74's user avatar
1 vote
1 answer
1k views

How to remove memory leaks in android studio using leak canary

This is my leak stack trace from Leak canary in my android app. I was unable to provide the whole stack trace but here are the ends and begining ┬─── │ GC Root: System class android.app.ActivityThread$...
Ankit Verma's user avatar
4 votes
0 answers
539 views

Leakcanary - DecorView.mMSActions

I receive a notice from Leakcanary when debugging my app on a Samsung Galaxy S10 running on Android 12. Indeed, Leakcanary notifies a leaked activity when toggle from light to night mode or vice versa....
andronaline's user avatar

1
2 3 4 5
8