You Are Here:

Community: Developer Discussion Boards

#1 Old PJava runtime problem within Nokia 9210, Hrlp~! - 2002-05-27, 17:14

Join Date: Mar 2003
Posts: 2,428
Nokia_Archive
Offline
Super Contributor
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 Old RE: PJava runtime problem within Nokia 9210, Hrlp~! - 2002-05-28, 14:15

Join Date: Mar 2003
Posts: 5
axssnokia
Offline
Registered User
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.
  « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d5632X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZjavaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZuserE5ftagQSxjavaX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ