redhat-developer / redhat-developer/vscode-java

Starting language server crashes

Open
#370 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

ls-error/crash
Dominant language
TypeScript
Stars
2.3k
Forks
547
Avg merge
20h 1m
Merged PRs (30d)
11

Description

When building SAP hybris from the command line (outside of vscode) with ant, nearly all class files get regenerated.
Afterwards the langage server hangs at 22-24% and outputs the error logs down below.

Environment
  • Operating System: macOS 10.12.6 (16G1036)
  • JDK version: 1.8.0_144
  • Visual Studio Code version: Version 1.18.0 (1.18.0)
  • Java extension version: 0.14.0
Steps To Reproduce
  1. Start vscode and load a java file -> language server gets invoked
  2. rebuild whole SAP hybris suite (several 10k classes)
    3 switch back to vscode -> the language server tries to refresh and crashes

[attach a sample project reproducing the error]
attach logs

Current Result
[Error - 15:42:07] 16.11.2017 15:40:54 Invalid project description.
[Error - 15:42:07] 16.11.2017 15:40:54 An internal error occurred during: "Initialize Workspace".
org.eclipse.core.internal.resources.ResourceException: Invalid project description.
java.lang.RuntimeException: org.eclipse.core.internal.resources.ResourceException: Invalid project description.
	at org.eclipse.jdt.ls.core.internal.managers.EclipseProjectImporter.importDir(EclipseProjectImporter.java:96)
	at org.eclipse.jdt.ls.core.internal.managers.EclipseProjectImporter.lambda$0(EclipseProjectImporter.java:63)
	at java.util.ArrayList.forEach(ArrayList.java:1249)
	at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1080)
	at org.eclipse.jdt.ls.core.internal.managers.EclipseProjectImporter.importToWorkspace(EclipseProjectImporter.java:63)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.importProjects(ProjectsManager.java:100)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.access$1(ProjectsManager.java:94)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager$1.run(ProjectsManager.java:88)
	at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39)
	at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:724)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
	at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:5660)
	at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:5617)
	at org.eclipse.jdt.ls.core.internal.managers.ProjectsManager.initializeProjects(ProjectsManager.java:82)
	at org.eclipse.jdt.ls.core.internal.handlers.InitHandler$1.runInWorkspace(InitHandler.java:157)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: org.eclipse.core.internal.resources.ResourceException: Invalid project description.
	at org.eclipse.core.internal.resources.Project.checkDescription(Project.java:169)
	at org.eclipse.core.internal.resources.Project.assertCreateRequirements(Project.java:53)
	at org.eclipse.core.internal.resources.Project.create(Project.java:263)
	at org.eclipse.core.internal.resources.Project.create(Project.java:247)
	at org.eclipse.jdt.ls.core.internal.managers.EclipseProjectImporter.importDir(EclipseProjectImporter.java:92)
	... 17 more
Expected Result

Don't crash

Additional Informations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the crash by opening a Java file in VS Code and rebuilding the SAP hybris suite with Ant, using the stated macOS and JDK environment if available. Start with the stack trace at EclipseProjectImporter.java:96 and follow initialization through ProjectsManager and InitHandler. Done means the language server completes workspace refresh without the Invalid project description error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.