OpenJDK and Swing issues #227

Open
rzhw opened this Issue Oct 31, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@rzhw

rzhw commented Oct 31, 2015

Quick dump of issues from IRC. Repro'd on Ubuntu 15.10 with LGM 1.8.6.844.

With openjdk-8-jre:

  • Set theme to Swing and select different items in the project tree or the Object frame events tree, the renderer will be screwed up. This does not occur with tree's that do not use a custom renderer. The same issues are visible in the tree of the default open dialog under this theme.
  • Set theme to Swing and go to Help -> About, LGM will hang
  • Set theme to Native and these will cause hangs (there may be others):
    • Open and Save dialog with JFileChooser will cause hang when navigating to a directory
    • Object editor will cause hang when adding an action

With openjdk-7-jre/openjdk-8-jre:

  • Open progress dialog will stay on screen after open is done
  • Save progress dialog will stay on screen after save if not already on screen, and will close after save if already on screen

To mitigate, install Oracle JRE.

@rzhw rzhw changed the title from OpenJDK 7/8 issues to OpenJDK 7/8 issues on Ubuntu Oct 31, 2015

@RobertBColton

This comment has been minimized.

Show comment
Hide comment
@RobertBColton

RobertBColton Nov 1, 2015

Collaborator

I confirmed most of these issues with both OpenJDk 7/8 in my VirtualBox install of Ubuntu 15.1
Installing the proprietary Oracle JDK makes all of these issues go away. I am not really sure what all can be done since the about box for example is a simple JOptionPane call where we aren't doing anything at all special. The OpenJDK seems to be virtually unusable with Swing applications.

What I don't get is that OpenJDK is just supposed to be mainly OracleJDk but open sourced. So I do not understand why Swing apps are running so poorly in it. This random article on the internet seems to confirm this however.
http://www.javacodegeeks.com/2011/09/openjdk-as-default-java-on-linux.html

Edit: I've traced the issue down regarding the about box.

((HTMLEditorKit) ep.getEditorKit()).setLinkCursor(null);

A basic Google search yields that LGM is the only program that calls that method that way:
https://www.google.com/?gws_rd=ssl#q=%22setlinkcursor%28null%29%22
That said it seems to have no effect, even with it uncommented the cursor is still changed hovering over links in both Windows and Linux. I do not believe there is any reason for the call to be made and it is clearly crashing the OpenJDK About dialog. Without it everything works fine. While URL's work fine without a hyperlink listener, email links do not open Thunderbird so we do need to keep the hyperlink listener. However this tiny little line that's causing the crash is being removed. If we find that the call must still be made it should pass getDefaultCursor() instead of null which does not cause any issues with OpenJDK 8.

The open and save JFileChooser dialogs as well as the action list bug all seem to be specific to OpenJDK8. The popup showing load progress issue however appears in both JDK's.

Collaborator

RobertBColton commented Nov 1, 2015

I confirmed most of these issues with both OpenJDk 7/8 in my VirtualBox install of Ubuntu 15.1
Installing the proprietary Oracle JDK makes all of these issues go away. I am not really sure what all can be done since the about box for example is a simple JOptionPane call where we aren't doing anything at all special. The OpenJDK seems to be virtually unusable with Swing applications.

What I don't get is that OpenJDK is just supposed to be mainly OracleJDk but open sourced. So I do not understand why Swing apps are running so poorly in it. This random article on the internet seems to confirm this however.
http://www.javacodegeeks.com/2011/09/openjdk-as-default-java-on-linux.html

Edit: I've traced the issue down regarding the about box.

((HTMLEditorKit) ep.getEditorKit()).setLinkCursor(null);

A basic Google search yields that LGM is the only program that calls that method that way:
https://www.google.com/?gws_rd=ssl#q=%22setlinkcursor%28null%29%22
That said it seems to have no effect, even with it uncommented the cursor is still changed hovering over links in both Windows and Linux. I do not believe there is any reason for the call to be made and it is clearly crashing the OpenJDK About dialog. Without it everything works fine. While URL's work fine without a hyperlink listener, email links do not open Thunderbird so we do need to keep the hyperlink listener. However this tiny little line that's causing the crash is being removed. If we find that the call must still be made it should pass getDefaultCursor() instead of null which does not cause any issues with OpenJDK 8.

The open and save JFileChooser dialogs as well as the action list bug all seem to be specific to OpenJDK8. The popup showing load progress issue however appears in both JDK's.

@faissaloo

This comment has been minimized.

Show comment
Hide comment
@faissaloo

faissaloo Jun 16, 2016

Do the save or load dialogs ever get stuck for you?

No, I'm not getting any of the mentioned issues

Do the save or load dialogs ever get stuck for you?

No, I'm not getting any of the mentioned issues

@RobertBColton

This comment has been minimized.

Show comment
Hide comment
@RobertBColton

RobertBColton Jun 16, 2016

Collaborator

@faissaloo What was the operating system, specific distro, and java -version again?

Collaborator

RobertBColton commented Jun 16, 2016

@faissaloo What was the operating system, specific distro, and java -version again?

@faissaloo

This comment has been minimized.

Show comment
Hide comment
@faissaloo

faissaloo Jun 16, 2016

@RobertBColton

java version "1.7.0_101"
OpenJDK Runtime Environment (IcedTea 2.6.6) (7u101-2.6.6-0ubuntu0.14.04.1)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

GNU/Linux Xubuntu 14.04.4 LTS

@RobertBColton

java version "1.7.0_101"
OpenJDK Runtime Environment (IcedTea 2.6.6) (7u101-2.6.6-0ubuntu0.14.04.1)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

GNU/Linux Xubuntu 14.04.4 LTS

@RobertBColton

This comment has been minimized.

Show comment
Hide comment
@RobertBColton

RobertBColton Jun 16, 2016

Collaborator

Thanks! There's not much I can say but just to have this around so people see there are problems with some JDK's.

Collaborator

RobertBColton commented Jun 16, 2016

Thanks! There's not much I can say but just to have this around so people see there are problems with some JDK's.

@RobertBColton RobertBColton changed the title from OpenJDK 7/8 issues on Ubuntu to OpenJDK 7/8 issues Oct 1, 2016

@RobertBColton RobertBColton changed the title from OpenJDK 7/8 issues to OpenJDK and Swing issues Oct 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment