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

Hang expanding a styled tree widget #680

Open
merks opened this issue May 22, 2023 · 18 comments
Open

Hang expanding a styled tree widget #680

merks opened this issue May 22, 2023 · 18 comments
Labels
bug Something isn't working Windows Happens on Windows OS

Comments

@merks
Copy link
Contributor

merks commented May 22, 2023

Describe the bug

I've repeatedly had hangs in the last few days, always while expanding some tree item. In this case a search tree item and it's permanently stuck here:

"main" #1 prio=6 os_prio=0 cpu=1135906.25ms elapsed=340415.75s tid=0x000001ebbeb9c7c0 nid=0x7cd8 runnable [0x000000295a759000]
java.lang.Thread.State: RUNNABLE
at org.eclipse.swt.internal.win32.OS.ScriptStringFree(Native Method)
at org.eclipse.swt.graphics.TextLayout.createMetafileWithChars(TextLayout.java:3586)
at org.eclipse.swt.graphics.TextLayout.shape(TextLayout.java:3645)
at org.eclipse.swt.graphics.TextLayout.computeRuns(TextLayout.java:274)
at org.eclipse.swt.graphics.TextLayout.getBounds(TextLayout.java:1657)
at org.eclipse.jface.viewers.StyledCellLabelProvider.updateTextLayout(StyledCellLabelProvider.java:296)
at org.eclipse.jface.viewers.StyledCellLabelProvider.measure(StyledCellLabelProvider.java:278)
at org.eclipse.jface.viewers.OwnerDrawLabelProvider$OwnerDrawListener.handleEvent(OwnerDrawLabelProvider.java:59)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4256)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1090)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1075)
at org.eclipse.swt.widgets.Tree.sendMeasureItemEvent(Tree.java:4558)
at org.eclipse.swt.widgets.Tree.CDDS_ITEMPREPAINT(Tree.java:1034)
at org.eclipse.swt.widgets.Tree.wmNotifyChild(Tree.java:7551)
at org.eclipse.swt.widgets.Control.wmNotify(Control.java:5797)
at org.eclipse.swt.widgets.Composite.wmNotify(Composite.java:1961)
at org.eclipse.swt.widgets.Control.WM_NOTIFY(Control.java:5365)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4799)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
at org.eclipse.swt.internal.win32.OS.CallWindowProc(Native Method)
at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java:1576)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4844)
at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:6142)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
at org.eclipse.swt.internal.win32.OS.CallWindowProc(Native Method)
at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java:1576)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4844)
at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:6142)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3640)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:643)
at org.eclipse.ui.internal.Workbench$$Lambda$188/0x000000010028fba8.run(Unknown Source)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:550)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:171)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@17.0.7/Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@17.0.7/NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@17.0.7/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base@17.0.7/Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)

This is based on the m2 state of release train repository.

To Reproduce

I don't know.

Environment:

  1. Select the platform(s) on which the behavior is seen:
    • [] All OS
    • Windows
    • Linux
    • macOS
  1. Additional OS info (e.g. OS version, Linux Desktop, etc)

  2. JRE/JDK version

Java 17.

Version since

The m2 version of 4.28

Workaround (or) Additional context

I must kill the process and this will have been the 20th time I've done that in the last days.

@iloveeclipse
Copy link
Member

always while expanding some tree item

The code seem to run some Windows specific text/font related calculations, I wonder if you have some element with "special" label in your tree that causes this hang. If you could nail it down, would be helpful.

@SyntevoAlex : this seem not be a recent regression, but might be you have a better idea what could cause the code in question to hang?

@iloveeclipse iloveeclipse added Windows Happens on Windows OS bug Something isn't working labels May 22, 2023
@merks
Copy link
Contributor Author

merks commented May 22, 2023

It’s expanding a collapsed item in a search view right after a search.

@iloveeclipse
Copy link
Member

It’s expanding a collapsed item in a search view right after a search.

Sure, but is this something you can reproduce in a fresh workspace and minimal search example?
I assume whatever you search finds is "special" in some way that causes glyph rendering code to hang.
So finding what is "special" could give us a simple SWT only test case.

@SyntevoAlex
Copy link
Member

Is there a reasonable number of elements, or millions of them?

@merks
Copy link
Contributor Author

merks commented May 22, 2023

Less than 20. It’s really seems stuck on the one child in this case. I saw this in the repo explorer the other day in a debug launch and will try that tomorrow. In this case too it was a small number of children. If I can reproduce in the debugger I can get much more details.

@SyntevoAlex
Copy link
Member

Sounds relevant to #539
@jonahgraham FYI

@merks
Copy link
Contributor Author

merks commented May 23, 2023

I'm able to reproduce it in a debug-launched IDE:

image

Worse still is that while inspecting the state of the variables in the debugging IDE, the debugging IDE itself hangs.

The hung debugging IDE is in this state:

"main" #1 prio=6 os_prio=0 cpu=1019781.25ms elapsed=222693.58s tid=0x000001cf760b0be0 nid=0xa7c runnable [0x000000703c924000]
java.lang.Thread.State: RUNNABLE
at org.eclipse.swt.internal.win32.OS.ScriptStringAnalyse(Native Method)
at org.eclipse.swt.graphics.TextLayout.createMetafileWithChars(TextLayout.java:3584)
at org.eclipse.swt.graphics.TextLayout.shape(TextLayout.java:3645)
at org.eclipse.swt.graphics.TextLayout.computeRuns(TextLayout.java:274)
at org.eclipse.swt.graphics.TextLayout.getBounds(TextLayout.java:1657)
at org.eclipse.swt.custom.StyledText.computeSize(StyledText.java:1232)
at org.eclipse.swt.layout.GridData.computeSize(GridData.java:504)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:486)
at org.eclipse.swt.layout.GridLayout.computeSize(GridLayout.java:168)
at org.eclipse.swt.widgets.Composite.computeSizeInPixels(Composite.java:217)
at org.eclipse.swt.widgets.Control.computeSize(Control.java:663)
at org.eclipse.swt.layout.GridData.computeSize(GridData.java:504)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:486)
at org.eclipse.swt.layout.GridLayout.computeSize(GridLayout.java:168)
at org.eclipse.swt.widgets.Composite.computeSizeInPixels(Composite.java:217)
at org.eclipse.swt.widgets.Control.computeSize(Control.java:663)
at org.eclipse.swt.layout.GridData.computeSize(GridData.java:504)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:486)
at org.eclipse.swt.layout.GridLayout.layout(GridLayout.java:201)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1335)
at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1022)
at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1067)
at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3217)
at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3213)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:3208)
at org.eclipse.swt.custom.SashFormLayout.layout(SashFormLayout.java:193)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1335)
at org.eclipse.swt.widgets.Composite.sendResize(Composite.java:1022)
at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1067)
at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3217)
at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3213)
at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3289)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:3285)
at org.eclipse.ui.part.PageBook$PageBookLayout.layout(PageBook.java:71)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1335)
at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1736)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4820)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(Native Method)
at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:91)
at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5675)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4833)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method)
at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3256)
at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1061)
at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3217)
at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3213)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:3208)
at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:216)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1335)
at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1736)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4820)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(Native Method)
at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:91)
at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5675)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4833)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method)
at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3256)
at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1061)
at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3217)
at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3213)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:3208)
at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:231)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1335)
at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1736)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4820)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(Native Method)
at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:91)
at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5675)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4833)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
at org.eclipse.swt.internal.win32.OS.SetWindowPos(Native Method)
at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3256)
at org.eclipse.swt.widgets.Composite.setBoundsInPixels(Composite.java:1061)
at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3217)
at org.eclipse.swt.widgets.Control.setBoundsInPixels(Control.java:3213)
at org.eclipse.swt.widgets.Control.setBounds(Control.java:3208)
at org.eclipse.swt.layout.FillLayout.layout(FillLayout.java:216)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1335)
at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1736)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4820)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(Native Method)
at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:91)
at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5675)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4833)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
at org.eclipse.swt.internal.win32.OS.EndDeferWindowPos(Native Method)
at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:993)
at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:970)
at org.eclipse.swt.widgets.Composite.setResizeChildren(Composite.java:1166)
at org.eclipse.swt.widgets.Composite.WM_SIZE(Composite.java:1740)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4820)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
at org.eclipse.swt.internal.win32.OS.DefWindowProc(Native Method)
at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:91)
at org.eclipse.swt.widgets.Control.WM_WINDOWPOSCHANGED(Control.java:5675)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4833)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5022)
at org.eclipse.swt.internal.win32.OS.EndDeferWindowPos(Native Method)
at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:993)
at org.eclipse.swt.widgets.Composite.resizeChildren(Composite.java:970)
at org.eclipse.swt.widgets.Composite.setResizeChildren(Composite.java:1166)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1336)
at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1320)
at org.eclipse.swt.widgets.Composite.layout(Composite.java:700)
at org.eclipse.swt.widgets.Composite.layout(Composite.java:652)
at org.eclipse.swt.widgets.Composite.layout(Composite.java:608)
at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout.onMouseMove(SashLayout.java:145)
at org.eclipse.e4.ui.workbench.renderers.swt.SashLayout$$Lambda$339/0x00000008010cfc18.mouseMove(Unknown Source)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:216)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4256)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4054)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3642)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:643)
at org.eclipse.ui.internal.Workbench$$Lambda$180/0x0000000800dcfb68.run(Unknown Source)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:550)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:171)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@17.0.5/Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@17.0.5/NativeMethodAccessorImpl.java:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@17.0.5/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base@17.0.5/Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)

Locked ownable synchronizers:
- None

All this points the finger at TextLayout and its callees.

I'll try to determine the state of the TextLayout so it can reproduced directly, hopefully.

@iloveeclipse
Copy link
Member

Which character is inside 'chars'? You can try to print its numeric value

@merks
Copy link
Contributor Author

merks commented May 23, 2023

Yes, that's what I'm trying to do, though I was trying to use a conditional breakpoint to do that, but my debugging IDE hangs really easily when I click on the variables view. I think it will be better if I import SWT as a project so I can edit it...

@merks
Copy link
Contributor Author

merks commented May 23, 2023

It's this character, i.e., 0x02 (STX):

image

If the IDE tries to show the value of a variable containing such a character in a hover, the IDE hangs:

image

I still don't see anything changed in TextLayout to cause such an issue. Maybe a Window's update; I'm still on Windows 10...

@merks
Copy link
Contributor Author

merks commented May 23, 2023

I can reproduce the problem with this slightly modified (added bad characters to the text) SWT snippet:

/*******************************************************************************
 * Copyright (c) 2000, 2016 IBM Corporation and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.swt.snippets;

/*
 * TextLayout example snippet: text with underline and strike through
 *
 * For a list of all SWT example snippets see
 * http://www.eclipse.org/swt/snippets/
 *
 * @since 3.1
 */
import org.eclipse.swt.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.widgets.*;

public class Snippet256 {

public static void main(String[] args) {
	Display display = new Display();
	final Shell shell = new Shell(display, SWT.SHELL_TRIM | SWT.DOUBLE_BUFFERED);
	shell.setText("Underline, Strike Out");
	Font font = shell.getFont();
	String text = "Here is \u0002 some \u0003 text that is underlined or struck out or both.";
	final TextLayout layout = new TextLayout(display);
	layout.setText(text);
	TextStyle style1 = new TextStyle(font, null, null);
	style1.underline = true;
	layout.setStyle(style1, 26, 35);
	TextStyle style2 = new TextStyle(font, null, null);
	style2.strikeout = true;
	layout.setStyle(style2, 40, 49);
	TextStyle style3 = new TextStyle(font, null, null);
	style3.underline = true;
	style3.strikeout = true;
	layout.setStyle(style3, 54, 57);
	shell.addListener(SWT.Paint, event -> {
		Point point = new Point(10, 10);
		int width = shell.getClientArea().width - 2 * point.x;
		layout.setWidth(width);
		layout.draw(event.gc, point.x, point.y);
	});
	shell.open();
	while (!shell.isDisposed()) {
		if (!display.readAndDispatch()) display.sleep();
	}
	layout.dispose();
	display.dispose();
}
}

It's still not clear why this has not be a long standing problem...

@merks
Copy link
Contributor Author

merks commented May 23, 2023

Adding this isISOControl guard fixes the problem:

		for (int i = 0; i < chars.length; i++) {
			if (Character.isISOControl(chars[i])) {
				continue;
			}
			OS.MoveMemory(logAttr, run.psla + (i * SCRIPT_LOGATTR.sizeof), SCRIPT_LOGATTR.sizeof);
			if (!logAttr.fWhiteSpace) {
				sampleChars[count++] = chars[i];
				if (count == sampleChars.length) break;
			}
		}

Of course it would be better that logAttr somehow computes the needed information...

@iloveeclipse
Copy link
Member

@merks : any idea how this character ends in the search results? Is this some file in your workspace that contains this character, or is the search somehow creates these characters (illegally splitting unicode strings etc)?

@merks
Copy link
Contributor Author

merks commented May 23, 2023

Yes, I did track down where this comes from in Oomph's case, from its use of EMF's DiagnosticDecorator.enquote, which should be post processed with DiagnsoticDecorator.strip but wasn't, but this has been this way for the last 5 years and only just in the last weeks has turned into a problem. In any case, I fixed Oomph to remove these characters. In this case the Textlayout that hangs was used for ToolTip processing. The search hang happens directly from the owner draw of a search item and that was in my Mylyn workspace...

@jukzi
Copy link
Contributor

jukzi commented May 25, 2023

This almost duplicates #414 (also STX)
For me (win 10) your example #680 (comment) does not hang but is only damn slow.

@deepika-u
Copy link
Contributor

@merks
I tried your same snippet on below environment and don't see either a hang or slowness.

Eclipse SDK
Version: 2023-06 (4.28)
Build id: I20230530-1800
OS: Windows 11, v.10.0, x86_64 / win32
Java vendor: Eclipse Adoptium
Java runtime version: 20+36
Java version: 20

I see an output as below
image

After this is shown up, i move on to another snippet and all works fine for me.

@jukzi
Copy link
Contributor

jukzi commented May 31, 2023

@merks if you windows hangs on a single OS call you should report to Microsoft

@merks
Copy link
Contributor Author

merks commented May 31, 2023

Maybe it's something caused by a recent Windows 10 update and will go away with an update to Windows 11. I've had this happen again several times since then with the Console view and with the Search view. I doubt reporting a problem to MS will be any more successful than reporting a problem and providing a solution #680 (comment) is here. They too will want something to reproduce the problem and that investment of time I can better invest more effectively on other things and we can all hope no one else sees such a problem.

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

No branches or pull requests

5 participants