×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Apr 2003
    Location
    Kiev, Ukraine
    Posts
    49

    A bug in Image class for S60

    Hello to all!

    There is a BIG bug in series60 Java.

    Just try to load some image in cycle.

    Code:
    boolean stop = false;
    Image im = null;
    int counter = 0;
    
    try
    {
       while(!stop)
       {
           im = Image.createImage("/someimage.png");
    
           counter++;    
       }
    }
    catch(IOExeption ex)
    {
    
    }
    IOException is always thrown.
    Value of counter depends on size of your image.
    Bigger image size - exception is thrown earlier.

    If image is about 2 KB, counter = 20,
    if image = 10KB, counter = 4.

    Nokia, I can send a test program to you

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    Looks more like a problem with the garbage collector not catching up with all the "garbage" (discarded images) your are leaving around there. You must be running out of memory pretty quick.

    shmoove

  3. #3
    Registered User
    Join Date
    Apr 2003
    Location
    Kiev, Ukraine
    Posts
    49
    Hello to you! Thanks for the reply.

    Yes, maybe this fact is correlated with OutOfMemory problem.
    But:

    1. Why IOException is thrown (why not OutOfMemoryError like it often happens on 7210 for example)?

    2. How to deal with this GC bug, if images are big enough that i cannot hold them all in memory simultaneously, i.e. i need to delete old image objects and create new ones?

    It is very pity that this problem happens on series60 phones, when they have pretty big memory, if comparing to series40.
    I think Nokia should do smth with s60 GC...

    Thanks for any help!

Posting Permissions

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