Completion related NPE in Idea X

Hi all,

When I run my language plugin under Idea X, I get the following exception. Is there something I'm doing wrong, or not doing that I should be? It happens the first time I type in an editor, so I suspect it's the new always complete mode that's causing it, but I'm not sure what I have to do to support this mode.

Cheers,
Colin

java.lang.NullPointerException
    at com.intellij.util.containers.ConcurrentHashMap.computeHashCode(ConcurrentHashMap.java:1372)
    at com.intellij.util.containers.ConcurrentHashMap.remove(ConcurrentHashMap.java:855)
    at com.intellij.openapi.util.KeyedExtensionCollector$1.extensionAdded(KeyedExtensionCollector.java:157)
    at com.intellij.openapi.util.KeyedExtensionCollector$1.extensionAdded(KeyedExtensionCollector.java:154)
    at com.intellij.openapi.extensions.impl.ExtensionPointImpl.addExtensionPointListener(ExtensionPointImpl.java:311)
    at com.intellij.openapi.util.KeyedExtensionCollector.getPoint(KeyedExtensionCollector.java:178)
    at com.intellij.openapi.util.KeyedExtensionCollector.buildExtensions(KeyedExtensionCollector.java:126)
    at com.intellij.codeInsight.completion.CompletionContributor$MyExtensionPointManager.buildExtensions(CompletionContributor.java:258)
    at com.intellij.codeInsight.completion.CompletionContributor$MyExtensionPointManager.buildExtensions(CompletionContributor.java:243)
    at com.intellij.openapi.util.KeyedExtensionCollector.forKey(KeyedExtensionCollector.java:105)
    at com.intellij.codeInsight.completion.CompletionContributor.forLanguage(CompletionContributor.java:240)
    at com.intellij.codeInsight.completion.CodeCompletionHandlerBase$1$1.run(CodeCompletionHandlerBase.java:179)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:834)
    at com.intellij.codeInsight.completion.CodeCompletionHandlerBase$1.run(CodeCompletionHandlerBase.java:190)
    at com.intellij.openapi.command.impl.CommandProcessorImpl.runUndoTransparentAction(CommandProcessorImpl.java:292)
    at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.invokeCompletion(CodeCompletionHandlerBase.java:194)
    at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.invoke(CodeCompletionHandlerBase.java:103)
    at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.invoke(CodeCompletionHandlerBase.java:93)
    at com.intellij.codeInsight.editorActions.CompletionAutoPopupHandler$1.run(CompletionAutoPopupHandler.java:107)
    at com.intellij.util.Alarm$Request$1.run(Alarm.java:227)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:319)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:652)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:505)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:404)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:368)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

3 comments
Comment actions Permalink

I managed to fix this - my completion contributor didn't have the language set in the plugin.xml.

Cheers,
Colin

0
Comment actions Permalink

Hello Colin,

Thanks for the report! I've now added a clearer assertion for this problem.

When I run my language plugin under Idea X, I get the following
exception. Is there something I'm doing wrong, or not doing that I
should be? It happens the first time I type in an editor, so I suspect
it's the new always complete mode that's causing it, but I'm not sure
what I have to do to support this mode.


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Hi Dmitry,

Fantastic, thanks. It's great having the source code :-)

Cheers,
Colin

0

Please sign in to leave a comment.