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 (Retired)
ababut
Posts: 46
Registered: ‎07-08-2010
My Device: Superberry
My Carrier: Rogers

Re: Device memory is Low issue for an WebWork app

Are list, number and gpsObject references to RIM APIs?
-------------------------------------------------------------------------------------------------
Useful resources, food for the brain:
Web(Works) KB - http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/tkb-p/browser_dev%40tkb
Please use plain text.
Regular Contributor
genvej
Posts: 58
Registered: ‎01-19-2011
My Device: 9800
My Carrier: vodafone

Re: Device memory is Low issue for an WebWork app

[ Edited ]

No... just methods using standard javascript libs in this scenario.

 

I am working on a fix right now for one of my apps with this approach. I cant say untill another 12 hours due to timewindow it takes me to get the memory error. The change is one line of code. I will post back and, if you want, send the source of my app with and without the bug.

Please use plain text.
BlackBerry Development Advisor (Retired)
ababut
Posts: 46
Registered: ‎07-08-2010
My Device: Superberry
My Carrier: Rogers

Re: Device memory is Low issue for an WebWork app

That would be great, thanks! I'm curious which APIs you're using that are causing the leak.
-------------------------------------------------------------------------------------------------
Useful resources, food for the brain:
Web(Works) KB - http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/tkb-p/browser_dev%40tkb
Please use plain text.
New Contributor
mttplm
Posts: 6
Registered: ‎07-07-2011
My Device: Torch
My Carrier: Software Analyst

Re: Device memory is Low issue for an WebWork app

[ Edited ]

Dear all,

 

let me know if I'm correct: at this time, RIM guys have fixed part of the problem. More in detail, it was found that using JavaScript extensions caused memory leaks. Nevertheless, leaks of memory still persist even in those applications that don't make use of RIM extension. So, it seems that the problem is related, more in general, to the web container that embeds the HTML5 resources. That is, allocating/deallocating that container again and again makes the device run out of memory, right?

 

So, are you (RIM) guys working on this aspect of the problem? Can you tell us, more or less, how long it will take to  have a first release? Are we talking of weeks or months?

 

many many thanks!

mat.

 

 

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

There was one leak that was resolved in v2.1.1 where if a JavaScript extension had a handle to an object that was part of the Framework (BrowserField, MainScreen, etc) that the JavaScript extension would not be freed and would continue to stay in memory causing a leak.

 

Github Issue for this situation here:

https://github.com/blackberry/WebWorks/issues/42

 

The issue around loading pages in and out of BrowserField is under development and we are targetting a release of the SDK near BlackBerry DevCon.

 

The latest findings of this issue can be found here:

https://github.com/blackberry/WebWorks/issues/47

 

 

As we change the underlying architecture of JavaScript extensions it will also help any memory issues surrounding JavaScript extensions.

 

Basically the IPC channel between Java and WebKit have some interesting side effects that we're discovering.  

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
New Contributor
s0ckz
Posts: 5
Registered: ‎09-07-2011
My Device: 9300 curve
My Carrier: Claro

Re: Device memory is Low issue for an WebWork app

Im not sure if its new information for you but I think theres a leak in the following situation:

- Demo application of the phonegap 1.0.0
- I modified the phonegap lib to use weak references for browserfield
- When I take a picture on the demo application (using uri), before this picture is set on the src of the img element, the memory use of the blackberry software is like 163.5mb (after the phonegap camera extension is called and the photo was taken). After the img src is set, the memory use is like 164.5mb.
As far as I can see this memory allocated is never released. If I take 10 pictures then 10mb will be increased...
If I use the "capture data" the situation gets worse because the src is set with the base64 version of the photo.
If I test the "capture image" button in the latest section of the demo, the memory increased is only 100kb at most.

I hope this information is useful
Please use plain text.
New Contributor
s0ckz
Posts: 5
Registered: ‎09-07-2011
My Device: 9300 curve
My Carrier: Claro

Re: Device memory is Low issue for an WebWork app

Ah, and the only situation I saw this memory released is when the "this page will be closed because its too large" (or something like that).
Im using a blackberry curve 9300 with 6.0 bundle 2391
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

Hello

 

Are there any updates on a fix?? My app is crashing with memory leak every 4-5 restarts. On the os 6.0.246 there is to option to kill the app when crashes so user has to do a battery pull to reset it. Any work around?? Help needed. Project will be canceled if I can't fix this. I even tried a simple app with a few images and no other interactivity and this also causes a memory low error!! Can rim provide an estimated time for fix so I can attempt to save project with extended deadline??

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 believe we have the issues resolved.  The fix is in the hands of a few partners trying out the changes to ensure that the fixes do in fact resolve their problems.

 

Currently the fix is scheduled to be released mid October... it may be sooner.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
New Contributor
s0ckz
Posts: 5
Registered: ‎09-07-2011
My Device: 9300 curve
My Carrier: Claro

Re: Device memory is Low issue for an WebWork app

Will it be necessary to update the OS or only the webworks sdk?

Please use plain text.