01-04-2012 12:27 PM
I've isolated from my application a test case that proves the memory leak in WebWorks 2.2 when using focused based navigation.
I guess that RIM developers would be interested in taking a look into this. Please include jquery when building the example, and also an img (anyone will do).
I've tested this using a Bold 9780 running OS 220.127.116.116. The application runs a script that loads a set of images, removes them from the DOM, and back again. Less than a minute after starting, a memory low warning alert will appear, and the application is closed.
As a bonus, if you add an application icon, after the application is closed, your application icon will be replaced by the default icon.
Thanks for your interest.
<?xml version="1.0" encoding="UTF-8"?> <widget xmlns="http://www.w3.org/ns/widgets" version="18.104.22.1687" > <name>LP20</name> <author>Tests Inc.</author> <content src="landing.html"/> <rim:navigation mode="focus"/> </widget>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitiona
01-04-2012 02:49 PM
We're definately looking into it
01-11-2012 08:20 AM
Hi, I hope you were able to reproduce this, have you?
I'm pretty much interested in the second part of the problem: the application icon changes after the application crashes. Have you been able to reproduce this also?
01-11-2012 08:36 AM - edited 01-11-2012 08:42 AM
We were able to reproduce the issue sorry for not posting that earlier. There were some device models where it doesn't happen and some where it does but no matter what the impact was much improved using 2.3 (if not completely fixed).
As per the icon, I'll double check with the testing team and post back.
01-11-2012 09:55 AM
Can you share on which devices you were/weren't able to reproduce this?
I was told by devsupport that the issue is still present in 2.3.
Please let me know your findings about the icon changing problem.
01-12-2012 08:21 PM
I believe the majority of devices that did not reproduce were recent 7.0 devices.
As per the icon, did you mean if you added the icon through the API or had it in the config.xml. We tested with an icon in the config.xml and did not see it change in any way.
02-13-2012 10:26 AM
Anybody resolved our issue, if no maybe the only way is give feed back to our sponsor that there is no way to develop apps on bb 6.0 and we should waiting for new os releases ?
Is any way to escalate problems from this forum ?
02-13-2012 05:49 PM
Have you tried adding the images all through a document fragment and then inserting them in the live DOM vs loading them individually?
In your existing code, each append of the <div> will trigger a layout computation and then a re-indexing of the focus based navigation tree which all also use memory.
Have you tried disabling focus based navigation? Does it make any difference?
02-13-2012 05:55 PM
Hi tneil, thanks for the interest.
This issue only happens with focus based navigation. If you disable, the sample application runs like 3 hours without problem (instead of less than one minute).
I don't have time now to try any other of your suggestions. In fact, I removed focus based navigation and really don't plan to re-enable it.
The guy from dev support tried the following, neither of them helped:
A few changes I tried:
1) Using the HTML5 <!DOCTYPE html> declaration.
2) Newer JQuery version (1.7.1)
3) Instead of removing and appending children, leveraging the html('') method to clear the HTML of the container.
4) When adding multiple <image> elements, storing all items in a String, then making only one call to html(stringOfAllElements).
5) Leveraging recursive calls to setTimeout() instead of the initial call to setInterval().