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

Full log


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

Received: (at submit) by bugs.x2go.org; 13 Jan 2024 18:23:08 +0000
From atenne@gmail.com  Sat Jan 13 19:23:01 2024
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-2.0 required=3.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,SPF_HELO_NONE,
	T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2
Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 5D3C15DAC0
	for <submit@bugs.x2go.org>; Sat, 13 Jan 2024 19:23:01 +0100 (CET)
Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-3bc09844f29so6333753b6e.0
        for <submit@bugs.x2go.org>; Sat, 13 Jan 2024 10:23:01 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1705170179; x=1705774979; darn=bugs.x2go.org;
        h=to:subject:message-id:date:from:mime-version:from:to:cc:subject
         :date:message-id:reply-to;
        bh=C/Cibmqwnp0a7aHBU/wONJijWEyUvTEXWH5OBwyUKP4=;
        b=fm4Gqs4us+e1qjgwjhwnkJWDByogix2HBvBgoq84jOjliFVhNV+jfeUqiXllmKNLM2
         rKpUBW3Xhm4KMPSYjc0K60CJUw6h6EGBlICwZSpMRLaVO3NVPZ3c/yduHwRZp5Oo46Co
         4BebYskmQI/S0SXIvZSgAyeLcPWtnt3jEXGUcrQq+G/6TnpPWiE6CsIm2FTLQjGUKzaD
         eGgggMwfTm1gFbN1hXdnRFKFDe9Yi2uFYSaaF25bjWXMpg+BcNaJ2rv5r/0go9s6HCWi
         6MEfw7lFKxAQAnT+q2mR6TMp6LJuWCF23LSZLcdCKpi1Y8XMNJLP83pbeujXcb2lZGV8
         AJUQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1705170179; x=1705774979;
        h=to:subject:message-id:date:from:mime-version:x-gm-message-state
         :from:to:cc:subject:date:message-id:reply-to;
        bh=C/Cibmqwnp0a7aHBU/wONJijWEyUvTEXWH5OBwyUKP4=;
        b=BFRaHY92jWh1aH5eBRGvOGeHsjXtx0w0NIaiQdjHvHJyV8HN0SWjJ9wodl7U6OY19v
         2J7F3qW7+B2g0W8GzKOZB7XGQe9p2dFF3FIuftTO9a9kIkNsQ5+lxNKx6cf1EDdV9zFk
         fODbmoslOe9te6bB0FrGE1w4T5d2WOcnyILWEju8UzRdJF81GVRTqbSIp28zLfrbcBaO
         F3OK5qlJgtuB6fiXHXyVHOlwhcySjnT/pmOCeoGENwgG9JWDE4dxnaYi2IWwXC+Lkm2c
         qEmUth3X6sxci/XaEvqTzfBGpQgkWWONhmskapON7YEtiiCdrQmy5QWQdYwooVm9GZOF
         kTSQ==
X-Gm-Message-State: AOJu0YwaInTUJFsl5uqSk0ZV6/sZD5LRBFCVsyP4bWk/btg0LB0AyI9D
	qzU6YO215z0FxJLaOQ9J6mKyPLuPJhQUQAZIRllyaTfnBUmN2Q==
X-Google-Smtp-Source: AGHT+IEU9tXVnUQflineZ8T20vB2/E7HSjvLq/j/DsF2/nhiXNXuGCJrCrz1UsNGvBEkWihmILldDJt7SrH4XvaRXrw=
X-Received: by 2002:a05:6808:3685:b0:3bd:56ce:89e3 with SMTP id
 cr5-20020a056808368500b003bd56ce89e3mr2789139oib.60.1705170179142; Sat, 13
 Jan 2024 10:22:59 -0800 (PST)
MIME-Version: 1.0
From: Avner Tenne <atenne@gmail.com>
Date: Sat, 13 Jan 2024 20:22:48 +0200
Message-ID: <CAE1gf9jhYfkoA_3byGpfkvMhT1fV1er77HEj9okWQPCPKRF_kw@mail.gmail.com>
Subject: X11 error with Java 17
To: submit@bugs.x2go.org
Content-Type: multipart/alternative; boundary="000000000000cf3855060ed7de1a"
[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: Thu Nov 21 15:14:33 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.