Android Question Downsampling image due to lack of memory.

Douglas Farias

Expert
Licensed User
Longtime User
Hi
what is this error?
i have all time but i m not downloading images

is because i have many querys ? i realy dont know why this
jobs querys ?

 

Attachments

  • Sem título.png
    144.5 KB · Views: 368

Pavka

Member
Licensed User
Longtime User
I had memory problems after adding admob banner to live wallpaper settings menu. After few entering of settings menu background image of lwp was first getting pixelated and after 1 or 2 more entering lwp stucked. In logs window I had "Downsampling image due to lack of memory:". Fortunately, bsnqt's trick with manifest file worked fine and now problem is solved.
 
Upvote 0

EvgenyB4A

Active Member
Licensed User
Longtime User
Assuming that it calls java.lang.Runtime.freeMemory then it should return an approximation of the free memory available.
Hi
I think there is the memory leakage problem in version 4.0 related to Designer Activity Animation Duration property. The default value is 400ms.
When I take layout that was saved with B4A v3.82, make any change and save it, I see the memory usage grows when I switch between activities(in release mode). When I set the Activity Animation Duration to zero, the memory usage doesn't grow. The existing layout has no any animation.
 
Upvote 0

EvgenyB4A

Active Member
Licensed User
Longtime User
Does it keep growing? Do you get an out of memory exception eventually?
Yes. The memory usage keeps growing and after the number of switching between activities appears " Downsampling image due to lack of memory" and then after some switching between activities comes "out of memory".
 
Upvote 0

jatko

Member
Licensed User
Longtime User
I have the same problem. The problem appear not only in release mode or debug mode. The pictures getting more and more pixelated during application working.
 
Upvote 0

EvgenyB4A

Active Member
Licensed User
Longtime User
Setting animation duration on each activity to 0 helps. To Erel: Please set 0 as default in next release of B4A.
Anyway the issue should be solved in case when the animation is needed.
 
Upvote 0

jatko

Member
Licensed User
Longtime User
It seems to help. My application has some buttons (BitmapDrawable). I used small png files. When I use the application and change layout the program gets more and more memory. After some time the application crashes down. Before the crash I can see in log "Downsampling image due to lack of memory".
Trying to resolve the problem I change the size of png files. It helps a little. Now I change animation duration. Now there is much more better. I will test the program.
 
Upvote 0

jatko

Member
Licensed User
Longtime User
The tests was finished. Everything is OK. The program is used by almost 200 sales reps.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…