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

NullPointerException KeywordCompletionProvider.resolveKeyElementForChain #41

Open
hrach opened this issue Jun 17, 2016 · 4 comments
Open

Comments

@hrach
Copy link
Collaborator

hrach commented Jun 17, 2016

java.lang.NullPointerException
    at cz.juzna.intellij.neon.completion.KeywordCompletionProvider.resolveKeyElementForChain(KeywordCompletionProvider.java:202)
    at cz.juzna.intellij.neon.completion.KeywordCompletionProvider.addCompletions(KeywordCompletionProvider.java:115)
    at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
    at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:155)
    at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:81)
    at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:135)
    at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:128)
    at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$2.addCompletions(LiveTemplateCompletionContributor.java:90)
    at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
    at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:155)
    at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:81)
    at com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:110)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator.a(CompletionProgressIndicator.java:817)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator.access$1000(CompletionProgressIndicator.java:88)
    at com.intellij.codeInsight.completion.CompletionProgressIndicator$1CalculateItems.run(CompletionProgressIndicator.java:799)
    at com.intellij.codeInsight.completion.AsyncCompletion$1$1$1.run(CompletionThreading.java:94)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:950)
    at com.intellij.codeInsight.completion.AsyncCompletion$1$1.run(CompletionThreading.java:89)
    at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:142)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:446)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127)
    at com.intellij.codeInsight.completion.AsyncCompletion$1.run(CompletionThreading.java:85)
    at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:369)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
@matej21
Copy link
Collaborator

matej21 commented Jun 17, 2016

Nejakej kod, na kterym to crashuje?

@hrach
Copy link
Collaborator Author

hrach commented Jun 17, 2016

Bohuzel ted nevim, kdyz zjistim, dam vedet, mame more neonu.

@nothrem
Copy link

nothrem commented Apr 9, 2018

Mě to často crashuje, když ručně píšu texty do překladových slovníků. Začalo se to pravděpodobně dít s přechodem na verzi 2018.1

Stačí do novýho souboru zapsat tohle:

items: "{0}You

... a pak to crashne.

null
java.lang.NullPointerException
	at cz.juzna.intellij.neon.completion.KeywordCompletionProvider.resolveKeyElementForChain(KeywordCompletionProvider.java:202)
	at cz.juzna.intellij.neon.completion.KeywordCompletionProvider.addCompletions(KeywordCompletionProvider.java:115)
	at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
	at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:143)
	at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:84)
	at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:149)
	at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:142)
	at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$2.addCompletions(LiveTemplateCompletionContributor.java:90)
	at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
	at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:143)
	at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:84)
	at com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:116)
	at com.intellij.codeInsight.completion.CompletionProgressIndicator.a(CompletionProgressIndicator.java:812)
	at com.intellij.codeInsight.completion.CompletionProgressIndicator.runContributors(CompletionProgressIndicator.java:797)
	at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.a(CodeCompletionHandlerBase.java:293)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1134)
	at com.intellij.codeInsight.completion.AsyncCompletion.tryReadOrCancel(CompletionThreading.java:181)
	at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.a(CodeCompletionHandlerBase.java:290)
	at com.intellij.codeInsight.completion.AsyncCompletion.a(CompletionThreading.java:108)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:157)
	at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:580)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
	at com.intellij.codeInsight.completion.AsyncCompletion.a(CompletionThreading.java:104)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:305)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Když na začátku textu nezadám uvozovku nebo počet {0}, tak to nespadne a nabídne auto-complete pro DummyOutput (kde uprostřed najde "yOu") - Může být potřeba nahradit za jiné slovo, které se bude doplňovat.

@mfn
Copy link

mfn commented Jun 11, 2019

Had this today too:

java.lang.NullPointerException
	at cz.juzna.intellij.neon.completion.KeywordCompletionProvider.resolveKeyElementForChain(KeywordCompletionProvider.java:202)
	at cz.juzna.intellij.neon.completion.KeywordCompletionProvider.addCompletions(KeywordCompletionProvider.java:115)
	at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:37)
	at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:150)
	at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:63)
	at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:148)
	at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:141)
	at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$1.addCompletions(LiveTemplateCompletionContributor.java:77)
	at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:37)
	at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:150)
	at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:63)
	at com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:119)
	at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.performCompletion(CompletionServiceImpl.java:55)
	at com.intellij.codeInsight.completion.CompletionProgressIndicator.calculateItems(CompletionProgressIndicator.java:820)
	at com.intellij.codeInsight.completion.CompletionProgressIndicator.runContributors(CompletionProgressIndicator.java:805)
	at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$null$5(CodeCompletionHandlerBase.java:325)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1114)
	at com.intellij.codeInsight.completion.AsyncCompletion.tryReadOrCancel(CompletionThreading.java:170)
	at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$startContributorThread$6(CodeCompletionHandlerBase.java:317)
	at com.intellij.codeInsight.completion.AsyncCompletion.lambda$null$0(CompletionThreading.java:95)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:171)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:593)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:539)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:158)
	at com.intellij.codeInsight.completion.AsyncCompletion.lambda$startThread$1(CompletionThreading.java:91)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:299)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)

Using PhpStorm 2019.2 EAP
Build #PS-192.4787.17, built on June 6, 2019
PhpStorm EAP User
Expiration date: July 6, 2019
Runtime version: 11.0.3+12-b281.38 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.5
GC: G1 Young Generation, G1 Old Generation
Memory: 8192M
Cores: 12
Registry: run.processes.with.pty=TRUE, undo.documentUndoLimit=1000, debugger.watches.in.variables=false, ide.tooltip.initialDelay=255
Non-Bundled Plugins: IdeaVIM, PlantUML integration, Shifter, Unicode Browser, com.alayouni.ansiHighlight, com.intellij.ideolog, com.ultrahob.zerolength.plugin, net.vektah.codeglance, org.jetbrains.idea.project.template.variables, com.intellij.lang.jsgraphql, com.jetbrains.lang.ejs, NEON support, com.kalessil.phpStorm.phpInspectionsEA, de.espend.idea.laravel, de.espend.idea.php.annotation, org.jetbrains.plugins.node-remote-interpreter, com.intellij.lang.puppet, org.plugin.dot.id, org.psliwa.idea.composer, org.sylfra.idea.plugins.linessorter, ru.adelf.idea.dotenv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants