eclipse.platform.swt icon indicating copy to clipboard operation
eclipse.platform.swt copied to clipboard

Expanding project tree item in Project Explorer with Option-Key pressed hangs Eclipse IDE in native AppKit code

Open kohlschuetter opened this issue 1 year ago • 3 comments

Describe the bug When clicking on a tree item chevron of a project in the "Project Explorer" view in Eclipse.app (Java or Java EE perspective), the application becomes completely unresponsive (hangs indefinitely, can only be quit forcibly). As a consequence, data loss can occur.

A spindump indicates a hang somewhere in AppKit's [NSTextFieldCell cellSizeForBounds:].

To Reproduce Open Eclipse, Java perspective, with a Maven project that has source folders. Click the project-level chevron to open the project subtree. Close again to hide the project subtree. Now click again, holding down the Option (Alt) key, which is supposed to recursively open all sub-tree items, packages, etc.

Expected behavior The entire subtree is shown; Eclipse doesn't hang.

Environment:

  1. Select the platform(s) on which the behavior is seen:
    • [ ] All OS
    • [ ] Windows
    • [ ] Linux
    • [X] macOS
  1. Additional OS info (e.g. OS version, Linux Desktop, etc) Seen in macOS 12, 13, 14 (can't remember exactly about macOS 11) If I remember correctly, this is due to some change in macOS AppKit a few years ago. Probably some previously made assumptions no longer hold true.

  2. JRE/JDK version doesn't matter

Version since Eclipse or SWT version since when the behavior is seen [e.g. 4.23] seen for a while, still a problem with 4.31.0

Workaround (or) Additional context

Any known workarounds for the problem?

Don't click on the chevron with the Option key down.

See attached sample output Sample of Eclipse.txt

kohlschuetter avatar Mar 16 '24 11:03 kohlschuetter

Can you please also create and attach jstack thread dump?

iloveeclipse avatar Mar 16 '24 11:03 iloveeclipse

Adding jstack log from vanilla 4.31.0 jstack1.log

kohlschuetter avatar Mar 16 '24 12:03 kohlschuetter

Same in the Package Explorer. There's a lot of child nodes in the "JRE System Library" and "Plug-in Dependencies" nodes. If you add a filter for "Libraries from External" to hide these ones it's better (although not the solution).

Phillipus avatar Mar 16 '24 12:03 Phillipus