×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Super Contributor
    Join Date
    Mar 2003
    Posts
    2,426

    PJava runtime problem within Nokia 9210, Hrlp~!

    Dear Sir

    I had developed several PJava games for Nokia 9210 but they have the same problem when executing. Because these are games, I use many image resources in execution and I also try to catch OutofMemory execption. Unfortunely, I didn't catch anything. This problem always happeded after I play these games several times. I am thinking this problem mnaybe occured by the resource released problem. After calling System.exit(0) to quit PJava application, PJava should release all resources related of this application, isn't it? Is there any PJava applicaition developer met this kind of problem? Please help me to fis this bug, thanks a lot.

    And I feel this problem happed more often when I turnt on the mobile function. If I remove the battery first then the problem gone for a while. After trying PJava application, it happens again.

    Have a nice day

    Li

    Posted by Wu-Hsiung Li, captin@ms3.hinet.net
    on May 08, 2002 at 05:35

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    5

    RE: PJava runtime problem within Nokia 9210, Hrlp~!

    System.exit() causes the process to exit - so all resources used by the JVM will be released at that point - unless there is a bug in SymbianOS kernel or one of the servers. I don't think that is the problem.

    Images consume alot of memory in AWT. There is usually a block of memory the same size as the image used to decode it - this may or may not be released after the image has been downloaded - depending on the decoder.

    You might get some milage from copying images to offscreen images then flushing the original. It is also worth makeing sure that the ImageProducer is sending the correct flags through in imageComplete - you can do this by sticking a filter in between the producer and consumer and watching what goes by. If the producer doesn't indicate that there will be no more frames (something like STATICIMAGEDONE?), the decoding mechanism is likely to be hanging on to a block of memory.

    When you say you played the games several times - do you mean that you launched the JVM to run your game - then exited, then launched again, then exited again? Or do you mean launch once and then play several times before exiting?

    OutOfMemory exceptions will most likely be thrown on the image fetcher threads - you won't see these - but if you run the redirector it should capture any error message the image fetcher prints out.

Posting Permissions

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