×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    4

    ServiceRepaints throws Throwable on 6630

    On the Nokia 6630 my run loop dies after a while.
    After some investigating I found that serviceRepaints was throwing a Throwable.
    It takes about 30 seconds before serviceRepaints freak out and starts throwing Throwables. Once it has started, each call to serviceRepaints throws a new Throwable. And needless to say, no repaints are beeing performed.
    Unless I press a key. Then keyPressed calls repaint (not serviceRepaints) and somehow the screen is repainted.
    It's just like if serviceRepaints empties the queue and then throws a Throwable without repainting.

    The same code works on all other phones I've tried (about 10 different nokias and 10-20 other phones).
    Does anyone recognize the problem? Does anyone have a solution?

    Cheers,

    Petrus

  2. #2
    Nokia Developer Expert
    Join Date
    Jun 2005
    Posts
    923

    Re: ServiceRepaints throws Throwable on 6630

    Can you post the section of the code you're using for your animation loop?

    ServiceRepaints() is a heavy operation, if you're using that for a game, you could use the GameCanvas.flushGraphics() method instead.

    Daniel

  3. #3
    Registered User
    Join Date
    Apr 2006
    Posts
    4

    Re: ServiceRepaints throws Throwable on 6630

    Hi Daniel,

    It was a good suggestion to use flushGraphics instead. Unfortunately it worked just as bad.
    Now (after about 30 seconds) flushGraphics throws a Throwable instead. And every once in a while getGraphics throws a Throwable.
    So in the end I get almost exactly the same behavior as when using serviceRepaints.

    I also have some try-catch blocks in there. But besides that, this is pretty much what my code looks like;

    public void run() {
    do {
    //* a short delay
    //* update stuff for animation

    Graphics g = getGraphics();
    paint(g);
    flushGraphics();
    } while(!paused);
    }

    The old version with serviceRepaints (which I much rater use since I’ve tested it on many devices) lookes something like this;

    public void run() {
    do {
    //* a short delay
    //* update stuff for animation

    repaint();
    serviceRepaints();
    } while(!paused);
    }

    Thanks,

    Petrus

  4. #4
    Registered User
    Join Date
    Apr 2006
    Posts
    4

    Re: ServiceRepaints throws Throwable on 6630

    Problem 'solved'..
    I was accidentally using drawRegion with the TRANS_MIRROR transform.. for Series60 that's a big No-No!
    I've seen this problem before, but then it manifested itself as a memory leak. That's why I didn't catch this error sooner.

    Cheers,

    Petrus

Similar Threads

  1. Recording On 6630 Using DevSound
    By adithecapri in forum Symbian
    Replies: 1
    Last Post: 2006-04-27, 22:06
  2. 6630 wallpaper bug
    By dakku in forum Symbian
    Replies: 0
    Last Post: 2004-12-29, 20:45
  3. Cannot Sync through bluetooth or usb on 6630
    By Un6rand3d in forum Bluetooth Technology
    Replies: 0
    Last Post: 2004-12-10, 09:14
  4. Replies: 2
    Last Post: 2004-11-17, 10:20
  5. can not successfully link any sample using .NET
    By lobotomat in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2002-08-20, 00:29

Posting Permissions

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