Closed Horcrux7 closed 10 months ago
Must be a regression from 535f18949761fae5f0bc194802ec0c603d3ddb27, @jukzi : FYI.
@Horcrux7: I see there is org.jetbrains.kotlin.aspects.debug.core.KotlinSourceLookupAspect
in the stack, so you probably have some kotlin project there? Please consider to report this issue also to jetbrains, not sure what exactly they are trying to supply to the source lookup.
can you please report (debug?) which URI is used?
can you please report (debug?) which URI is used?
I would propose we log that so we don't need to guess in the future, I will push a PR.
can you please report (debug?) which URI is used?
How can I do this?
@iloveeclipse After I uninstall the Kotlin plugin the stack look like follow. Sounds not like a problem of Kotlin.
java.lang.IllegalArgumentException: URI is not hierarchical
at java.base/java.io.File.<init>(File.java:420)
at org.eclipse.jdt.internal.launching.sourcelookup.advanced.JDIHelpers.getClassesLocation(JDIHelpers.java:74)
at org.eclipse.jdt.launching.sourcelookup.advanced.AdvancedSourceLookupParticipant.getSourceContainer(AdvancedSourceLookupParticipant.java:88)
at org.eclipse.jdt.launching.sourcelookup.advanced.AdvancedSourceLookupParticipant.findSourceElements(AdvancedSourceLookupParticipant.java:72)
at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector$SourceLookupQuery.run(AbstractSourceLookupDirector.java:138)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector.doSourceLookup(AbstractSourceLookupDirector.java:473)
at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector.getSourceElement(AbstractSourceLookupDirector.java:714)
at org.eclipse.jdt.internal.debug.core.JavaDebugUtils.doSourceLookup(JavaDebugUtils.java:399)
at org.eclipse.jdt.internal.debug.core.JavaDebugUtils.resolveSourceElement(JavaDebugUtils.java:393)
at org.eclipse.jdt.internal.debug.core.JavaDebugUtils.resolveSourceElement(JavaDebugUtils.java:360)
at org.eclipse.jdt.internal.debug.core.JavaDebugUtils.resolveJavaProject(JavaDebugUtils.java:415)
at org.eclipse.jdt.internal.debug.ui.JavaWatchExpressionDelegate$EvaluationRunnable.run(JavaWatchExpressionDelegate.java:117)
at org.eclipse.jdt.internal.debug.core.model.JDIThread$ThreadJob.run(JDIThread.java:3481)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
How can I do this?
hopefully you get an I-Build next days which logs more info
After I uninstall the Kotlin plugin the stack look like follow. Sounds not like a problem of Kotlin.
Thanks. We will have tomorrow a nightly build that would add logging which URL makes trouble here. It would be nice if you could try with it. The build will be available tomorrow at https://download.eclipse.org/eclipse/downloads/
Just wondering if any of the related projects is located on some Windows NFS share? I vaguely remember we had troubles with Windows NFS URLs in the past.
Just wondering if any of the related projects is located on some Windows NFS share? I vaguely remember we had troubles with Windows NFS URLs in the past.
No, I think this are only projects in the workspace. Also parallel folders. I will look tomorrow with the new build.
After an Update to https://download.eclipse.org/eclipse/updates/4.30-I-builds/I20231024-1800/ it is working now. In the log i can see:
!ENTRY org.eclipse.jdt.launching 4 0 2023-10-25 07:53:41.757
!MESSAGE Unable to resolve class location from: 'file:C:/workspace_trunk/Security/bin/main/'
!STACK 0
java.lang.IllegalArgumentException: URI is not hierarchical
at java.base/java.io.File.<init>(File.java:420)
at org.eclipse.jdt.internal.launching.sourcelookup.advanced.JDIHelpers.getClassesLocation(JDIHelpers.java:78)
at org.eclipse.jdt.launching.sourcelookup.advanced.AdvancedSourceLookupParticipant.getSourceContainer(AdvancedSourceLookupParticipant.java:88)
at org.eclipse.jdt.launching.sourcelookup.advanced.AdvancedSourceLookupParticipant.findSourceElements(AdvancedSourceLookupParticipant.java:72)
at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector$SourceLookupQuery.run(AbstractSourceLookupDirector.java:138)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector.doSourceLookup(AbstractSourceLookupDirector.java:473)
at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector.getSourceElement(AbstractSourceLookupDirector.java:714)
at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility.lookup(SourceLookupFacility.java:303)
at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility$SourceLookupTask.run(SourceLookupFacility.java:752)
at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility$SourceLookupJob.run(SourceLookupFacility.java:690)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Where C:/workspace_trunk
is my workspace directory and Security
is the project in which I have set the breakpoint. bin/main
is the correct output directory set from Gradle for the src folder. I hope this help.
An accepted URI would be
file:/C:/workspace_trunk/Security/bin/main/
instead of
file:C:/workspace_trunk/Security/bin/main/
i.e. slash behind "file:" is missing.
i'll find a solution.
which JDK is used for runnning Eclipse, and which for launching the debugee?
which JDK is used for runnning Eclipse, and which for launching the debugee?
Eclipse is running with the bundled Java VM. From the eclipse.ini
-vm
C:\eclipse\eclipse\\plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.8.v20230831-1047/jre/bin\server\jvm.dll
eclipse.vm=C:\eclipse\eclipse\\plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_17.0.8.v20230831-1047/jre/bin\server\jvm.dll
The launcher run with a Java 11 VM:
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-11.0.11+9 (build 11.0.11+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-11.0.11+9 (build 11.0.11+9, mixed mode)
If I use Java 17 then it is the same:
openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8)
OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (build 17.0.2+8, mixed mode, sharing)
The bad path without the slash before the drive letter come form our custom classloader. This is a URLClassLoader and the URLs that we pass does not have the slash. If I add this then the exception in the log does not occur. I will fix this in our code.
After updating from Eclipse 2023-06 to 2023-09 I was not able to lookup sources from other projects. In the error log you can see the follow stacktrace:
The classes are loaded via custom classloader. The sources contains only the "Default" and other projects.
The problem was reproduced on two system from two developers. One on Windows 10 the other on Windows 11.
I have attched the complet log from Eclipse start until the erorr occur eclipse.log