Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWT_GTK4=1 -> Eclipse start hangs in splash #1628

Open
vogella opened this issue Nov 28, 2024 · 8 comments
Open

SWT_GTK4=1 -> Eclipse start hangs in splash #1628

vogella opened this issue Nov 28, 2024 · 8 comments
Labels
gtk4 GTK4 issues Linux/GTK Happens on Linux

Comments

@vogella
Copy link
Contributor

vogella commented Nov 28, 2024

According to @laeubi announcement, todays build should support GTK4

Tried if with SWT_GTK4=1 on latest Ubuntu and get hanging splash screen.

image

Log:

(java:40344): GLib-GObject-CRITICAL **: 07:03:49.805: cannot register existing type 'GdkEvent'

(java:40344): GLib-CRITICAL **: 07:03:49.805: g_once_init_leave: assertion 'result != 0' failed

(java:40344): GLib-GObject-CRITICAL **: 07:03:49.805: g_type_register_static: assertion 'parent_type > 0' failed

(java:40344): GLib-CRITICAL **: 07:03:49.805: g_once_init_leave: assertion 'result != 0' failed

@laeubi laeubi added Linux/GTK Happens on Linux gtk4 GTK4 issues labels Nov 28, 2024
@laeubi
Copy link
Contributor

laeubi commented Nov 28, 2024

@vogella please provide

  • GTK Version
  • OS + Version
  • GLIBC Version

@vogella
Copy link
Contributor Author

vogella commented Nov 28, 2024

Eclipse SDK
Version: 2025-03 (4.35)
Build id: I20241127-1800
OS: Linux, v.6.8.0-49-generic, x86_64 / gtk 3.24.41
Java vendor: Ubuntu
Java runtime version: 21.0.5+11-Ubuntu-1ubuntu124.04
Java version: 21.0.5

@tomaswolf
Copy link
Member

Hm; this says gtk 3.24.41...

@akurtakov
Copy link
Member

@vogella Please note that SWT has been compiled with gtk 4 support but launcher isn't and this is most likely what fails for you. Use the launcher.jar and not executable for now (to uncover pending SWT problems).

@vogella
Copy link
Contributor Author

vogella commented Nov 28, 2024

Thanks @akurtakov, I interpreted the announcement email in the way that the executable should also work (as it mentioned Eclipse applications). Will retry with the JAR only.

@ptziegler
Copy link
Contributor

ptziegler commented Nov 28, 2024

You get the same issue with the splash screen when launching the IDE from within the SWT workspace. For whatever reason, SWT gets stuck in the gtk_init() method.

Bypassing the splash screen by either using the jar or -noSplash both work, except that the IDE then crashes while showing the workspace selection screen:

hs_err_pid42410.log

C  [libswt-pi4-gtk-4968r2.so+0x414ca]  Java_org_eclipse_swt_internal_gtk_OS_G_1OBJECT_1TYPE+0x0
j  org.eclipse.swt.accessibility.AccessibleObject.sendEvent(ILjava/lang/Object;)V+1046
j  org.eclipse.swt.accessibility.Accessible.sendEvent(ILjava/lang/Object;)V+17
j  org.eclipse.jface.dialogs.TitleAreaDialog.updateMessage(Ljava/lang/String;)V+46
j  org.eclipse.jface.dialogs.TitleAreaDialog.showMessage(Ljava/lang/String;Lorg/eclipse/swt/graphics/Image;Ljava/lang/String;)V+74
j  org.eclipse.jface.dialogs.TitleAreaDialog.setMessage(Ljava/lang/String;I)V+98
j  org.eclipse.jface.dialogs.TitleAreaDialog.setMessage(Ljava/lang/String;)V+3
j  org.eclipse.ui.internal.ide.ChooseWorkspaceDialog.createDialogArea(Lorg/eclipse/swt/widgets/Composite;)Lorg/eclipse/swt/widgets/Control;+28
j  org.eclipse.jface.dialogs.TitleAreaDialog.createContents(Lorg/eclipse/swt/widgets/Composite;)Lorg/eclipse/swt/widgets/Control;+128
j  org.eclipse.jface.window.Window.create()V+14
j  org.eclipse.jface.dialogs.Dialog.create()V+1
j  org.eclipse.jface.window.Window.open()I+23

Reason most likely being that the AccessibleObject hasn't been implemented for GTK4, so events are fired using a NULL handle.

if (GTK.GTK4) {
//TODO: Make use of Accessibility interface of GtkWidget rather than atk object which has been removed
} else {

@laeubi
Copy link
Contributor

laeubi commented Nov 29, 2024

Reason most likely being that the AccessibleObject hasn't been implemented for GTK4, so events are fired using a NULL handle.

@ptziegler do you think you can reproduce the problem in a standalone snippet?

@ptziegler
Copy link
Contributor

@ptziegler do you think you can reproduce the problem in a standalone snippet?

That class isn't really trivial, so I'd first have to understand what exactly it does... but I suppose I can have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gtk4 GTK4 issues Linux/GTK Happens on Linux
Projects
None yet
Development

No branches or pull requests

5 participants