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 ?

LogCat connected to: B4A-Bridge: motorola XT1033-359321054369100
--------- beginning of /dev/log/main
** Activity (main) Pause, UserClosed = false **
(Intent) Intent { act=android.intent.action.MAIN flg=0x20000000 cmp=click.fight.vallow/.main }
no extras
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Service (httputils2service) Create **
** Service (httputils2service) Start **
Resposta do Servidor: [{"NickName":"doidloko","StatConta":"2"}]
** Activity (main) Pause, UserClosed = false **
** Activity (perfil) Create, isFirst = true **
** Activity (perfil) Resume **
Resposta do Servidor: [{"UserID":"35","StatConta":"2","NickName":"doidloko","SocID":"100000606767838","SocNet":"Facebook","FirstName":"Douglas","LastName":"Eduardo","CompName":"Douglas Eduardo","Gender":"male","DataNasc":"1992-08-03","Email":"[email protected]","Locale":"pt_BR","CamFotoPerfil":"https:\/\/fbcdn-profile-a.akamaihd.net\/hprofile-ak-frc3\/t1.0-1\/c33.0.200.200\/p200x200\/10325792_758162660880619_4072345100765266674_n.jpg","Country":"Brazil","City":"S\u00e3o Leopoldo","VotesUp":null,"VotesDown":null,"TotalVotes":null,"isVerified":null,"Strikes":null}]
** Activity (perfil) Pause, UserClosed = true **
** Activity (main) Resume **
Resposta do Servidor: [{"NickName":"doidloko","StatConta":"2"}]
** Activity (main) Pause, UserClosed = false **
** Activity (perfil) Create, isFirst = false **
** Activity (perfil) Resume **
Resposta do Servidor: [{"UserID":"35","StatConta":"2","NickName":"doidloko","SocID":"100000606767838","SocNet":"Facebook","FirstName":"Douglas","LastName":"Eduardo","CompName":"Douglas Eduardo","Gender":"male","DataNasc":"1992-08-03","Email":"[email protected]","Locale":"pt_BR","CamFotoPerfil":"https:\/\/fbcdn-profile-a.akamaihd.net\/hprofile-ak-frc3\/t1.0-1\/c33.0.200.200\/p200x200\/10325792_758162660880619_4072345100765266674_n.jpg","Country":"Brazil","City":"S\u00e3o Leopoldo","VotesUp":null,"VotesDown":null,"TotalVotes":null,"isVerified":null,"Strikes":null}]
** Activity (perfil) Pause, UserClosed = true **
** Activity (main) Resume **
Resposta do Servidor: [{"NickName":"doidloko","StatConta":"2"}]
** Activity (main) Pause, UserClosed = false **
** Activity (perfil) Create, isFirst = false **
Downsampling image due to lack of memory.
Downsampling image due to lack of memory.
** Activity (perfil) Resume **
Resposta do Servidor: [{"UserID":"35","StatConta":"2","NickName":"doidloko","SocID":"100000606767838","SocNet":"Facebook","FirstName":"Douglas","LastName":"Eduardo","CompName":"Douglas Eduardo","Gender":"male","DataNasc":"1992-08-03","Email":"[email protected]","Locale":"pt_BR","CamFotoPerfil":"https:\/\/fbcdn-profile-a.akamaihd.net\/hprofile-ak-frc3\/t1.0-1\/c33.0.200.200\/p200x200\/10325792_758162660880619_4072345100765266674_n.jpg","Country":"Brazil","City":"S\u00e3o Leopoldo","VotesUp":null,"VotesDown":null,"TotalVotes":null,"isVerified":null,"Strikes":null}]
** Activity (perfil) Pause, UserClosed = true **
** Activity (main) Resume **
Resposta do Servidor: [{"NickName":"doidloko","StatConta":"2"}]
** Activity (main) Pause, UserClosed = false **
** Activity (perfil) Create, isFirst = false **
Downsampling image due to lack of memory.
Downsampling image due to lack of memory.
Downsampling image due to lack of memory: 2
Downsampling image due to lack of memory.
Downsampling image due to lack of memory: 2
Downsampling image due to lack of memory.
Downsampling image due to lack of memory: 2
Downsampling image due to lack of memory: 4
Downsampling image due to lack of memory.
Downsampling image due to lack of memory: 2
Downsampling image due to lack of memory: 4
Downsampling image due to lack of memory.
Downsampling image due to lack of memory: 2
 

Attachments

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

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
Top