Skip to content

Conversation

@laeubi
Copy link
Contributor

@laeubi laeubi commented Dec 14, 2024

Currently everything is run with GTK3 by default but we can't tell the current state of affairs with GTK4.

This now adds a new action that run the build (and tests) with GTK4 enabled.

@laeubi laeubi force-pushed the add_gtk4_test_workflow branch from 8fc5ee5 to 46d76c0 Compare December 14, 2024 08:09
@github-actions
Copy link
Contributor

github-actions bot commented Dec 14, 2024

Test Results

   502 files  ±0     502 suites  ±0   9m 36s ⏱️ +33s
 4 334 tests ±0   4 320 ✅ ±0   14 💤 ±0  0 ❌ ±0 
16 575 runs  ±0  16 466 ✅ ±0  109 💤 ±0  0 ❌ ±0 

Results for commit 7e158d3. ± Comparison against base commit 857ac0b.

♻️ This comment has been updated with latest results.

@akurtakov akurtakov force-pushed the add_gtk4_test_workflow branch from 46d76c0 to 139030f Compare December 21, 2024 20:02
@akurtakov akurtakov force-pushed the add_gtk4_test_workflow branch from 3944068 to edcdda1 Compare January 30, 2025 12:07
@akurtakov akurtakov force-pushed the add_gtk4_test_workflow branch from edcdda1 to 663f2de Compare February 13, 2025 08:52
@laeubi laeubi force-pushed the add_gtk4_test_workflow branch 3 times, most recently from 382fe3b to ba3d67a Compare February 13, 2025 09:35
@laeubi
Copy link
Contributor Author

laeubi commented Feb 13, 2025

If one goes the summary tab here:

https://github.com/eclipse-platform/eclipse.platform.swt/actions/runs/13304656046?pr=1663

then one can download the test-results that now also contain an crash report
hs_err_pid5270.log

First lines

Current thread (0x00007f0eec029c90):  JavaThread "main" [_thread_in_native, id=5271, stack(0x00007f0ef0b00000,0x00007f0ef0c00000)]

Stack: [0x00007f0ef0b00000,0x00007f0ef0c00000],  sp=0x00007f0ef0bfbe70,  free space=1007k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libgobject-2.0.so.0+0x26691]
C  [libgobject-2.0.so.0+0x27fc4]  g_object_new_with_properties+0x1d4
C  [libgobject-2.0.so.0+0x28f71]  g_object_new+0xc1
C  [libgtk-4.so.1+0x237c45]
C  [libgobject-2.0.so.0+0x40ff9]  g_type_create_instance+0x359
C  [libgobject-2.0.so.0+0x26a64]
C  [libgobject-2.0.so.0+0x28016]  g_object_new_with_properties+0x226
C  [libgobject-2.0.so.0+0x28f71]  g_object_new+0xc1
C  [libgtk-4.so.1+0x12ca33]
C  [libgobject-2.0.so.0+0x40ff9]  g_type_create_instance+0x359
C  [libgobject-2.0.so.0+0x26a64]
C  [libgobject-2.0.so.0+0x28016]  g_object_new_with_properties+0x226
C  [libgobject-2.0.so.0+0x28f71]  g_object_new+0xc1
C  [libswt-pi4-gtk-4968r11.so+0x3be1c]  Java_org_eclipse_swt_internal_gtk_GTK_gtk_1entry_1new+0x9
j  org.eclipse.swt.widgets.Display.initializeSystemColorsDisabled()V+18
j  org.eclipse.swt.widgets.Display.initializeSystemColors()V+59
j  org.eclipse.swt.widgets.Display.init()V+13
j  org.eclipse.swt.graphics.Device.<init>(Lorg/eclipse/swt/graphics/DeviceData;)V+145
j  org.eclipse.swt.widgets.Display.<init>(Lorg/eclipse/swt/graphics/DeviceData;)V+2
j  org.eclipse.swt.widgets.Display.<init>()V+2
j  org.eclipse.swt.tests.junit.Test_org_eclipse_swt_widgets_Display.test_syncCall_dispose()V+4
v  ~StubRoutines::call_stub

ptziegler added a commit to ptziegler/eclipse.platform.swt that referenced this pull request Feb 14, 2025
Subclasses are not created in GTK4, leading to the assignment of NULL
pointers when disposing the display. If a second display is created
afterwards, this leads to a segmentation fault.

Contributes to
eclipse-platform#1663
@ptziegler
Copy link
Contributor

ptziegler commented Feb 14, 2025

That looks very promising! 😄

I've created #1832 to solve the current segmentation fault, but I fear there are a lot of other crashes just waiting to be discovered.

This obviously can't be merged yet, otherwise there won't be a green build for the next few years. But I still like the idea of getting feedback whether my (or others) GTK4 changes cause non-trivial problems. So what do you think the next steps should be?

@laeubi
Copy link
Contributor Author

laeubi commented Feb 15, 2025

This obviously can't be merged yet, otherwise there won't be a green build for the next few years.

If you find this useful I can further work on this, one idea could be that we run this job if you add a label to a PR (e.g. gtk4) then it can already be used but won't influence "regular" PRs.

Currently everything is run with GTK3 by default but we can't tell the
current state of affairs with GTK4.

This now adds a new action that run the build (and tests) with GTK4
enabled.
@laeubi
Copy link
Contributor Author

laeubi commented Feb 15, 2025

Closing in favor of:

@laeubi laeubi closed this Feb 15, 2025
laeubi pushed a commit to ptziegler/eclipse.platform.swt that referenced this pull request Feb 15, 2025
Subclasses are not created in GTK4, leading to the assignment of NULL
pointers when disposing the display. If a second display is created
afterwards, this leads to a segmentation fault.

Contributes to
eclipse-platform#1663
@HannesWell
Copy link
Member

* [Run the Github verification with GTK4 enabled if it has GTK4 label #1833](https://github.com/eclipse-platform/eclipse.platform.swt/pull/1833)
  you can now add the `gtk4` label to a PR to run the build/test of SWT with GTK4.

Maybe a naive question, but can't we have another branch in the maven-build matrix for Linux-gtk4?

@laeubi
Copy link
Contributor Author

laeubi commented Feb 15, 2025

Maybe a naive question, but can't we have another branch in the maven-build matrix for Linux-gtk4?

Basically yes, but as GTK4 currently always fails this would result in each an every PR having failed checks (what is not really desirable), so given GTK4 works at some point in time and we still want to retain GTK3 that would be an option... on the other hand SWT has always ever only supported one main line as far as I know.

akurtakov pushed a commit to ptziegler/eclipse.platform.swt that referenced this pull request Mar 5, 2025
Subclasses are not created in GTK4, leading to the assignment of NULL
pointers when disposing the display. If a second display is created
afterwards, this leads to a segmentation fault.

Contributes to
eclipse-platform#1663
akurtakov pushed a commit to ptziegler/eclipse.platform.swt that referenced this pull request Mar 19, 2025
Subclasses are not created in GTK4, leading to the assignment of NULL
pointers when disposing the display. If a second display is created
afterwards, this leads to a segmentation fault.

Contributes to
eclipse-platform#1663
akurtakov pushed a commit that referenced this pull request Mar 19, 2025
Subclasses are not created in GTK4, leading to the assignment of NULL
pointers when disposing the display. If a second display is created
afterwards, this leads to a segmentation fault.

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

Labels

gtk4 GTK4 issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants