Ticket Created
over 3 years ago

CIQQA-1008

Venu 2 Plus Fails to Retrieve Large Image From Storage.

It appears that the Venu 2 Plus, or any device with a graphics pool for that matter, can't retrieve large images using Storage.getValue(). (I haven't tested non-graphic pool devices, as they can't download images that big). The image in question is 368165 bytes (368.17 kB).  

My app (Maps4Garmin) allows users to store their maps for offline usage later using Storage.setValue().  Every device, including the Venu 2 Plus can store its map image.  The problem is retrieving it.  While all the other watches can retrieve the image as expected, the Venu 2 Plus throws an out of memory error.  

I figured out part of the problem: the Venu 2 Plus can download bigger images, thus, the Storage is bigger.  For example, when testing with an image 256165 bytes (256.17 kB), Storage.getValue() works fine.  It's only when the image is large that I get this error.  

The problem occurs using SDK 4.0.10 (haven't tested others), in the sim and on the device (according to ERA).

So, is there a workaround for this bug? Has anyone else experienced this problem? 

I hope that this is an easy fix.  If I can provide any additional information, please let me know.  

Thanks!

Lance

  • Great, thank you so much for doing all this to figure the problem out!!

    The reason why it was failing on the Venu2Plus is a problem on my side.  I manually hardcode in the max image size for each watch to download.  I allowed the Venu2Plus to download a bigger image than the Venu2.  The Venu2's image size wasn't big enough to cause the out-of-memory error, while the Venu2Plus had the bigger image, causing it to give an out-of-memory error. 

    Thanks again!

  • If you could provide an image that reproduces the problem, I think I can look into why it only occurs with one device and not the other.

  • Nevermind. If I use a really large image (https://newevolutiondesigns.com/images/freebies/4k-wallpaper-13.jpg) I'm able to reproduce what appears to be the root problem on both devices. I can load the image with WatchUi.loadResource() and write it out using Storage.setValue() with no problem. If I free up the memory associated with the bitmap and then try to load it with Storage.getValue() an out-of-memory error is generated.

    I think your question about why venu2 and venu2plus I cannot explain. But the primary issue appears to be that the image is being loaded into app memory initially when loaded with Storage.getValue() whereas it is loaded directly into the graphics memory when it comes from WatchUi.loadResource() or an image request.

    BitmapStorage.zip

  • Sometimes it is difficult to create a testcase that reproduces the problem, and without that we are flying blind.

    Could you try to create a test app that reproduces the problem? It doesn't have to be complicated. Even if it just loads an image resource from Rez.Drawables and writes/reads it with Storage and then fails, that would be extremely helpful.