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 when selecting a function from an unknown package #34

Closed
sarnowski opened this issue Jul 22, 2011 · 3 comments
Closed

NPE when selecting a function from an unknown package #34

sarnowski opened this issue Jul 22, 2011 · 3 comments
Assignees
Labels

Comments

@sarnowski
Copy link

By selecting I mean e.g. clicking on the function name in the code or moving the cursor to the name or triggering some action on it (e.q. ctrl+q for documentation).

To reproduce you can use the following code:
https://code.google.com/appengine/docs/go/gettingstarted/usingdatastore.html

Just click on "NewQuery" in line 25.

[ 852049]  ERROR - aemon.impl.PassExecutorService - null 
java.lang.NullPointerException
    at com.intellij.psi.impl.SharedPsiElementImplUtil.a(SharedPsiElementImplUtil.java:73)
    at com.intellij.psi.impl.SharedPsiElementImplUtil.findReferenceAt(SharedPsiElementImplUtil.java:49)
    at com.intellij.psi.impl.SharedPsiElementImplUtil.findReferenceAt(SharedPsiElementImplUtil.java:63)
    at com.intellij.extapi.psi.PsiElementBase.findReferenceAt(PsiElementBase.java:122)
    at com.intellij.psi.SingleRootFileViewProvider.a(SingleRootFileViewProvider.java:369)
    at com.intellij.psi.SingleRootFileViewProvider.findReferenceAt(SingleRootFileViewProvider.java:338)
    at com.intellij.psi.impl.source.PsiFileImpl.findReferenceAt(PsiFileImpl.java:520)
    at com.intellij.codeInsight.intention.impl.ConvertAbsolutePathToRelativeIntentionAction.isAvailable(ConvertAbsolutePathToRelativeIntentionAction.java:46)
    at com.intellij.codeInsight.intention.PsiElementBaseIntentionAction.isAvailable(PsiElementBaseIntentionAction.java:49)
    at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.isAvailable(IntentionActionWrapper.java:52)
    at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.a(ShowIntentionActionsHandler.java:104)
    at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.availableFor(ShowIntentionActionsHandler.java:95)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass$1.process(ShowIntentionsPass.java:204)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass$1.process(ShowIntentionsPass.java:202)
    at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseBetweenHostAndInjected(ShowIntentionActionsHandler.java:129)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.getActionsToShow(ShowIntentionsPass.java:201)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.b(ShowIntentionsPass.java:152)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.doCollectInformation(ShowIntentionsPass.java:127)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:58)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:348)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1013)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:340)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:209)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:338)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:314)
    at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:133)
    at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:130)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
    at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)
    at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:113)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
[ 852049]  ERROR - aemon.impl.PassExecutorService - IntelliJ IDEA 10.5.1  Build #IU-107.322 
[ 852049]  ERROR - aemon.impl.PassExecutorService - JDK: 1.6.0_26 
[ 852049]  ERROR - aemon.impl.PassExecutorService - VM: Java HotSpot(TM) 64-Bit Server VM 
[ 852049]  ERROR - aemon.impl.PassExecutorService - Vendor: Sun Microsystems Inc. 
[ 852049]  ERROR - aemon.impl.PassExecutorService - OS: Linux 
[ 852049]  ERROR - aemon.impl.PassExecutorService - Last Action: EditorDown 
[ 852050]  ERROR - aemon.impl.PassExecutorService - null 
java.lang.NullPointerException
    at com.intellij.psi.impl.SharedPsiElementImplUtil.a(SharedPsiElementImplUtil.java:73)
    at com.intellij.psi.impl.SharedPsiElementImplUtil.findReferenceAt(SharedPsiElementImplUtil.java:49)
    at com.intellij.psi.impl.SharedPsiElementImplUtil.findReferenceAt(SharedPsiElementImplUtil.java:63)
    at com.intellij.extapi.psi.PsiElementBase.findReferenceAt(PsiElementBase.java:122)
    at com.intellij.psi.SingleRootFileViewProvider.a(SingleRootFileViewProvider.java:369)
    at com.intellij.psi.SingleRootFileViewProvider.findReferenceAt(SingleRootFileViewProvider.java:338)
    at com.intellij.psi.impl.source.PsiFileImpl.findReferenceAt(PsiFileImpl.java:520)
    at com.intellij.codeInsight.intention.impl.ConvertAbsolutePathToRelativeIntentionAction.isAvailable(ConvertAbsolutePathToRelativeIntentionAction.java:46)
    at com.intellij.codeInsight.intention.PsiElementBaseIntentionAction.isAvailable(PsiElementBaseIntentionAction.java:49)
    at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.isAvailable(IntentionActionWrapper.java:52)
    at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.a(ShowIntentionActionsHandler.java:104)
    at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.availableFor(ShowIntentionActionsHandler.java:95)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass$1.process(ShowIntentionsPass.java:204)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass$1.process(ShowIntentionsPass.java:202)
    at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseBetweenHostAndInjected(ShowIntentionActionsHandler.java:129)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.getActionsToShow(ShowIntentionsPass.java:201)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.b(ShowIntentionsPass.java:152)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.doCollectInformation(ShowIntentionsPass.java:127)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:58)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:348)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1013)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:340)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:209)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:338)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:314)
    at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:133)
    at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:130)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
    at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)
    at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:113)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
[ 852050]  ERROR - aemon.impl.PassExecutorService - IntelliJ IDEA 10.5.1  Build #IU-107.322 
[ 852050]  ERROR - aemon.impl.PassExecutorService - JDK: 1.6.0_26 
[ 852050]  ERROR - aemon.impl.PassExecutorService - VM: Java HotSpot(TM) 64-Bit Server VM 
[ 852050]  ERROR - aemon.impl.PassExecutorService - Vendor: Sun Microsystems Inc. 
[ 852050]  ERROR - aemon.impl.PassExecutorService - OS: Linux 
[ 852050]  ERROR - aemon.impl.PassExecutorService - Last Action: EditorDown 
[ 852050]  ERROR - currency.PrioritizedFutureTask - java.lang.NullPointerException 
java.util.concurrent.ExecutionException: java.lang.NullPointerException
    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
    at java.util.concurrent.FutureTask.get(FutureTask.java:83)
    at com.intellij.concurrency.PrioritizedFutureTask.access$301(PrioritizedFutureTask.java:31)
    at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:77)
    at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:113)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
    at com.intellij.psi.impl.SharedPsiElementImplUtil.a(SharedPsiElementImplUtil.java:73)
    at com.intellij.psi.impl.SharedPsiElementImplUtil.findReferenceAt(SharedPsiElementImplUtil.java:49)
    at com.intellij.psi.impl.SharedPsiElementImplUtil.findReferenceAt(SharedPsiElementImplUtil.java:63)
    at com.intellij.extapi.psi.PsiElementBase.findReferenceAt(PsiElementBase.java:122)
    at com.intellij.psi.SingleRootFileViewProvider.a(SingleRootFileViewProvider.java:369)
    at com.intellij.psi.SingleRootFileViewProvider.findReferenceAt(SingleRootFileViewProvider.java:338)
    at com.intellij.psi.impl.source.PsiFileImpl.findReferenceAt(PsiFileImpl.java:520)
    at com.intellij.codeInsight.intention.impl.ConvertAbsolutePathToRelativeIntentionAction.isAvailable(ConvertAbsolutePathToRelativeIntentionAction.java:46)
    at com.intellij.codeInsight.intention.PsiElementBaseIntentionAction.isAvailable(PsiElementBaseIntentionAction.java:49)
    at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.isAvailable(IntentionActionWrapper.java:52)
    at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.a(ShowIntentionActionsHandler.java:104)
    at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.availableFor(ShowIntentionActionsHandler.java:95)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass$1.process(ShowIntentionsPass.java:204)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass$1.process(ShowIntentionsPass.java:202)
    at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseBetweenHostAndInjected(ShowIntentionActionsHandler.java:129)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.getActionsToShow(ShowIntentionsPass.java:201)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.b(ShowIntentionsPass.java:152)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.doCollectInformation(ShowIntentionsPass.java:127)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:58)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:348)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1013)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:340)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:209)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:338)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:314)
    at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:133)
    at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:130)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
    at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)
    ... 4 more
[ 852050]  ERROR - currency.PrioritizedFutureTask - IntelliJ IDEA 10.5.1  Build #IU-107.322 
[ 852050]  ERROR - currency.PrioritizedFutureTask - JDK: 1.6.0_26 
[ 852050]  ERROR - currency.PrioritizedFutureTask - VM: Java HotSpot(TM) 64-Bit Server VM 
[ 852050]  ERROR - currency.PrioritizedFutureTask - Vendor: Sun Microsystems Inc. 
[ 852051]  ERROR - currency.PrioritizedFutureTask - OS: Linux 
[ 852051]  ERROR - currency.PrioritizedFutureTask - Last Action: EditorDown 
[ 852051]  ERROR - currency.PrioritizedFutureTask - Original exception:  
java.lang.NullPointerException
    at com.intellij.psi.impl.SharedPsiElementImplUtil.a(SharedPsiElementImplUtil.java:73)
    at com.intellij.psi.impl.SharedPsiElementImplUtil.findReferenceAt(SharedPsiElementImplUtil.java:49)
    at com.intellij.psi.impl.SharedPsiElementImplUtil.findReferenceAt(SharedPsiElementImplUtil.java:63)
    at com.intellij.extapi.psi.PsiElementBase.findReferenceAt(PsiElementBase.java:122)
    at com.intellij.psi.SingleRootFileViewProvider.a(SingleRootFileViewProvider.java:369)
    at com.intellij.psi.SingleRootFileViewProvider.findReferenceAt(SingleRootFileViewProvider.java:338)
    at com.intellij.psi.impl.source.PsiFileImpl.findReferenceAt(PsiFileImpl.java:520)
    at com.intellij.codeInsight.intention.impl.ConvertAbsolutePathToRelativeIntentionAction.isAvailable(ConvertAbsolutePathToRelativeIntentionAction.java:46)
    at com.intellij.codeInsight.intention.PsiElementBaseIntentionAction.isAvailable(PsiElementBaseIntentionAction.java:49)
    at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.isAvailable(IntentionActionWrapper.java:52)
    at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.a(ShowIntentionActionsHandler.java:104)
    at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.availableFor(ShowIntentionActionsHandler.java:95)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass$1.process(ShowIntentionsPass.java:204)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass$1.process(ShowIntentionsPass.java:202)
    at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseBetweenHostAndInjected(ShowIntentionActionsHandler.java:129)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.getActionsToShow(ShowIntentionsPass.java:201)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.b(ShowIntentionsPass.java:152)
    at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.doCollectInformation(ShowIntentionsPass.java:127)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:58)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:348)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1013)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:340)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:209)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:338)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:314)
    at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:133)
    at com.intellij.concurrency.JobUtil$3.call(JobUtil.java:130)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at com.intellij.concurrency.PrioritizedFutureTask.access$101(PrioritizedFutureTask.java:31)
    at com.intellij.concurrency.PrioritizedFutureTask$1.run(PrioritizedFutureTask.java:70)
    at com.intellij.concurrency.PrioritizedFutureTask.run(PrioritizedFutureTask.java:113)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
@mtoader
Copy link
Member

mtoader commented Jul 22, 2011

I have to investigate this :). I see no call from the plugin in there thou. :(

@mtoader
Copy link
Member

mtoader commented Jul 22, 2011

I am able to reproduce this.

@ghost ghost assigned mtoader Jul 22, 2011
@mtoader
Copy link
Member

mtoader commented Aug 7, 2011

Fixed in 0.4.0 plugin build (GoIde 1.0)

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

No branches or pull requests

2 participants