×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Rotterdam, Holland
    Posts
    118

    "Unable to run applcation" ?

    Hi there,

    I'm having a rather annoying issue with a game i'm developing. It runs on all devices i've tested it on except S40 devices. There, i get "Unable to run application" at roughly the same point every time. It's a rather graphically intensive application bordering on 64k, so i'm guessing it's a memory issue or something. Anyone have any experience with this problem (preferably experience with solving it).

    On that note, am i the only one that' really prefer an *accurate* emulator for the nokia devices? Testing on nokia emulators says nothing about actual device compliancy, slightly annoying.

    Remon van Vliet
    Lead Developer
    Ex Machina

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    99% of the time, the "Unable to run application" error is displayed because you run out of heap space. The solution is obviously to use less heap space. But another thing to consider is heap fragmentation. This is something that the emulators never seem to face, but it's a major problem with the phones themselves. You have to keep new object instantiation to an absolute minimum, especially with large objects like images. If you have a large image that you need to use during the lifetime of the application (a full screen background for instance), then loading it once at startup and never releasing it, instead of reloading it every time you need it helps. Any object you can reinitialize (mostly game data) instead of throw away and create a new one, do it. Etc, etc, etc.

    shmoove

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Rotterdam, Holland
    Posts
    118
    yeah i figured it was something like that...*sigh*...

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Rotterdam, Holland
    Posts
    118
    any idea what the heapsize is for an s40?

  5. #5
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    A "tad" over 200 Kb. That "tad" seems to vary from device to device.
    The MIDP 2.0 Series 40 devices (6230) have 512 Kb AFAIK.

    shmoove

    PS: I usually set the heapsize parameter to 180 Kb just to be on the safe side.
    Last edited by shmoove; 2004-07-13 at 16:10.

  6. #6
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Rotterdam, Holland
    Posts
    118
    in the emu you mean?

  7. #7
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Rotterdam, Holland
    Posts
    118
    odd, no matter what i set the heap value to in the WTK, it always allows me to get past the point where it crashes on the phone :/

  8. #8
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Rotterdam, Holland
    Posts
    118
    actually, it starts complaining when i set to 120kb, at 130kb it runs fine. This would suggest that either it uses vastly more heapspace on the S40 (unlikely) or that the problem lies elsewhere. Any idea what else could cause this "Unable to run application" message?

  9. #9
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    Fragmentation. Like I said, the emulator doesn't seem to emulate the fragmentation that goes on in the devices. The devices have a non-compacting garbage collector, so if you're creating and throwing out object at a high rate the heap ends up looking like swiss cheese and the moment you need to allocate a big enough chunk of memory - BOOM!

    shmoove

  10. #10
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Rotterdam, Holland
    Posts
    118
    hm, must be that...well, that'll be interesting to solve :/

  11. #11
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Rotterdam, Holland
    Posts
    118
    is there ANY other possible reason for this error being given?

  12. #12
    Registered User
    Join Date
    Mar 2004
    Posts
    13

    Nokia Heap Memory Fragmentation

    Hi,

    Did you ever find a good solution to this - I have exactly the same issue. I've hacked around it a lot of ways and get the same result.

    Appreciate any help you might offer.

    Regards,

Posting Permissions

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