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
Contributor
Sefi
Posts: 34
Registered: ‎10-27-2010
My Device: Not Specified

java.lang.OutOfMemoryError in WebWorks Application

Every once in a while I get a java.lang.OutOfMemoryError error when downloading a lot of text content to my app.   I'm not sure exactly what causes it, but wondering if there are any good practices to handle/prevent this from happening.  My current plan is to try/catch in certain areas of the application and exit since an app restart works.

 

Thanks

-Sefi

Please use plain text.
Regular Contributor
ingybing
Posts: 65
Registered: ‎01-21-2011
My Device: Not Specified

Re: java.lang.OutOfMemoryError in WebWorks Application

which OS version are you running on... 5 or 6... how much text roughly are you downloading via what method... was just gonna see if can get it happening too.. 

Please use plain text.
Contributor
Sefi
Posts: 34
Registered: ‎10-27-2010
My Device: Not Specified

Re: java.lang.OutOfMemoryError in WebWorks Application

Issue is on version 5 (8530 sim).  I'm downloading about 5.5MB of text broken up into 400KB junks at a time.  Each chunks is delimited into a number of "pages" of content, totaling over 600 (includes text and base64 images).  Then I create an key/value object that takes in all the pages and makes that data available offline in memory.

Please use plain text.