×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    May 2013
    Posts
    153

    how to remove out of memory error during fetch data from RMS

    hello,I am working on S40 using sdk2.0 and S40_with_theme. i am using xml parsing and save it in RMS recordstore.But when i open record store and get data from rms and save this data in vectror then exception is occur which is given below..
    java.lang.OutOfMemoryError
    at StoryParsing.readrecord(+328)
    at StoryMainUI$9.actionPerformed(+151)
    at com.sun.lwuit.util.EventDispatcher.fireActionSync(+24)
    at com.sun.lwuit.util.EventDispatcher.fireActionEvent(+92)
    at com.sun.lwuit.Button.fireActionEvent(+82)
    at com.sun.lwuit.Button.released(+11)
    at com.sun.lwuit.Button.pointerReleased(+14)
    at com.sun.lwuit.Form.pointerReleased(+191)
    at com.sun.lwuit.Dialog.pointerReleased(+6)
    at com.sun.lwuit.Component.pointerReleased(+10)
    at com.sun.lwuit.Display.handleEvent(+151)
    at com.sun.lwuit.Display.edtLoopImpl(+166)
    at com.sun.lwuit.Display.invokeAndBlock(+84)
    at com.sun.lwuit.Display.invokeAndBlock(+6)
    at com.sun.lwuit.Form.showModal(+443)
    at com.sun.lwuit.Dialog.showModal(+86)
    at com.sun.lwuit.Dialog.show(+89)
    at com.sun.lwuit.Dialog.show(+12)
    at StoryMainUI.datepicker(+286)
    at StoryMainUI$3.actionPerformed(+7)
    at com.sun.lwuit.util.EventDispatcher.fireActionSync(+24)
    at com.sun.lwuit.util.EventDispatcher.fireActionEvent(+92)
    at com.sun.lwuit.Button.fireActionEvent(+82)
    at com.sun.lwuit.Button.released(+11)
    at com.sun.lwuit.Button.pointerReleased(+14)
    at com.sun.lwuit.Form.pointerReleased(+191)
    at com.sun.lwuit.Component.pointerReleased(+10)
    at com.sun.lwuit.Display.handleEvent(+151)
    at com.sun.lwuit.Display.edtLoopImpl(+166)
    at com.sun.lwuit.Display.mainEDTLoop(+204)
    at com.sun.lwuit.RunnableWrapper.run(+245)
    this is a big issue and i dont know nothing about me so please help me
    thnaks

  2. #2
    Registered User
    Join Date
    May 2009
    Location
    Guatemala
    Posts
    186

    Re: how to remove out of memory error during fetch data from RMS

    Series 40 devices have very limited memory. That error happens when you are loading too much data into memory, more than what is available. Without more details, it is hard to add something else.
    -CarlosDL

  3. #3
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: how to remove out of memory error during fetch data from RMS

    You get data from rms and save this data in vector then exception occurs
    You need to fetch only the data that is required to be displayed, why you want to put the entire RMS data in Vector - it is eating up all available heap memory.
    If you are doing it to speed up the search of required data... just make a hashtable of your RMS index's and key value that you wish to allow search on.....
    If you are displaying all RMS records on screen in a list... you just fetch the records which can be displayed on the screen at a time... do load others in run-time (lazy loading) and catch limited no's of records at a time to save heap memory.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

  4. #4
    Registered User
    Join Date
    May 2013
    Posts
    153

    Re: how to remove out of memory error during fetch data from RMS

    please suggest me that , i used the swipe gesture in my aap .i store the data in vector because i display the vector's element at next and previous gesture and change the index of vector.so please tell me on each next and previous gesture can i open records store ,fetch data and close recordstore ,it will be right procedure to display data from rms recordstore.

  5. #5
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: how to remove out of memory error during fetch data from RMS

    Quote Originally Posted by vikranttanwar@ View Post
    please suggest me that , i used the swipe gesture in my aap .i store the data in vector because i display the vector's element at next and previous gesture and change the index of vector.so please tell me on each next and previous gesture can i open records store ,fetch data and close recordstore ,it will be right procedure to display data from rms recordstore.
    You need to keep/catch the current displayable - "window of list items" - say to can display 10 items at a time on the screen - on swipe - you like to go 2 or 3 screen up and down i.e. in all you need 70 items in catch... recalculate the required windows of list team and keep the updating the vector in background thread.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. Data getting squeezed or Out of memory error.
    By sudhasri.madasu@gmail.com in forum Nokia Asha Web Apps
    Replies: 1
    Last Post: 2013-06-11, 16:58
  2. Fetch data from server using exe.
    By priya_ps in forum Symbian Networking & Messaging (Closed)
    Replies: 7
    Last Post: 2012-06-12, 07:02
  3. Error: Memory full plz remove some apll".
    By kush_192 in forum Symbian
    Replies: 12
    Last Post: 2009-03-31, 04:02
  4. My function to fetch Contacts leaks memory, please help...
    By anttti in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-07-03, 17:28
  5. Fetch data from PC through BT connection
    By babobill in forum Symbian
    Replies: 1
    Last Post: 2005-01-25, 21:12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •