App running out of memory

Hello guys,

I have an app that has been on the Galaxy Store for a while now.

Most recently I have been receiving e-mails from users that the app is ‘crashing after a while’ - which I was unable to replicate initially, in addition to that other users were reporting that the app would ‘crash sometimes’.

After further investigation and collecting logs from some (super amazing and helpful) users I was able to see that the app was getting killed due to the watch’s memory (low) available.

I then started to recommend the following:

  • closing recent apps
  • disabling auto-detection of workouts
  • using a watch face without too many graphics/info
  • restarting the watch

But let’s all agree, that is far from ideal.

Lastly, I have found that other ‘sports tracker’ apps have been having very similar issues. The app has been developed using TizenOS “webapis” (html/js) if that is of any help.

What do you guys recommend?
How should I move forward here?

Thank you very much in advance.

I noticed memory leaks and crashes like that usually when I tried to use an external libraries not designed for hardware-limited devices like watches. Make sure you don’t load such libs and try to use other or write you own code if you need only a little snippet from the lib.

Try to limit size of your resources like images or sounds. Sometime is ok to use jpg images or even 8 bit png format and sound compressed to mp3.

Review your code again. Make sure you don’t create countless instances of objects in loop or recursive code.

2 Likes

Thanks @andrzej_bugajny

I had a look at the images and for the most part, I use FontAwesome icons (SVGs).
There are three PNG’s for the dots (footer) of each page though (600x168 PNGs).

The only 3rd part lib that I am using is ‘localStorageDB’ (knadh) .
Collect the data; upload it later for processing.

Will double-check the loops/method calls too.

Cheers!

Did you have any luck with this? I’m a tizen developer too and have this issue with some users. I’ve done extensive memory debugging and am pretty sure it’s not my app. I think it’s something to do with Bluetooth, and/or the watch wakeup gesture being turned on leaking memory…

Hi @gea1597103114

I ended up rewriting parts of my app.
That improved many things but did not solve everything.

Most of the time the app works, but as my app is a long-running app it gets killed sometimes.
I found that if I run too many apps and do not close them on recent apps my app gets killed after a while.

You can always request help from Samsung Developers too.
If it is a dev question / API / etc, they’ll help you out.

Cheers!