Again Out of memory with using LoadBitmapSample

coslad

Well-Known Member
Licensed User
Longtime User
Hi ,

I have a customlistview with only 15 items , each item have 3 label and 2 imageview , in some devices (not to all) when a load the CLV tha app crashs with OOM error.

To load the bitmap i use :
B4X:
immagine1.Bitmap=LoadBitmapSample(folder,appoggio,90,90)

Now it is incredible this error, when the device have more the 400Mb of free ram .
Please help me .
Thanks
 

coslad

Well-Known Member
Licensed User
Longtime User
The customlistview is not on the first activity but before to load the list i need to open 3 activity , and one of these have a sliding panel with many views .
The image i load is attached , his dimension doesn't care becouse LoadBitmapSample redim it .
The technical details of the device are :

- 5.3 inch QHD screen, 960*540 pixel display
- CPU: 1.2GHz MTK MT6589 quad-core, GPU: Power VR SGX544
- 1GB RAM + 4GB ROM

This problem doesn't came out if the app run on a old Galaxy S -

If i can trap the exception , i could not load the image on the device with low memory , otherwise i have to remove all the view before load that layout .

what do you think?
 

Attachments

  • immagine.jpg
    immagine.jpg
    27.8 KB · Views: 249
Upvote 0

coslad

Well-Known Member
Licensed User
Longtime User
The version is 2.71 see the attach , i have attached a video that show you what appen , please watch it .
the url of video is this :

http://db.tt/HirpST5W
 

Attachments

  • versione.jpg
    versione.jpg
    14.5 KB · Views: 258
Upvote 0
Top