×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    6

    Application hang after restart and the device hang also (List,form issue).

    Hi, I'm developing an application that use list for Main menu, sub menu...
    Form with textfield for Login screen, input screen. There are quite many screens.

    I use setCurrent to switch between screen. The problem never happen on emulator. But when I test on E71 or E75. The application hang after about 20 second (switch fast), switching between screen (main menu, submenu, quit application, restart application). If test normal, it will hang after 10 minutes.

    After it hang, I still can quit to device main menu, but when I start any other application or my application it hang right away, and I cant do anything except restart the Device. (seem like memory problem).
    It took me days to figure out the problem.
    + First I think it maybe too many listener, so I use only 1 static List screen, 1 static form, so that set Listener only happen once. But nothing change.
    + I call on device get memory, too see if memory run out, but memory is still fine after call gc.
    + This is my first time working with form, list, textfield so I dont know much about their problems.

    If someone know any clues about this issue. I really appreciate your idea and help. Thank so much.

  2. #2
    Registered User
    Join Date
    Nov 2009
    Posts
    3

    Re: Application hang after restart and the device hang also (List,form issue).

    Hi,
    first try on some s40 device.
    each device have some specific problems related to its jvm/kvm implementation.
    thanks
    Preetam

  3. #3
    Registered User
    Join Date
    Dec 2009
    Posts
    6

    Re: Application hang after restart and the device hang also (List,form issue).

    Hi,
    I somehow manage to fix the issue. It not hang anymore. But I'm not quite sure the real reason.
    First when I try to remove all the System.gc. The free memory decrease very fast. After starting the app, there are 500kb total mem and 120k free mem. Without System.gc, the free memory decrease very fast, after it decrease to 80k, and I quit the app, and go back, it hang right away.
    I try to add a lot more System.gc when I initialize the screens (System.gc is call everywhere). Remove some non-use static array. The free mem doesnt increase significant, but it doesnt hang any more. So I figure out that in my app, the memory is used too fast, that the JVM cant allocate right for it. So neend to call gc each time. But I know that calling gc too much is a trouble when porting to other phones.

  4. #4
    Registered User
    Join Date
    Sep 2011
    Posts
    29

    Re: Application hang after restart and the device hang also (List,form issue).

    Hi...

    I've the same issue, where my application includes menus with images & audio, select images, when i use it normally i.e without pressing the up or down arrow continuosly it works fine, but i want my application to be fine in all respect, i.e, the user shouldn face any issues.
    After it gets hang i cant use the quit/exit from appliction, instead should use the red key to exit fully.
    I test my application on E51..

    Does any one know the clue or why the hang occurs.

    Regards

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

    Re: Application hang after restart and the device hang also (List,form issue).

    Quote Originally Posted by Aarushi0311 View Post
    Hi...

    I've the same issue, where my application includes menus with images & audio, select images, when i use it normally i.e without pressing the up or down arrow continuosly it works fine, but i want my application to be fine in all respect, i.e, the user shouldn face any issues.
    After it gets hang i cant use the quit/exit from appliction, instead should use the red key to exit fully.
    I test my application on E51..

    Does any one know the clue or why the hang occurs.

    Regards
    This hang occurs in your app, generally due to access of memory allocations - check you app running it on emulator with memory monitor. Look for all memory leaks... set all images which are not in currently or for future use as null, load the assets in the memory only on need basis... and can try calling System.GC() to see if it helps in reducing the overall memory heap needs of your app.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

Posting Permissions

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