X2Go Bug report logs - #1621
X11 error with Java 17

version graph

Package: x2goserver; Maintainer for x2goserver is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goserver is src:x2goserver.

Reported by: Avner Tenne <atenne@gmail.com>

Date: Sat, 13 Jan 2024 18:25:01 UTC

Severity: normal

Found in version 4.1.0.3-9

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1621; Package x2goserver. (Sat, 13 Jan 2024 18:25:02 GMT) (full text, mbox, link).


Acknowledgement sent to Avner Tenne <atenne@gmail.com>:
New Bug report received and forwarded. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Sat, 13 Jan 2024 18:25:02 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

From: Avner Tenne <atenne@gmail.com>
To: submit@bugs.x2go.org
Subject: X11 error with Java 17
Date: Sat, 13 Jan 2024 20:22:48 +0200
[Message part 1 (text/plain, inline)]
Package: x2goserver
Version: 4.1.0.3-9

I'm running x2go server on Centos 7.5 using KDE desktop manager.

I use the latest client version 4.1.2.2 from windows.

I'm running the following Java code using the Java 17 version.
public class TestDialog extends JDialog {

	private static final long serialVersionUID = 1L;
	private final JPanel contentPanel = new JPanel();

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		try {
			TestDialog dialog = new TestDialog();
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog.
	 */
	public TestDialog() {
		super();
		setPreferredSize(getPreferredSize());
		setBounds(100, 100, 450, 300);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setLayout(new FlowLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		{
			JLabel lblNewLabel = new JLabel("New label");
			contentPanel.add(lblNewLabel);
		}
		{
			JButton btnNewButton = new JButton("New button");
			contentPanel.add(btnNewButton);
		}
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("OK");
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
			{
				JButton cancelButton = new JButton("Cancel");
				cancelButton.setActionCommand("Cancel");
				buttonPane.add(cancelButton);
			}
		}
	}

}

When I use the x2go session type KDE I don't get any errors running my code.

But, when I use application session type using terminal mode I get the
following exception:
java.lang.NullPointerException: Cannot invoke
"sun.awt.X11.XBaseWindow.isVisible()" because "parent" is null
        at java.desktop/sun.awt.X11.XWindowPeer.setToplevelTransientFor(XWindowPeer.java:1688)
        at java.desktop/sun.awt.X11.XWindowPeer.postInit(XWindowPeer.java:253)
        at java.desktop/sun.awt.X11.XDecoratedPeer.postInit(XDecoratedPeer.java:105)
        at java.desktop/sun.awt.X11.XBaseWindow.init(XBaseWindow.java:184)
        at java.desktop/sun.awt.X11.XBaseWindow.<init>(XBaseWindow.java:259)
        at java.desktop/sun.awt.X11.XWindow.<init>(XWindow.java:147)
        at java.desktop/sun.awt.X11.XComponentPeer.<init>(XComponentPeer.java:111)
        at java.desktop/sun.awt.X11.XCanvasPeer.<init>(XCanvasPeer.java:42)
        at java.desktop/sun.awt.X11.XPanelPeer.<init>(XPanelPeer.java:48)
        at java.desktop/sun.awt.X11.XWindowPeer.<init>(XWindowPeer.java:134)
        at java.desktop/sun.awt.X11.XDecoratedPeer.<init>(XDecoratedPeer.java:62)
        at java.desktop/sun.awt.X11.XDialogPeer.<init>(XDialogPeer.java:40)
        at java.desktop/sun.awt.X11.XToolkit.createDialog(XToolkit.java:1084)
        at java.desktop/java.awt.Dialog.addNotify(Dialog.java:768)
        at java.desktop/java.awt.Dialog.conditionalShow(Dialog.java:917)
        at java.desktop/java.awt.Dialog.show(Dialog.java:1048)
        at java.desktop/java.awt.Component.show(Component.java:1728)
        at java.desktop/java.awt.Component.setVisible(Component.java:1675)
        at java.desktop/java.awt.Window.setVisible(Window.java:1036)
        at java.desktop/java.awt.Dialog.setVisible(Dialog.java:1016)
        at TestDialog.main(TestDialog.java:22)

Is there any external X2go/desktop session that is missing in order my
code will work fine.


Avner
[Message part 2 (text/html, inline)]

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Sun Dec 22 05:06:32 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.