Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Java 1.6 swing events freeze during debug

  1. #1
    Join Date
    Feb 2009
    Beans
    3
    Distro
    Ubuntu 8.04 Hardy Heron

    Java 1.6 swing events freeze during debug

    I was just wondering if anyone is having issues debugging java swing applications. With java 1.5 I had no problems, now that we are in 1.6_11, when I debug a swing application the X display completely freezes and I have to kill the debugging app (intellij or eclipse). I did hear something about 1.6_12 that fixed a combo box issue but 1.6_12 has issues as well. Has anyone else had issues with the X display freezing?


    NOTE: these are the sun jvms.

  2. #2
    Join Date
    Oct 2008
    Location
    White House
    Beans
    361

    Re: Java 1.6 swing events freeze during debug

    The X display? Or you just mean the window?
    Are you sure you tested your code enough with and without separate threads like the following?
    Code:
    final JFrame win = ...;
    SwingUtilities.invokeLater( new Runnable() {
    public void run() {
    win.setVisible(true);
    }
    });

  3. #3
    Join Date
    Feb 2009
    Beans
    3
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Java 1.6 swing events freeze during debug

    No, it does not have anything to do with a java window, its not an internal design/coding flaw. Its freezing the X display completely, can't click on another window (i.e. terminal, mail application, etc.). I take the jar I am using, launch it with java 1.5 and debug it, fine. I take the jar I am using, launch it with java 1.6 and debug it, to get access to any application on my desktop I have to kill the process I am debugging then my desktop can be used.

  4. #4
    Join Date
    Oct 2008
    Location
    White House
    Beans
    361

    Re: Java 1.6 swing events freeze during debug

    Since you're sure it must be Java's fault I can only suggest you report this issue as a bug to Sun Microsystems.
    Since Sun cares a lot more about its own IDE (NetBeans) try also testing your code on NetBeans 6.5

  5. #5
    Join Date
    Feb 2009
    Beans
    3
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Java 1.6 swing events freeze during debug

    I would agree, but it doesn't happen on other platforms, just ubuntu. Thought I would check here first in case anyone else has had this issue.

  6. #6
    Join Date
    Jul 2008
    Beans
    1

    Re: Java 1.6 swing events freeze during debug

    I have the same issue with java 6 (from update 7 to 12) and Ubuntu (Gnome, 64-bit, 8.04).

  7. #7
    Join Date
    Apr 2009
    Beans
    30

    Re: Java 1.6 swing events freeze during debug

    this just happened to me with 1.6.0_17 on Karmic setting break points in an JComboBox ItemListener. Everything locked up

    maybe related to this: http://bugs.sun.com/view_bug.do?bug_id=6384219

    also see

    http://wiki.netbeans.org/wiki/view/F...ingAWTXWindows


    i am using eclipse 3.5
    Last edited by mebigfatguy; December 22nd, 2009 at 10:34 PM.

  8. #8
    Join Date
    Apr 2010
    Beans
    2

    Re: Java 1.6 swing events freeze during debug

    Found a workaround: Add the following to your VM parameters:

    -Dsun.awt.disablegrab=true

    found here: http://bugs.sun.com/view_bug.do?bug_id=6714678

    Works for me.

  9. #9
    Join Date
    Jan 2011
    Beans
    5

    Exclamation Re: Java 1.6 swing events freeze during debug

    Quote Originally Posted by cawo View Post
    Found a workaround: Add the following to your VM parameters:

    -Dsun.awt.disablegrab=true

    found here: http://bugs.sun.com/view_bug.do?bug_id=6714678

    Works for me.
    Actually I tried debug the a simple Swing application with event handling for JComboBox with the above jvm paramteter. Still the same problem

    The desktop freezes just dead. the the following java version
    OpenJDK Runtime Environment (IcedTea6 1.9.2) (6b20-1.9.2-0ubuntu1~10.04.1)
    OpenJDK Client VM (build 19.0-b09, mixed mode, sharing)

    Hope there is a solution for this problem

  10. #10
    Join Date
    Mar 2011
    Beans
    1

    Re: Java 1.6 swing events freeze during debug

    The same behavior with:
    java version "1.6.0_24"
    Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
    Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
    Ubuntu 10.10

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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