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

Run As/Debug As context menu in java source editor and package explorer does not show entries #1068

Closed
LorenzoBettini opened this issue Jan 15, 2024 · 27 comments
Assignees
Labels
bug Something isn't working regression Regression defect
Milestone

Comments

@LorenzoBettini
Copy link

With Eclipse (Linux)

Version: 2024-03 M1 (4.31.0 M1)
Build id: 20240111-1612

and Eclipse Java Development Tools 3.19.400.v20240104-1800

the Run As/Debug As context menu in java source editor and package explorer does not show entries; at least, not in a usable way, see the screenshot:

Screenshot_20240115_120955

On the contrary, the ones in the toolbar and in the "Run" menu work as expected.

@jukzi
Copy link
Contributor

jukzi commented Jan 15, 2024

please have a look in the "Error Log" view if you find a related exception

@LorenzoBettini
Copy link
Author

@jukzi the error log doesn't show anything in that respect.

The terminal from where I started Eclipse shows (after using "Run As"):

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

@iloveeclipse iloveeclipse added the needinfo Further information is requested label Jan 15, 2024
@iloveeclipse
Copy link
Member

I don't think this is JDT problem, most likely GTK / SWT issue on HiDPI monitors / Wayland.
Please try to either use X11 or switch to "low" DPi and see if the problem disappears.
If not, please provide SWT/GTK config lines you can find in Help->About->Installation Details->Configuration.

@LorenzoBettini
Copy link
Author

I'm on X11, not Wayland.
I'll try also lower DPI.
Concerning the config lines, is it enough to copy everything that "Configuration" provides if I type "gtk" in the search field?

@iloveeclipse
Copy link
Member

No, please provide these entries that shown for SWT and for GTK from "*** System properties" and "*** System environment variables" sections

@LorenzoBettini
Copy link
Author

@iloveeclipse I tried both with X11 and Wayland and I also switched to 100% HDPI (so, no scaling); the result is always the same, and so are the logged information in the terminal.

These are the entries you asked for:

*** System properties:
gtk
/home/bettini/eclipse/bundlepool/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.2.800.v20231003-1442/eclipse_11802.so
org.eclipse.swt.internal.gtk.theme=Adwaita:light:dark
org.eclipse.swt.internal.gtk.version=3.24.39
osgi.ws=gtk

*** System environment variables:
GTK_THEME=Adwaita:light

*** System properties:
-Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true
org.eclipse.swt.graphics.Resource.reportNonDisposed=true
org.eclipse.swt.internal.deviceZoom=100
org.eclipse.swt.internal.gdk.backend=x11
org.eclipse.swt.internal.gtk.theme=Adwaita:light:dark
org.eclipse.swt.internal.gtk.version=3.24.39

*** System environment variables:

@LorenzoBettini
Copy link
Author

Some updates: the problem appears only the first time you select the Run As/Debug As menu in the context menu: if you get back to Run As/Debug As (without closing the context menu) the entries appear and can be selected. Unfortunately, it happens again if you close the context menu and open it again. When the problem appears, I can quickly spot something like "Loading..." in the small submenu. So, I wonder if this issue is a consequence of this other issue: #1056

@jukzi
Copy link
Contributor

jukzi commented Jan 17, 2024

@mickaelistria @fedejeanne can this issue relate to the changes in run menu? for example eclipse-platform/eclipse.platform#1005

@LorenzoBettini
Copy link
Author

One new thing I noted (I'm pretty sure it wasn't there before) is that the context run menu now shows existing launch configurations associated to that file.

@mickaelistria
Copy link
Contributor

@jukzi yes probably. @fedejeanne I suspect the issue is that the menu doesn't refresh its layout well and remains too small to show the entries.

@LorenzoBettini
Copy link
Author

But, just for curiosity, am I the only one seeing this problem? By the way, I can see that in all my Linux installations. Not on mac m1, though.

@mickaelistria
Copy link
Contributor

I noticed it yesterday on Linux as well. I think it's related to async computation of submenus/items which menu ignores when computing its size.
I see the same issue with async dynamic inputs in menus in LSP4E > Code Actions: the menu looks empty while is has some contents; here too, computation is async.

@jukzi
Copy link
Contributor

jukzi commented Jan 22, 2024

@fedejeanne pleae fix or revert

@jukzi jukzi added bug Something isn't working regression Regression defect and removed needinfo Further information is requested labels Jan 22, 2024
@LorenzoBettini
Copy link
Author

Unpopular opinion: life is much better with blocking operations and without concurrency/asynchronicity... ;)

@LorenzoBettini
Copy link
Author

Sorry for the ping, but this bug is critical concerning usability...

@mickaelistria
Copy link
Contributor

@LorenzoBettini Can you please submit a fix or revert PR?

@LorenzoBettini
Copy link
Author

@mickaelistria I think the original author should do the fix or, better, the revert of the PR. I don't know the internals of JDT; the original author should, and it should be a matter of minutes. For me, it would take ages...
I'm happy to help, but also time optimization is important ;)

@jukzi
Copy link
Contributor

jukzi commented Feb 13, 2024

Please name the PR that causes the issue so that we can revert.

@mickaelistria
Copy link
Contributor

I think the original author should do the fix or, better, the revert of the PR.

Sure, but in practice, this is not happening as you can see here. So someone else has to do the work.
The discussion has pointed to eclipse-platform/eclipse.platform#1005 , please consider trying to revert it locally to ensure if fixes your issue, and if it does, submit a PR. There is no need for any JDT expertise here, just plain Git and Eclipse PDE usage.

@LorenzoBettini
Copy link
Author

@mickaelistria @fedejeanne can this issue relate to the changes in run menu? for example eclipse-platform/eclipse.platform#1005

@jukzi you mentioned the change

@jukzi
Copy link
Contributor

jukzi commented Feb 13, 2024

@jukzi you mentioned the change

that was a guess... did you verify a revert of that helps?

@iloveeclipse
Copy link
Member

I've just reported another issue related to this code, see eclipse-platform/eclipse.platform#1202.

I would propose to revert the two related commits as they both are part of same feature.

@jukzi
Copy link
Contributor

jukzi commented Feb 13, 2024

please do, when you know that they cause this issues. @fedejeanne had enough time to repsond.

@iloveeclipse
Copy link
Member

@LorenzoBettini : please check next IBuild, I've reverted related commits.
At least eclipse-platform/eclipse.platform#1202 is fixed by that.

@LorenzoBettini
Copy link
Author

@iloveeclipse I'm trying to use https://download.eclipse.org/eclipse/updates/4.31-I-builds/ for updating "platform", I guess the hopefully fixed version is org.eclipse.platform_4.31.0.v20240213-2236.jar

However, it refuses to update because of the conflict with the EPP package

Cannot complete the install because of a conflicting dependency.
  Software being installed: Eclipse Platform 4.31.0.I20240213-1800 (org.eclipse.platform.ide 4.31.0.I20240213-1800)
  Software currently installed: Eclipse Platform 4.31.0.v20240127-1800 (org.eclipse.platform.feature.group 4.31.0.v20240127-1800)
  Only one of the following can be installed at once: 
    Compare Support 3.9.300.v20231123-2204 (org.eclipse.compare 3.9.300.v20231123-2204)
    Compare Support 3.10.0.v20240104-0951 (org.eclipse.compare 3.10.0.v20240104-0951)
    Compare Support 3.10.0.v20240208-0728 (org.eclipse.compare 3.10.0.v20240208-0728)
    Compare Support 3.9.200.v20230726-0617 (org.eclipse.compare 3.9.200.v20230726-0617)
    Compare Support 3.10.0.v20240125-0912 (org.eclipse.compare 3.10.0.v20240125-0912)
  Cannot satisfy dependency:
    From: Eclipse Platform 4.31.0.v20240127-1800 (org.eclipse.platform.feature.group 4.31.0.v20240127-1800)
    To: org.eclipse.equinox.p2.iu; org.eclipse.compare [3.10.0.v20240125-0912,3.10.0.v20240125-0912]
  Cannot satisfy dependency:
    From: Eclipse Platform 4.31.0.v20240213-2236 (org.eclipse.platform.feature.group 4.31.0.v20240213-2236)
    To: org.eclipse.equinox.p2.iu; org.eclipse.compare [3.10.0.v20240208-0728,3.10.0.v20240208-0728]
  Cannot satisfy dependency:
    From: Eclipse Platform 4.31.0.I20240213-1800 (org.eclipse.platform.ide 4.31.0.I20240213-1800)
    To: org.eclipse.equinox.p2.iu; org.eclipse.platform.feature.group [4.31.0.v20240213-2236,4.31.0.v20240213-2236]

However, I could update my TP and start a new Eclipse workbench. I see the problem went away in the started workbench!
So it looks like it is fixed now.

@iloveeclipse
Copy link
Member

So it looks like it is fixed now.

Perfect, thanks for confirmation. Closing as duplicate of eclipse-platform/eclipse.platform#1202.

@iloveeclipse iloveeclipse self-assigned this Feb 14, 2024
@iloveeclipse iloveeclipse added this to the 4.31 M3 milestone Feb 14, 2024
@fedejeanne
Copy link
Contributor

fedejeanne commented Apr 2, 2024

Hello everyone,
I came back from a leave of several months just recently, hence the radio silence. Sorry to hear that my change brought some problems, thanks @LorenzoBettini for reporting it!

I've been looking into it and I couldn't find anything useful on the bug on pixman_region32_init_rect nor could I come up with a solution for Linux, so I guess there's no other choice besides leaving it out (thank you @iloveeclipse for reverting it).

Unpopular opinion: life is much better with blocking operations and without concurrency/asynchronicity... ;)

I agree (sigh)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression Regression defect
Projects
None yet
Development

No branches or pull requests

5 participants