[android-developers] Memory Leak issue in canvas

2020-12-22 Thread debangana Gupta Bhaya
I have developed a project where I am drawing continuous waveforms into canvas using the path. Below is the code snippet. @Override public void onDraw(Canvas canvas) { super.onDraw(canvas); n += 1; if (n >= data.length) { n = 1; path.moveTo(n - 1, data[n - 1]);

[android-developers] Memory Leak with SurfaceView and Opengl

2012-11-14 Thread Carlos Puyuelo
Hi all, I am dealing with a weird issue related to SurfaceView and memory. I have used MAT to make sure that the game I'm developing doesn't have any leak, nevertheless I find the following: I have an activity (worlds) where the user can choose a map. Another activity (markit) is the game

[android-developers] Memory leak in GLSurfaceView tutorial

2012-06-18 Thread Gerhard Aigner
Hi! I noticed a memory leak in the GLSurfaceView tutorial (http://developer.android.com/resources/articles/glsurfaceview.html) Attached application leak overview (very simple): 1. Start TheLeakActivity via button press from LeakStarterActivity 2. TheLeakActivity uses the tutorial code to

[android-developers] Memory leak using Pattern.matcher

2012-03-25 Thread David Griffiths
My app constantly runs out of memory and crashes when I am running unit tests (derived from AndroidTestCase). I seem to have isolated the problem; the following piece of code shows this in action: final Pattern pattern = Pattern.compile(^\\s*[[a-z][A-Z][0-9]]+\\s*\\(); final

Re: [android-developers] Memory leak using Pattern.matcher

2012-03-25 Thread Mark Murphy
Create a project that reproduces your error and post a bug report to http://b.android.com. On Fri, Mar 23, 2012 at 10:38 AM, David Griffiths davi...@cordic.com wrote: My app constantly runs out of memory and crashes when I am running unit tests (derived from AndroidTestCase). I seem to have

[android-developers] Memory leak and GC

2012-03-02 Thread B.Arunkumar
Hi, I would like to post the same question I have done on android ndk googlegroups. Please see this link: http://groups.google.com/group/android-ndk/browse_frm/thread/7bfffc2591ecb49b Thank you, B.Arunkumar Hi, Thank you for your reply. The byte array we get is converted into a Bitmap in

Re: [android-developers] Memory Leak problem (about activity background)

2011-12-12 Thread Onaih Emmanuel
Thanks On Sat, Dec 10, 2011 at 10:40 AM, Ken Yang kuas216...@gmail.com wrote: Hi!! Dear All, I have an app that contains many Activity. (ex: i got 10 Activity which be named a1,a2,a3,a10) and all of the Activity(a1,a2,a3a10) have background like this. LinearLayout

[android-developers] Memory Leak problem (about activity background)

2011-12-10 Thread Ken Yang
Hi!! Dear All, I have an app that contains many Activity. (ex: i got 10 Activity which be named a1,a2,a3,a10) and all of the Activity(a1,a2,a3a10) have background like this. LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:background=@drawable/bg_normal

Re: [android-developers] Memory leak error on a huge application

2011-09-05 Thread Daniel Drozdzewski
2011/9/5 Károly Holczhauser holczhau...@gmail.com: Hello girls and boys!  I'm going to describe my problem as short as I can and would like to give a thanks for any advice, tips and so on :) So, I had wrote an really complex News reader application which one is able to: -read news and

[android-developers] Memory leak and potential system crash in EventHub.cpp

2011-08-29 Thread hmohtasham
Greetings, I came across a memory allocation within the EventHub.cpp that I think can potentially leak and even cause a runtime error. The code is bit different in Gingerbread and Froyo but both have the same problem. Here is the snippet from the Gingerbread: int EventHub::openDevice(const char

[android-developers] memory leak managing service connection in onResume and onPause

2011-07-13 Thread Bouis, Laurent
Hi, I've identified a memory leak issue managing connection to a service when an activity is quickly created/destroyed (or possibly quickly resumed/pause; at least this is what I am thinking based on testing). I would like some help to understand what is causing this and how to fix it

Re: [android-developers] Memory leak with setAdapter + ArrayAdapter

2011-06-30 Thread Chris
You think debugging should come for free or something? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to

Re: [android-developers] Memory leak with setAdapter + ArrayAdapter

2011-06-30 Thread Romain Guy
Debuggers usually keep objects alive, preventing them from being freed. On Wed, Jun 29, 2011 at 11:09 PM, Chris crehb...@gmail.com wrote: You think debugging should come for free or something? -- You received this message because you are subscribed to the Google Groups Android Developers

Re: [android-developers] Memory leak with setAdapter + ArrayAdapter

2011-06-30 Thread Chris
Grr. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options,

Re: [android-developers] Memory leak with setAdapter + ArrayAdapter

2011-06-30 Thread Atlan
Hi Romain, thanks for answering this post. I think I read all your blog posts according to this subject... Maybe it's clear for you that this behavior is normal but it was at least not clear for me. I also think that a lot of other people are suffering with that. In all the posts I read it

Re: [android-developers] Memory leak with setAdapter + ArrayAdapter

2011-06-30 Thread Chris
Its so less complicated than 'quantum physics' -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to

Re: [android-developers] Memory leak with setAdapter + ArrayAdapter

2011-06-30 Thread Romain Guy
I actually never ever do a heap dump with the debugger attached. You really want to make sure there's no external entity interacting with your heap. On Wed, Jun 29, 2011 at 11:39 PM, Atlan off...@mikemitterer.at wrote: Hi Romain, thanks for answering this post. I think I read all your blog

Re: [android-developers] Memory leak with setAdapter + ArrayAdapter

2011-06-30 Thread Atlan
A system which shows me different results depending on how I observe it is a bit like quantum physics. Until the last few weeks I was really impressed about Android, it's API an how Google brought all these things together but after searching a memory leak for about 2 weeks which only exists

Re: [android-developers] Memory leak with setAdapter + ArrayAdapter

2011-06-30 Thread Atlan
That's what I learn in this conversation. But as said before I made a heap dump because my app crashed after changing the orientation in the emulator for about 6 to 10 times. This caused me to check the heap and because I found no problem in my code I started to make heap dumps. The dumps

Re: [android-developers] Memory leak with setAdapter + ArrayAdapter

2011-06-30 Thread Romain Guy
Checking the heap dump is perfectly, just make sure you're not doing it with the debugger attached. Also make sure to force a GC a couple of times on your process before taking a heap dump. On Thu, Jun 30, 2011 at 12:19 AM, Atlan off...@mikemitterer.at wrote: That's what I learn in this

Re: [android-developers] Memory leak with setAdapter + ArrayAdapter

2011-06-30 Thread Atlan
OK + Thank you. I linked this conversation to my post in Stack Overflow. Hope it helps some others too. Also make sure to force a GC a couple of times on your process before taking a heap dump. That's what I made. Mike -- You received this message because you are subscribed to the Google

Re: [android-developers] Memory leak with setAdapter + ArrayAdapter

2011-06-30 Thread Mark Murphy
On Thu, Jun 30, 2011 at 3:23 AM, Romain Guy romain...@android.com wrote: Checking the heap dump is perfectly, just make sure you're not doing it with the debugger attached. Just to be clear, what are the precise bounds of the debugger attached? Or, to phrase it another way, which of the

Re: [android-developers] Memory leak with setAdapter + ArrayAdapter

2011-06-30 Thread Romain Guy
Just to be clear, what are the precise bounds of the debugger attached? Or, to phrase it another way, which of the following should be avoided: -- Actively debugging in Eclipse (Debug As...) This one, since it involves the debugger. -- Running the project from Eclipse (Run As...) --

Re: [android-developers] Memory leak with setAdapter + ArrayAdapter

2011-06-30 Thread I-Sheng Lin
Have u ever thought to fix ur orientation attribute? On Jun 30, 2011 7:38 AM, Atlan off...@mikemitterer.at wrote: I am really total desperate. Since a week I am searching a memory leak in my App. I reduced everything to that little Activity attached. The problem *occurres** **if the

Re: [android-developers] Memory leak with setAdapter + ArrayAdapter

2011-06-30 Thread Atlan
What's wrong with my orientation attribute? In the original App I use one layout for landscape and one for portrait. But that should have nothing todo with that error anyway... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this

Re: [android-developers] Memory leak with setAdapter + ArrayAdapter

2011-06-30 Thread Atlan
That's clear. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more

[android-developers] Memory leak with setAdapter + ArrayAdapter

2011-06-29 Thread Atlan
I am really total desperate. Since a week I am searching a memory leak in my App. I reduced everything to that little Activity attached. The problem *occurres** **if the orientation changes. For example if I change the orientation in the emulator 6 times I have 6 Instances of my * *Activity in

Re: [android-developers] Memory leak with setAdapter + ArrayAdapter

2011-06-29 Thread Mark Murphy
On Wed, Jun 29, 2011 at 4:58 PM, Atlan off...@mikemitterer.at wrote: I am really total desperate. Since a week I am searching a memory leak in my App. You have not demonstrated that you have a memory leak in your app. I reduced everything to that little Activity attached. The problem 

Re: [android-developers] Memory leak with setAdapter + ArrayAdapter

2011-06-29 Thread Atlan
It drives me nuts - that only happens if I am debugging. If I do a normal Run all the Activities are gone. To me thats a big Bug in the development system! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Memory Leak in 1.6

2010-12-31 Thread John Gaby
I seem to have a memory leak when running under version 1.6 of the OS. I have a custom view group which contains some controls and I set it to be the current view via a call to setContentView(vg). If I then create a second view group and set it as the active view via setContentView(newVg), the

Re: [android-developers] Memory Leak with a ListView revisited

2010-10-21 Thread Mark Murphy
Move your ListAdapter to a public class or a static inner class of your Activity, and see if that helps. A ListView being its own adapter is not a well-trod path. On Thu, Oct 21, 2010 at 8:04 PM, John Gaby jg...@gabysoft.com wrote: I am still struggling with a memory leak associated with a

[android-developers] Memory leak using ListActivity in Android?

2010-10-14 Thread Kebab
I have an application that uses a Service and some list activities. When the activities are opened, I can see the heap usage increase in DDMS. When the activities are closed, the heap usage decreases slightly. The service is still running in the background at this point. If the activity is started

[android-developers] Memory Leak in Contact List

2010-05-19 Thread mike
hi guys, there are about 1000 contacts in my address book. in my application i'm referring 3 Content providers. Phone,Photos and one of mine. i'm using SimpleCursorAdapter to load contacts and images. when i'm scrolling down i'm getting a memory leak. sometimes when i selects a contact also

[android-developers] Memory Leak

2010-04-14 Thread Joshua Frank
I am using a simple frame animation and when I exit and reenter my activity the activity is still referenced in memory. Any Ideas? //This is a sample activity I created to simulate the problem public class MemoryLeakActivity extends Activity { @Override public void onCreate(final Bundle

Re: [android-developers] Memory Leak

2010-04-14 Thread Felipe Silveira
Looking to the code, I can't find any possible root cause for this leak. Are you sure the GC was executed before you take the heap dump? You can force it using DDMS. Also, using MAT (eclipse.org/mat) you can identify who is retaining a reference to the LeakyActivy object. Felipe Silveira

Re: [android-developers] Memory Leak

2010-04-14 Thread ~ TreKing
On Wed, Apr 14, 2010 at 8:37 AM, Joshua Frank frankjos...@gmail.com wrote: If I start LeakyActivity then hit the back button then start LeakyActivity again it stays in memory. Are you saying the first instance you started stays in memory? Otherwise I'm confused. If that's the case, as Felipe

[android-developers] Memory Leak in my map overlay

2010-01-10 Thread jgostylo
I have been banging away at this one for weeks and I feel like I have exhausted my research capabilities. I am hoping that someone will see my error in the code posted below. The code is completely functional doing everything I need, but there is a major memory leak. When I try to track memory

[android-developers] Memory leak or feature

2009-10-15 Thread Mika
Hi, So the problem is quite simple. I start a Service from an Activity, the user presses back, the Activity goes away and the Service stays running in the background. However the activity (and it's views) still stay in memory. Any ideas why is that?? I tested this with cupcake and G1. To

[android-developers] memory leak in activity

2009-09-24 Thread rukiman
In my app activity A creates activity B, however when the back key is pressed it goes back to activity A. This is a simplified version of my application. I would expect memory to be reclaimed when going back to Activity A. Going to activity B allocates more memory. I am using dumpsys meminfo to

[android-developers] Memory Leak in layout with an image file statically linked as background

2009-09-11 Thread Sreekanth Rao
My friend was quoting as said below. Can somebody validate his statement whether it is true. My Friends Quote : Apparently there is a problem in UI Framework with drawable resources management. If an activity uses a layout with an image file statically linked as background (and possibly some

[android-developers] Memory Leak when creating OnClickListener

2009-08-15 Thread Dan Sherman
Hey guys, Was curious if anyone could point our a way to avoid the following memory leak. When switching layouts in a single activity, and assigning OnClickListeners to buttons, each assignment looks to leak a bit of memory. Below is a quick example application that shows it happening with two

[android-developers] Memory leak - heap size (again)

2009-08-10 Thread Seb
Hi, First at all, sorry for my english. I know that's a subject which was discuss a lot of time and I try to find a solution since more than 6 day for the memory leak which appears in my application. I've read this page: http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/

[android-developers] Memory leak in AudioTrack?

2009-06-29 Thread Morné Pistorius
Hi all, If I create and release multiple AudioTrack objects, the GREF count continually increases which eventually causes an application crash. This small test code snipped illustrates the problem: byte[] buffer = readAudioFile( audio.raw ); for ( int n = 0; n

[android-developers] memory leak when closing and restarting appliction several times

2009-04-21 Thread Julie Alexan
Hi, All! Using 'ddms' and repeatably clicking SysInfo - Update from Device helped me find a memory leak. So we have 9 JUnit test cases spread amongst 4 files, and we run them in eclipse. After EACH test cases finishes, our application is exiting; and it restarts again for the next test case.

[android-developers] Memory leak in BitmapFactory/Gallery?

2008-12-03 Thread EboMike
I've already asked this in a href=http://groups.google.com/group/ android-developers/msg/9cdbf47be2505810?hl=enThis thread/a: Here is a pretty simple Gallery setup. It seems to leak with every image that's loaded (see the original thread for details). I'm tempted to file it as a bug, but I want