×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    21

    Lightbulb create image failure

    Device: nokia 6600
    Problem: device freeze totally when drawing sprites(even i can neither close the app by pressing the red key, nor close the mobile device by pressing power key. The only way I can approach is to remove the battery and reboot. )
    BTW:
    1 the whole block of RUN() is well-wrapped by tr-catch pair and NO EXCEPTION CAPTURED
    2 after some debugging and analysis, I guess the CreateImage part may failed.
    3 for streaming issue on this device, I put the stream into my array byte by byte.....
    4 this only occurs on nokia 6600, and the midlet performs well on S60_2nd_FP3 emulator and other s60 devices(N72, N80)

    Need help.....

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: create image failure

    Hello deltaleeg21,

    with Nokia 6600, do you refer to

    -this one?: Nokia 6600
    -this one?: Nokia 6600 fold
    -or possibly this one?: Nokia 6600 slide

    Regards,
    r2j7
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

  3. #3
    Registered User
    Join Date
    Jan 2010
    Posts
    21

    Re: create image failure

    just Nokia 6600~

  4. #4
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: create image failure

    I would like to say that you should try to find the exact reason for this issue.What you can do is just check that whether this is happening due to the image portion or due to the streaming one as you had described.

    In order to find this just tell us that what exactly you are doing with the image that you are using as the sprite?
    When the device freeze was createImage() or the Sprite creation was failed?
    What operation you were doing at the time using the sprite or the image?
    Was this issue faced on the emulator too?

    What goes wrong with the streaming?
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  5. #5
    Registered User
    Join Date
    Jan 2010
    Posts
    21

    Re: create image failure

    this issue neither happend on emulator nor on other s60 devices which I tested(N72 N80)
    more exactly, the createImage was passed with no exception, and the data of sprite I created is correct(I print out the values of fields of this object on device)
    but when i wanna use the image to draw something( drawImage, or draw some modules of this image ), it will lead to freeze
    further more here is a part of my debugging infors, and the commented statements were lead to freeze, and others runs properly

    _sprLogo is the sprite and m_modules_image[0] stores the image;
    ---------------------------------------------------------------------------------------------------------------------------------------------------------------
    fillScreen(g,0xff0000);
    g.setColor(0xff00);
    g.drawString(Integer.toString(_counter), 10, 10, 0);
    g.drawString(_sprLogo.m_modules_image[0].toString(), 10, 20, 0);
    g.drawString(Integer.toString(_sprLogo.m_modules_image[0].getWidth()), 10, 30, 0);

    g.drawString(Integer.toString(_sprLogo.m_nModules), 10, 40, 0);
    g.drawString(Integer.toString(_sprLogo.m_palettes), 10, 50, 0);
    int width = _sprLogo.m_modules_image[0].getWidth();
    int height = _sprLogo.m_modules_image[0].getHeight();
    int data[] = new int[height*width];
    // _sprLogo.m_modules_image[0].getRGB(data, 0, width, 0, 0, width, height);
    // g.drawRGB(data, 0, width, 0, 60, width, height, true);
    // g.drawString(Integer.toHexString(data[0]), 5, 40, 0);
    // for(int i = 0; i < 16; i ++)
    // for(int j = 0; j < 2; j ++)
    // {
    // g.drawString(Integer.toHexString(data[i*2 + j]), 70 * j + 5, 40 + i * 10, 0);
    // }
    // g.drawImage(_sprLogo.m_modules_image[0], 0, 0, 0);
    // _sprLogo.PaintModule(2, DEF.SCR_W >> 1, DEF.SCR_H >> 1, 0);
    // _sprLogo.PaintFrame(0, DEF.SCR_W >> 1, DEF.SCR_H >> 1, 0);
    Last edited by deltaleeg21; 2010-06-09 at 07:04.

  6. #6
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: create image failure

    Hello deltaleeg21,

    accordingly your confirmation this appears to be related specifically to S60 platform's Nokia 6600 which is known to have experienced some slowness issues:

    http://discussion.forum.nokia.com/fo...6600-very-slow....

    http://www.j2meforums.com/forum/inde...prev_next=next

    Regards,
    r2j7
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

  7. #7
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: create image failure

    Quote Originally Posted by deltaleeg21 View Post
    this issue neither happend on emulator nor on other s60 devices which I tested(N72 N80)
    more exactly, the createImage was passed with no exception, and the data of sprite I created is correct(I print out the values of fields of this object on device)
    but when i wanna use the image to draw something( drawImage, or draw some modules of this image ), it will lead to freeze
    further more here is a part of my debugging infors, and the commented statements were lead to freeze, and others runs properly

    _sprLogo is the sprite and m_modules_image[0] stores the image;
    Thanks for making the things clear.
    Well I would like to ask again that is this code inside the paint(Graphics g)?
    If yes then one more thing is of interest to know that is the call to the paint is inside the thread's run() or on the keypressed()?

    IN any case as r2j7 desribed that there are some issues related to the Nokia 6600, and something you are not doing proper in the code.

    1.As you can look at the code which is quoted below
    int width = _sprLogo.m_modules_image[0].getWidth();
    int height = _sprLogo.m_modules_image[0].getHeight();
    int data[] = new int[height*width];
    and you will come to know that how many objects will be created inside the code.

    2. Inside this below quoted code you are trying to get the RGB values and then you are trying to draw the same, and again this is inside the code which will be called in the loop and hence it will freeze the code execution.

    // _sprLogo.m_modules_image[0].getRGB(data, 0, width, 0, 0, width, height);
    // g.drawRGB(data, 0, width, 0, 60, width, height, true);
    // g.drawString(Integer.toHexString(data[0]), 5, 40, 0);
    // for(int i = 0; i < 16; i ++)
    // for(int j = 0; j < 2; j ++)
    // {
    // g.drawString(Integer.toHexString(data[i*2 + j]), 70 * j + 5, 40 + i * 10, 0);
    // }
    I would recommend you that put this kind if code inside the code segment that will be called either once or whenever is required.Test after making these changes and I am sure that these lines will help you.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. Image delete failure in LG
    By vineetbillorey in forum Mobile Java General
    Replies: 11
    Last Post: 2009-05-13, 14:19
  2. resizing image failure on LG KG195
    By vineetbillorey in forum Mobile Java General
    Replies: 7
    Last Post: 2009-04-14, 07:48
  3. Failure of MEM 02 (Failure of low memory during execution.
    By ajitc in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 1
    Last Post: 2007-05-31, 21:34
  4. Image download failure
    By disgustipated23 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2004-03-11, 08:40
  5. Image download failure
    By disgustipated23 in forum Mobile Java Networking & Messaging & Security
    Replies: 6
    Last Post: 2004-03-09, 21:35

Posting Permissions

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