11-16-2011 01:23 PM
I know Nitobi was working on fixing up some memory issues with their extensions. Not sure if they have made them in yet or not. Also, are you using the v2.2 WebWorks SDK with phonegap?
11-16-2011 05:21 PM
Tim - We get the message about low memory and closing apps.
If it is an app cleanup issue or Google maps problem, wouldn't that also become a problem on Android?
Not sure if the BB memory monitor is reliable, but it shows the memory usage getting large for the app (e.g., 10MB), but then the garbage collecter runs (spinner animation) and it goes back down to 1MB. However, the system memory usage keeps climbing--it comes down some but not as much as the app, and the difference accumulates. Seems like that iimplies the app is releasing the memory and garbage collection is cleaning it up from what the app can see--but the OS is keeping something.
We use Sencha's remove whenever leaving pages or panels, which they claim cleans up all the children. Will look more closely at all of that when time allows.
11-16-2011 11:41 PM - edited 11-16-2011 11:43 PM
We are using phonegap 1.2 - thats the latest version available.
We are using the pre release. Will upgrade to 2.2 and post the results. Our app does some base64 encoding of images that takes up a lot of processing power. Earlier the app was doing base64 encoding of multiple images before sending them to a server. So we serialized the operation of base64 encoding and sending it to the server - encode one and send one. Pretty much causes a huge lag because of send times but I think we got to live with it. The images are 1600 x 1200.
We also store some data as text files in the device. We are planning to push that in to a sqllite database - not sure if the file reads cause a memory issue but sometimes along with the memory warning we also get "Page is too large to load" - The text files are just multiple kbs and not that large. Would the move to storing that in the db get us better performance? Any suggestions...The memory leaks are one issue but the icon being replaced as a result is a bummer....
11-17-2011 09:20 AM
We had identified the memory climbing issue a long time ago (see this September 15th post by bbooks:http://supportforums.blackberry.com/t5/Web-and-Web
I have tested and tested on the Samsung Galaxy II) and iPhone 4 and I can't seem to reproduce this memory usage increase on those phones (the memory stays relatively stable over time). I still strongly believe that this issue is related to a bug in Blackberry's memory management. However, I can't be 100% sure of this, because I've had to change my code a bit to work properly on the different phones.
I've tried re-writing my code following suggestions by others in this thread and online to reduce the memory usage, but the memory still climbs until it eventually reaches the low memory error.
11-18-2011 03:01 AM - edited 11-18-2011 03:07 AM
We re-compiled the app with webworks 2.2 and tried running it on the 9300 with os 6.0. Once the app is installed I just need to start and kill it about 10 times and we get the memory error - the icon is replaced by the generic folder icon. The app loads jquery mobile and phonegap. Whats worse ever since we recompiled is that after the crash the phone gives an error message
Uncaught exception: Application net_rim_bb_browser_olympia_proxy(319) is not responding; process terminated"
Phone OS 6.0 Bundle 2342 (v 188.8.131.526)
11-18-2011 06:58 AM
Ok... I'm having a hard time following each individual user, their issue and what they are using
Let's start off by agreeing to some terminology. There are two distinct different scenarios and I want to ensure that we aren't chasing white rabits because of the terminology that we use. That's just going to confuse everyone involved and make it longer to get to a resolution to each of your issues.
So let's recap and make sure we are all on the same page...
The two scenarios are:
"Low Memory Warning" Symptoms:
- A dialog pops up saying you are low on memory and you should close some other applications.
- The application closes unexpectedly
"Memory Leak" Symptoms:
- The device continues to build up memory in the application until you receive an "Out of Memory" Exception
- You need to do a battery pull to fix the issue
- This was what was patched in WebWorks v2.2 with the watch dog service
Now let's see if we can get some clarification so that our teams can look into your issues.
11-18-2011 11:15 PM - edited 11-19-2011 01:00 PM
<feature id="blackberry.find" required="true" version="184.108.40.206" />
11-20-2011 12:47 PM - edited 11-20-2011 12:48 PM
An easy way to reproduce the memory error - compile the phonegap sample application - Phonegap v 1.2 webworks 2.2. Start and stop it for about 10 - 15 times (at least on the 9300).
11-21-2011 06:02 PM
Thanks for the ongoing attention. We still get the memory issues, so will be great if it gets resolved.
11-22-2011 09:35 AM
That is correct. The app works on iPhone and Android... I have tested many times and we have had hundreds of downloads over the past couple months without any reported problems.
Yes I have, and I do not get the same issue in the Browser. I believe that the problem is isolated to WebWorks. I understand that WebWorks has less memory allocated to it, but the problem seems to be more than just "running out of memory". The problem is that the memory builds up over time until it reaches this limit and returns the low memory error (and eventually closes the app on its own).
Torch 9800 v220.127.116.110, Platform 18.104.22.168