Skip to content

[GTK4] UnsatisfiedLinkError in Display.flushExposes #1794

@ptziegler

Description

@ptziegler

Describe the bug

X11 only
When using the GTK4 port, trying to create multiple instances of a shell may lead to an error due to calling GTK3-exclusive methods.

To Reproduce

Create two or more instances of Snippet133. This issue doesn't happen all the time but should happen at some point.

Environment:

  1. Select the platform(s) on which the behavior is seen:
    • All OS
    • Windows
    • Linux
    • macOS

Stacktrace:

Exception in thread "main" java.lang.UnsatisfiedLinkError: 'long org.eclipse.swt.internal.gtk.GDK.gdk_x11_window_lookup_for_display(long, long)'
	at org.eclipse.swt.internal.gtk.GDK.gdk_x11_window_lookup_for_display(Native Method)
	at org.eclipse.swt.widgets.Display.checkIfEventProc(Display.java:1026)
	at org.eclipse.swt.internal.gtk.OS.XCheckIfEvent(Native Method)
	at org.eclipse.swt.widgets.Display.flushExposes(Display.java:1735)
	at org.eclipse.swt.widgets.Control.update(Control.java:6791)
	at org.eclipse.swt.widgets.Shell.setVisible(Shell.java:3005)
	at org.eclipse.swt.widgets.Shell.open(Shell.java:2050)
	at org.eclipse.swt.snippets.Snippet133.open(Snippet133.java:95)
	at org.eclipse.swt.snippets.Snippet133.main(Snippet133.java:57)

Metadata

Metadata

Assignees

No one assigned

    Labels

    gtk4GTK4 issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions