Out of memory, app always crashing


#23

No, only one image at a time.and all the images i use are below 200 KB .


#24

But i noticed two images open properly but when i go for third the error occurs.


#25


#26

200 kb is also big. And it has more to do with pixelsize.


#27

Resize your images and then compress them:


#28

Here is a quote from @Italo

First, you need to understand that the file size of an image is not the amount of memory it uses when it’s being displayed. The file size is the compressed size, much like a zip or rar file. When viewed, the image needs to be decompressed.
For example, if your image says its file size is 100 kb, and its dimensions are 1024 x 768, 32 bit color, then that image uses over 3 mb of RAM (not 100 kb!) when you show it on the screen. ((1024 * 768 ) * 32) / 8 = 3,145,728 kb (3 mb)


#29

Is there any way to clear memory before loading next pic?


#30

I tried with smaller sizes less than 10 kb but the app still crashes with same error.


#31

Although your images are not visible they still count when loading your app. Its a memry problem so some of your assets are causing it or you are switching screens wrong.


#32

I solved it with all the images size being same. So I don’t think it has much to do with the sizes . I could find the exact problem . I just created the new screen and rewrote the blocks, and its working fine.


#33

Great that it is working. Maybe you can share the blocks so others can benefit from it.


#34

You can use a Website called tinypng.com which helps you Resize your Images and reduce the app Size Greatly.