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

NPE on hover on malformed document #984

Closed
fbricon opened this issue Feb 3, 2021 · 0 comments · Fixed by #1001 or enxio/lsp4xml#122
Closed

NPE on hover on malformed document #984

fbricon opened this issue Feb 3, 2021 · 0 comments · Fixed by #1001 or enxio/lsp4xml#122
Assignees
Labels
bug Something isn't working hover
Milestone

Comments

@fbricon
Copy link
Contributor

fbricon commented Feb 3, 2021

Open an empty xml doc, type some garbage text and hover over it, NPEs will be thrown:

[Info  - 11:56:10 AM] Feb 03, 2021 11:56:10 org.eclipse.lemminx.XMLLanguageServer initialize()
Message: Initializing XML Language server
LemMinX Server info:
 - Version : 0.15.0
 - Native Image
 - VM Version : GraalVM dev Java 8
 - Git [Branch cb5fba5a813a9899d8d602953072efa303c4cf2e] cb5fba5 - [maven-release-plugin] prepare release 0.15.0
[Error - 11:57:21 AM] Feb 03, 2021 11:57:21 org.eclipse.lemminx.services.XMLHover getTextHover()
Message: While performing IHoverParticipant#onText
java.lang.NullPointerException
    at org.eclipse.lemminx.extensions.contentmodel.model.ContentModelManager.findCMDocument(ContentModelManager.java:85)
    at org.eclipse.lemminx.extensions.contentmodel.participants.ContentModelHoverParticipant.onText(ContentModelHoverParticipant.java:148)
    at org.eclipse.lemminx.services.XMLHover.getTextHover(XMLHover.java:207)
    at org.eclipse.lemminx.services.XMLHover.doHover(XMLHover.java:99)
    at org.eclipse.lemminx.services.XMLLanguageService.doHover(XMLLanguageService.java:156)
    at org.eclipse.lemminx.XMLTextDocumentService.lambda$hover$2(XMLTextDocumentService.java:212)
    at java.util.concurrent.CompletableFuture.biApply(CompletableFuture.java:1119)
    at java.util.concurrent.CompletableFuture$BiApply.tryFire(CompletableFuture.java:1084)
    at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:457)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)
    at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
    at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
[Error - 11:57:23 AM] Feb 03, 2021 11:57:23 org.eclipse.lemminx.services.XMLHover getTextHover()
Message: While performing IHoverParticipant#onText
java.lang.NullPointerException
    at org.eclipse.lemminx.extensions.contentmodel.model.ContentModelManager.findCMDocument(ContentModelManager.java:85)
    at org.eclipse.lemminx.extensions.contentmodel.participants.ContentModelHoverParticipant.onText(ContentModelHoverParticipant.java:148)
    at org.eclipse.lemminx.services.XMLHover.getTextHover(XMLHover.java:207)
    at org.eclipse.lemminx.services.XMLHover.doHover(XMLHover.java:99)
    at org.eclipse.lemminx.services.XMLLanguageService.doHover(XMLLanguageService.java:156)
    at org.eclipse.lemminx.XMLTextDocumentService.lambda$hover$2(XMLTextDocumentService.java:212)
    at java.util.concurrent.CompletableFuture.biApply(CompletableFuture.java:1119)
    at java.util.concurrent.CompletableFuture$BiApply.tryFire(CompletableFuture.java:1084)
    at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:457)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)
    at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
    at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
@fbricon fbricon added bug Something isn't working hover labels Feb 3, 2021
angelozerr added a commit to angelozerr/lemminx that referenced this issue Feb 3, 2021
@angelozerr angelozerr self-assigned this Feb 3, 2021
datho7561 pushed a commit to datho7561/lemminx that referenced this issue Mar 8, 2021
Fixes eclipse-lemminx#984

Signed-off-by: azerr <[email protected]>
Signed-off-by: David Thompson <[email protected]>
datho7561 pushed a commit to datho7561/lemminx that referenced this issue Mar 8, 2021
Fixes eclipse-lemminx#984

Signed-off-by: azerr <[email protected]>
Signed-off-by: David Thompson <[email protected]>
datho7561 pushed a commit to datho7561/lemminx that referenced this issue Mar 18, 2021
Fixes eclipse-lemminx#984

Signed-off-by: azerr <[email protected]>
Signed-off-by: David Thompson <[email protected]>
datho7561 pushed a commit to datho7561/lemminx that referenced this issue Mar 18, 2021
Fixes eclipse-lemminx#984

Signed-off-by: azerr <[email protected]>
Signed-off-by: David Thompson <[email protected]>
datho7561 pushed a commit that referenced this issue Mar 18, 2021
Fixes #984

Signed-off-by: azerr <[email protected]>
Signed-off-by: David Thompson <[email protected]>
@datho7561 datho7561 added this to the 0.16.0 milestone Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hover
Projects
None yet
3 participants