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

[Edge] Eclipse muzz never hung on displaying Javadoc tooltip with WebView2 installed

Open GooogLeMorons opened this issue 8 months ago • 4 comments

Describe the bug After installing WebView2 placing mouse over any tooltip-help-equipped term in (Java) editor causes IDE hung forever.

To Reproduce On M$-Edgeless system with Firefox as system-wide default browser ensure default behavior of Eclipse Javadoc help - in tooltips('Press F2 to focus' in bottom bar). Install M$ Edge WebView2 Runtime (https://developer.microsoft.com/en-us/microsoft-edge/webview2/) Restart Eclipse Check Help like Javadoc wasn't spontaneously switched to external browser. Return it back to internal tooltips, if so. Ensure General / Web browser / Use internal web browser is selected. Place mouse pointer within editor over a Java term initiating Javadoc tooltip - Eclipse UI stops to respond (forever) and "(Not Responding)" suffix appears in window title after short period of time.

Expected behavior The Javadoc tooltips work EXACTLY same way before WebView2 installation - just displayed with no hungs.

Environment: Windows

  1. Additional OS info (e.g. OS version, Linux Desktop, etc) Windows 11

  2. JRE/JDK version Oracle JDK 24.GA

Workaround (or) Additional context Wipe out WebView2 - this brings the annoying #2000 popups back, but Javadoc tooltips became functional too

GooogLeMorons avatar Apr 25 '25 04:04 GooogLeMorons

Can you please share which exact Eclipse version you are running and take a sample while you hover over the Java element leading to the UI freeze (e.g., taken with VisualVM) so that one can analyze where the execution gets stuck? The Windows build version and the WebView2 version might also be helpful.

HeikoKlare avatar Apr 25 '25 06:04 HeikoKlare

Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components) Version: 2025-03 (4.35.0) Build id: 20250306-0812 OS: Windows 11, v.10.0, x86_64 / win32 Java vendor: Oracle Corporation Java runtime version: 24+36-3646 Java version: 24

WebView2 ver. 135.0.3179.98

VisualVM snapshot: https://drive.google.com/file/d/1wRdj4nOx9YrpbA4l4_dLjCRE0UU-z-Hb/view?usp=sharing

GooogLeMorons avatar Apr 25 '25 09:04 GooogLeMorons

I am pretty sure the root cause is https://github.com/eclipse-platform/eclipse.platform.swt/issues/1912 (fixed with https://github.com/eclipse-platform/eclipse.platform.swt/pull/1920)

@GooogLeMorons Can you try with the latest I-build version from https://download.eclipse.org/eclipse/downloads/?

sratz avatar Apr 25 '25 12:04 sratz

Can you try with the latest I-build version from https://download.eclipse.org/eclipse/downloads/?

sure. still hungs in Build id: I20250423-0800

the #1912 is about non-ASCII characters in TMP path, my is 'c:\Temp' symlink.

checked it as described with '-Djava.io.tmpdir=d:\IDTTMP' in eclipse.ini and got same result: even if the provided 'd:\IDTTMP' is actively used by Eclipse for temp files, it still hungs on tooltip help with WebView2.

when 'Use external web browser / Default system web browser' option is on, instead of tooltip Firefox opens e.g. 'file:///D:/IDTTMP/base15753692360015220917.html' - baseNNNNNNNNNNNNNN.html actually

the file exists, and has 0 bytes size.

GooogLeMorons avatar Apr 25 '25 21:04 GooogLeMorons

Closing this as no proper information about the actual issue and what to do about it were given. Expectation/proposal to remove Edge/WebView2 is not reasonable. The discussion proceeded in https://github.com/eclipse-platform/eclipse.platform.swt/pull/2065, which has meanwhile been merged. Might be that the mentioned issue was improved by that change.

HeikoKlare avatar May 13 '25 08:05 HeikoKlare

I think I was able to reproduce this now (and probably also https://github.com/spring-projects/spring-tools/issues/1542): The important point appears to be

[...] TMP path, my is 'c:\Temp' symlink.

the symlink part.

For some reason, when symlinks are involved we run into issues with upper/lower case, and now, in

In org.eclipse.swt.browser.Edge.isLocationForCustomText(String)

I got the following mismatch: file:///d:/Temp/Temp/base4498976357448198454.html file:///D:/Temp/Temp/base4498976357448198454.html

I guess we should not be comparing URIs here, but Paths.

I'll provide a PR.

sratz avatar May 13 '25 08:05 sratz

Thank you for reviving this with a reproduction/analysis! Seems like I was few hours too fast to close :-)

HeikoKlare avatar May 13 '25 13:05 HeikoKlare