| Reply | « Previous Thread | Next Thread » |
|
Hi
I have absolutely no idea how to degug and catch this error.. the program frrezes at some time. my program is using one thread which perform different works like refreshing the game screen, updating different characters positions and other things.... Also using some sounds in the program.... also when program freezes i can access the Options menu but don't know does the buttons on that work. it seems to me that the thread stops executing. can some body tell me how to check the status of a threrad is it working or halt some point and then i quit that thread and start it executing again. like it refresh screen thread halts then i can quit that thread and start executing it again.. there is some point in thread that it halts and i can not catch it where it is causing the problem. can some body tell me how to debug and atleast know where it halts in the program. i am using Sun ONE Studio 4 ME + Nokia J2ME SDK + Series 60 SDK and testing the program in Series 60 emulator. here is how i am creating the thread frameTimer = new Timer(); frameTimer.schedule(new AnimationTask(), 1,31); and here is the impelementation class AnimationTask extends TimerTask { public AnimationTask() { } public void run() { screen.update(); screen.fightUpdate(); screen.repaint(); } } screen is a Canvas object. See it performs some functions and the program halts some where in those functions Pls pls tell me what to do with this not it is draging me a lot and the problem is i even don't know what is causing it. Shahzad |
|
Hi,
most likely an exception has been thrown in your run method. So you should catch the Exception, Error or throwable. Then simply let the thread coninue running but now it will only print the error message to your screen. so when you call repaint in your thread, the paint method knows the error message and will paint the e.getMessage() or so to your screen. siebe |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|