[J2ME] UI /freezes/ after IOException

J

JScoobyCed

Hi,

I have a MiDlet that starts a Thread through a Runnable, in which
there is IO activity:
Runnable runner = new Runnable() { // some IO stuff there };
Thread thd = new Thread(runner);
thd.start();

The application runs well, until I need to close the IO channels that
are opened in that separate Thread.
Of course, I catch the IOException in my Thread, and the Thread
completes properly (and dies...).
But after this catch, the UI is not responding: if I press a button the
menu will not show, and if I do some programmaticaly changes in the UI
it does not display and the call blocks (i.e. if I add an item in the
current screen, nothing happens and the next line --System.out.println--
doesn't execute).
I know the application didn't die, cause I have another Thread running a
'while' loop and printing "I am alive!" even when the UI freezes.
And also if I don't perform UI changes I can print stuff in the main Thread.

Any idea to help me ? Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top