NPE at com.intellij.psi.SmartPointerManager.getInstance

good day.
i'm writing my custom language plugin and added completion for it.

it works fine but today i tried to complete at some language structure where i think i did not tried yet and got NPE

at com.intellij.psi.SmartPointerManager.getInstance(
at com.intellij.codeInsight.lookup.LookupItem.setObject(
at com.intellij.codeInsight.lookup.LookupItem.]]>(
at com.intellij.codeInsight.lookup.LookupItemUtil.objectToLookupItem(
at com.intellij.codeInsight.completion.CompletionVariant.a(
at com.intellij.codeInsight.completion.CompletionVariant.addReferenceCompletions(
at com.intellij.codeInsight.completion.CompletionVariant.addReferenceCompletions(
at com.intellij.codeInsight.completion.CompletionData.completeReference(

Actually SmartPointerManager is openapi so the method is

public static SmartPointerManager getInstance(Project project) {
return project.getComponent(SmartPointerManager.class);

So the problem is in project parameter.

But if i restart idea and try to complete at an ordinary place - it works. But after that special place it does not. The question is what have i
broken so i does not ?

Please sign in to leave a comment.