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

hover logs OperationCanceledException as error #1827

Open
jukzi opened this issue Dec 3, 2024 · 0 comments
Open

hover logs OperationCanceledException as error #1827

jukzi opened this issue Dec 3, 2024 · 0 comments
Assignees
Labels
bug Something isn't working regression Regression defect

Comments

@jukzi
Copy link
Contributor

jukzi commented Dec 3, 2024

Would be better to silently ignore OperationCanceledException:

eclipse.buildId=4.35.0.I20241201-1800
java.version=21.0.2
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -data file:/C:/Users/jkubitz/platform-2024-09-23/ws/

org.eclipse.jdt.ui
Error
Tue Dec 03 12:18:10 CET 2024
OperationCanceledException computing hover information in NullReferenceImplTransformations.java at offset 100231

org.eclipse.core.runtime.OperationCanceledException
	at org.eclipse.jdt.internal.core.AbstractClassFile.getClassFileContent(AbstractClassFile.java:239)
	at org.eclipse.jdt.internal.core.ClassFile.getJarBinaryTypeInfo(ClassFile.java:225)
	at org.eclipse.jdt.internal.core.ClassFile.getBinaryTypeInfo(ClassFile.java:186)
	at org.eclipse.jdt.internal.core.ClassFile.buildStructure(ClassFile.java:78)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:246)
	at org.eclipse.jdt.internal.core.SourceRefElement.generateInfos(SourceRefElement.java:127)
	at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:569)
	at org.eclipse.jdt.internal.core.BinaryType.getElementInfo(BinaryType.java:292)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:278)
	at org.eclipse.jdt.internal.core.BinaryType.getElementInfo(BinaryType.java:1142)
	at org.eclipse.jdt.internal.core.BinaryType.getFlags(BinaryType.java:357)
	at org.eclipse.jdt.internal.core.SearchableEnvironmentRequestor.acceptType(SearchableEnvironmentRequestor.java:127)
	at org.eclipse.jdt.internal.core.NameLookup.seekTypesInBinaryPackage(NameLookup.java:1510)
	at org.eclipse.jdt.internal.core.NameLookup.seekTypes(NameLookup.java:1442)
	at org.eclipse.jdt.internal.core.NameLookup.seekTypes(NameLookup.java:1348)
	at org.eclipse.jdt.internal.core.NameLookup.findAllTypes(NameLookup.java:422)
	at org.eclipse.jdt.internal.core.NameLookup.seekTypes(NameLookup.java:1418)
	at org.eclipse.jdt.internal.core.NameLookup.seekTypes(NameLookup.java:1348)
	at org.eclipse.jdt.internal.core.SearchableEnvironment.findTypes(SearchableEnvironment.java:981)
	at org.eclipse.jdt.internal.core.SearchableEnvironment.findTypes(SearchableEnvironment.java:783)
	at org.eclipse.jdt.internal.core.SearchableEnvironment.findTypes(SearchableEnvironment.java:609)
	at org.eclipse.jdt.internal.core.SearchableEnvironment.findTypes(SearchableEnvironment.java:588)
	at org.eclipse.jdt.internal.codeassist.SelectionEngine.select(SelectionEngine.java:1048)
	at org.eclipse.jdt.internal.core.Openable.codeSelect(Openable.java:167)
	at org.eclipse.jdt.internal.core.CompilationUnit.codeSelect(CompilationUnit.java:471)
	at org.eclipse.jdt.internal.core.CompilationUnit.codeSelect(CompilationUnit.java:461)
	at org.eclipse.jdt.internal.ui.text.java.hover.AbstractJavaEditorTextHover.getJavaElementsAt(AbstractJavaEditorTextHover.java:122)
	at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.lambda$0(JavadocHover.java:713)
	at org.eclipse.jdt.internal.core.JavaModelManager.cacheZipFiles(JavaModelManager.java:5694)
	at org.eclipse.jdt.internal.core.JavaModelManager.callReadOnly(JavaModelManager.java:5683)
	at org.eclipse.jdt.core.JavaCore.callReadOnly(JavaCore.java:6150)
	at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.internalGetHoverInfo(JavadocHover.java:713)
	at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo2(JavadocHover.java:709)
	at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:163)
	at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:130)
	at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.getHoverInfo2(JavaEditorTextHoverProxy.java:89)
	at org.eclipse.jface.text.TextViewerHoverManager$1.run(TextViewerHoverManager.java:155)
	Suppressed: java.lang.Throwable: Source line 2801 :
-----
						" => " + effectiveOutput.printableBitsField +
						" instead of: " + expectedOutput.printableBitsField);
				}
			}
		}
	}
	if (combinationTestsLoopsNb > 1) {
		System.out.println(this.name + "...\t\t" + combinationTestsLoopsNb + "\t" +
				(System.n() - startNanos));
	}
	// PREMATURE optimize test (extraneous| allocations and copies)
-----
		at org.eclipse.jdt.internal.ui.util.SelectionUtil.logException(SelectionUtil.java:150)
		at org.eclipse.jdt.internal.ui.text.java.hover.AbstractJavaEditorTextHover.getJavaElementsAt(AbstractJavaEditorTextHover.java:124)
		... 10 more


@jukzi jukzi added bug Something isn't working regression Regression defect labels Dec 3, 2024
@jukzi jukzi self-assigned this Dec 3, 2024
jukzi pushed a commit to jukzi/eclipse.jdt.ui that referenced this issue Dec 4, 2024
If Operation is canceled result is just not needed anymore. No need to
log an error.

* also silent BadLocationException

eclipse-jdt#1827
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

1 participant