Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Device memory is Low issue for an WebWork app

Also note that this is PRE-RELEASE software with no guarantees or waranties and has had limited testing.  Shipping products on this build is done at your own discression 

 

The full RTM version will be released at DevCon

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Contributor
bbooks
Posts: 16
Registered: ‎09-15-2011
My Device: curve
My Carrier: candw

Re: Device memory is Low issue for an WebWork app

Ok. I have been trying out the pre-release and it is definitely a step in the right direction. I am only seeing memory leak when the app makes changes to the dom. But this memory seems to be released when the app is closed. My app works most of the time and the low memory warning happens much less frequently (but still occurring :Censored:). However when I get the low memory error  the app is not using much memory. So I am a bit puzzled as to why it is still crashing with this low memory error.

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Device memory is Low issue for an WebWork app

[ Edited ]

It will likely all depend on what your app is doing and what device you are running it on.  On a low memory device like the Style there isn't much head room.

 

Is your application image intensive?  Are the images staying in scope?  It could be that what you are doing in your application is taking up all the available memory on the device.

 

WebKit is only allocated a certain amount of physical memory, so when you reach your limit you will receive the low memory warning.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Contributor
bbooks
Posts: 16
Registered: ‎09-15-2011
My Device: curve
My Carrier: candw

Re: Device memory is Low issue for an WebWork app

My app pulls html stored in a sqlite DB and puts it in a div to display, the html includes 4-5 images about 8-10 kb each which are loaded over the network (not stored in the DB). When I run the application I can see the memory use go up and then garbage collection kicks in and some of the memory is recovered, but the base line memory use gets progressively higher and higher (i.e. after updating the dive 10-20 times the memory use goes from 500kb at start to 1.1mb). When I close the app the memory is released, so when I start the app again it starts at 500kb again. However sometimes when I close and open the application a number of times i.e.. to simulate what a user would do the app sometimes gives the memory low error. It sometimes occurs even before any changes are made to the dom?? Some times I can run the app and the memory used will grow to over 8mb and the application keeps working. But other times when the application is using a lot less memory i.e. 1mb I get the memory low error and I have to close it?? I am running it on a torch 9800 with os 6.0 bundle 2342. The error is worst on the realer bundle where the app crashes with no option to close app or error message and I have to do a battery pull to close the app. I use the application management tool in the options to monitor the memory used by the application. So I am really lost as to what to do now. The error seems to be intermittent where it works when a lot of memory is in use and then gives the memory error when a lot less memory is in use?? 

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Device memory is Low issue for an WebWork app

We have never seen anything like what you are describing that hasn't been fixed by the memory fixes available in the v2.2 pre-release.

 

The only way we would be able to examine what is going in your application would be for you to send us the source code for the application so that our engineers and testers could disect it to see what the root of the issue is.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Contributor
bbooks
Posts: 16
Registered: ‎09-15-2011
My Device: curve
My Carrier: candw

Re: Device memory is Low issue for an WebWork app

I am soooo dumb sometimes. My app was using the spinner ext, and this is what was causing the memory to leak. I changed out the spinner for a select list and my app works alot better. While running I can observe the memory usage increasing and then the GC kicks in and the memory is released. My app can still cause the low memory error, I think it is caused if the dom is changed too frequently and GC does not kick in, soon enough to free up the memory. This I hope can be addressed with some optimization of my code.

Sorry for wasting your time.

Would you still like to see my source code? How to get it to you? Let me know.

Have you any hints as to how to fix the spinner control to implement  weak reference etc.

Please use plain text.
New Developer
kiranmobile
Posts: 44
Registered: ‎08-28-2009
My Device: Not Specified

Re: Device memory is Low issue for an WebWork app

Hi Neil, I am still seeing Device out of memory error on Torch 9800. My app is using google maps v3 javascript api's. Is there something specific I need to change.

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Device memory is Low issue for an WebWork app

Can you pleas confirm which version of the WebWorks SDK you are using, and which OS version number you are using 6.0.0.X

 

If your application is using a ton of images (which typically google maps uses) and those images are not going out of scope in JavaScript and are not being released, like any application, you will eventually run out of memory on the device.

 

Can you please provide the symptoms, how you are moving around in the application, when the out of memory error occurs... We'll need more details.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Device memory is Low issue for an WebWork app


bbooks wrote:

I am soooo dumb sometimes. My app was using the spinner ext, and this is what was causing the memory to leak. I changed out the spinner for a select list and my app works alot better. While running I can observe the memory usage increasing and then the GC kicks in and the memory is released. My app can still cause the low memory error, I think it is caused if the dom is changed too frequently and GC does not kick in, soon enough to free up the memory. This I hope can be addressed with some optimization of my code.

Sorry for wasting your time.

Would you still like to see my source code? How to get it to you? Let me know.

Have you any hints as to how to fix the spinner control to implement  weak reference etc.


I haven't had a chance to get back and look at updating the spinner for weak references... I've been 200% occupied with preparing for DevCon :smileyhappy:

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
New Developer
New Developer
GH
Posts: 16
Registered: ‎06-11-2009
My Device: Not Specified

Re: Device memory is Low issue for an WebWork app

DEAR ALL: PLEASE NOTE THAT THERE IS A PRE-RELEASE SDK WHICH RESOLVE MORE MEMORY LEAK ISSUE

 

YOU MAY TRY TO USE THIS SDK AND IT MIGHT HELP MORE WITH THIS PROBLEM

 

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/PRE-RELEASE-Memory-Leak-Fix-Down...

Please use plain text.