[J2ME] UI /freezes/ after IOException

Discussion in 'Java' started by JScoobyCed, Aug 26, 2004.

  1. JScoobyCed

    JScoobyCed Guest

    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.

    --
    JScoobyCed
    What about a JScooby snack Shaggy ? ... Shaggy ?!
     
    JScoobyCed, Aug 26, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Krissy

    System.IO.IOException

    Krissy, Jul 30, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    948
    Krissy
    Jul 31, 2003
  2. alessandro

    IOException after Socket.connect()

    alessandro, Aug 31, 2004, in forum: Java
    Replies:
    2
    Views:
    710
    alessandro
    Aug 31, 2004
  3. Alex Hunsley
    Replies:
    0
    Views:
    5,141
    Alex Hunsley
    Jun 28, 2006
  4. Forrest Sheng Bao
    Replies:
    4
    Views:
    4,476
    Michael
    Nov 9, 2009
  5. Owatch
    Replies:
    2
    Views:
    236
    Owatch
    Mar 9, 2013
Loading...

Share This Page