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

Could not write lock info file #2423

Closed
2 tasks done
jonahgraham opened this issue Oct 18, 2024 · 5 comments · Fixed by #2426
Closed
2 tasks done

Could not write lock info file #2423

jonahgraham opened this issue Oct 18, 2024 · 5 comments · Fixed by #2426
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jonahgraham
Copy link
Contributor

jonahgraham commented Oct 18, 2024

Let's make sure issue is not already fixed in latest builds first.

Starting Eclipse on Windows now has an exception about writing lock file (see log below). The IDE starts properly on quick inspection, but not sure if there are other side effects.

Steps to reproduce

From a fresh installation and clean workspace:

  • Load current source code in SDK
  • Launch a development Eclipse instance

Here is some relevant log output

From <workspace>/.metadata/.log

!ENTRY org.eclipse.ui.ide 4 4 2024-10-18 19:30:09.343
!MESSAGE Could not write lock info file
!STACK 0
java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/Jonah/eclipse/cdt-main/runtime-EclipseApplication/\.metadata\.lock_info
	at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:204)
	at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:175)
	at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
	at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
	at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:231)
	at java.base/java.nio.file.Path.of(Path.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.getLockInfoFile(IDEApplication.java:527)
	at org.eclipse.ui.internal.ide.application.IDEApplication.createLockInfoFile(IDEApplication.java:538)
	at org.eclipse.ui.internal.ide.application.IDEApplication.writeWsLockInfo(IDEApplication.java:471)
	at org.eclipse.ui.internal.ide.application.IDEApplication.checkInstanceLocation(IDEApplication.java:251)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:165)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:668)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:605)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1481)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1454)

Tested under this environment:

  • OS & version: Windows 11
  • Eclipse IDE/Platform version (as shown in Help > About): 2024-12 (4.34) I20241018-0730
  • Java version: Eclipse Adoptium jdk-21.0.4.7-hotspot

Community

  • I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.
@jonahgraham jonahgraham added the bug Something isn't working label Oct 18, 2024
@jonahgraham
Copy link
Contributor Author

jonahgraham commented Oct 18, 2024

Looking briefly at the code and error I think the handling of paths in the new code from #2347 is different from the older code. The newer code is using java.nio classes like Path and the old code relied on java.io.File for path handling. On Linux this seems to make little difference, but on Windows there seems to be a problem in how it is handled?

@jonahgraham
Copy link
Contributor Author

I saw this first in development environment, but running just a freshly downloaded SDK shows the problem too:

command line and output from sdk
PS C:\Users\Jonah\eclipse\sdk-latest\eclipse> .\eclipsec -data data -consoleLog
CompileCommand: exclude org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteAnalyzer.getExtendedRange bool exclude = true
WARNING: Using incubator modules: jdk.incubator.vector
Oct 18, 2024 7:45:45 P.M. org.apache.aries.spifly.BaseActivator log
INFO: Registered provider org.slf4j.simple.SimpleServiceProvider of service org.slf4j.spi.SLF4JServiceProvider in bundle slf4j.simple
!SESSION 2024-10-18 19:45:44.545 -----------------------------------------------
eclipse.buildId=4.34.0.I20241018-0730
java.version=21.0.4
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_CA
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -data data -consoleLog

!ENTRY org.eclipse.ui.ide 4 4 2024-10-18 19:45:47.361
!MESSAGE Could not write lock info file

!ENTRY org.eclipse.ui.ide 4 4 2024-10-18 19:45:47.363
!MESSAGE Could not write lock info file
!STACK 0
java.nio.file.InvalidPathException: Illegal char <:> at index 2: /C:/Users/Jonah/eclipse/sdk-latest/eclipse/data/\.metadata\.lock_info
        at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:204)
        at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:175)
        at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
        at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
        at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:231)
        at java.base/java.nio.file.Path.of(Path.java:148)
        at org.eclipse.ui.internal.ide.application.IDEApplication.getLockInfoFile(IDEApplication.java:527)
        at org.eclipse.ui.internal.ide.application.IDEApplication.createLockInfoFile(IDEApplication.java:538)
        at org.eclipse.ui.internal.ide.application.IDEApplication.writeWsLockInfo(IDEApplication.java:471)
        at org.eclipse.ui.internal.ide.application.IDEApplication.checkInstanceLocation(IDEApplication.java:251)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:165)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:668)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:605)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1481)

@iloveeclipse
Copy link
Member

Fortunately it is not a regression but just a bug in a new functionality, so there shouldn't be any other side effects except error log entry. awe will fix it ASAP next week. Thanks for reportikg!

@HannesWell
Copy link
Member

Noticed this as well and already started to prepare a fix. It's now in

@raghucssit
Copy link
Contributor

Noticed this as well and already started to prepare a fix. It's now in

Thanks, I was also checking this.

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

Successfully merging a pull request may close this issue.

4 participants