carlrobertoh / CodeGPT

The leading open-source AI copilot for JetBrains. Connect to any model in any environment, and customize your coding experience in any way you like.
https://codegpt.ee
Apache License 2.0
1.11k stars 234 forks source link

NullPointerException #777

Open marcorotondi opened 2 days ago

marcorotondi commented 2 days ago

What happened?

Ide Internal error notification

Relevant log output or stack trace

java.lang.NullPointerException
    at ee.carlrobert.codegpt.codecompletions.CodeCompletionInsertAction$InsertInlineCompletionHandler.executeWriteAction(CodeCompletionInsertAction.kt:37)
    at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:42)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteAction$lambda$5(AnyThreadWriteThreadingSupport.kt:379)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteAction(AnyThreadWriteThreadingSupport.kt:389)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteAction(AnyThreadWriteThreadingSupport.kt:379)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:896)
    at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.doExecute(EditorWriteActionHandler.java:56)
    at com.intellij.openapi.editor.actionSystem.DynamicEditorActionHandler.doExecute(DynamicEditorActionHandler.java:63)
    at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$4(EditorActionHandler.java:211)
    at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doIfEnabled(EditorActionHandler.java:95)
    at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:210)
    at com.intellij.openapi.editor.actionSystem.EditorAction.executeHandler(EditorAction.java:120)
    at com.intellij.openapi.editor.actionSystem.EditorAction.lambda$actionPerformed$0(EditorAction.java:107)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:226)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:178)
    at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:106)
    at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:83)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.kt:374)
    at com.intellij.openapi.keymap.impl.ActionProcessor.performAction(ActionProcessor.java:32)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$actionProcessor$1.performAction(IdeKeyEventDispatcher.kt:499)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.doPerformActionInner$lambda$8$lambda$7(IdeKeyEventDispatcher.kt:850)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:109)
    at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:98)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.doPerformActionInner$lambda$8(IdeKeyEventDispatcher.kt:850)
    at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.performWithActionCallbacks(ActionManagerImpl.kt:1173)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.kt:396)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.doPerformActionInner(IdeKeyEventDispatcher.kt:848)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.access$doPerformActionInner(IdeKeyEventDispatcher.kt:1)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.kt:577)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.kt:512)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.kt:451)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.kt:444)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.kt:306)
    at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.kt:606)
    at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$22(IdeEventQueue.kt:565)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:565)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16$lambda$15(IdeEventQueue.kt:355)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:857)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16(IdeEventQueue.kt:354)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2$lambda$1(IdeEventQueue.kt:1045)
    at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
    at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:916)
    at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
    at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2(IdeEventQueue.kt:1045)
    at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$3(IdeEventQueue.kt:1054)
    at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:117)
    at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1054)
    at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18(IdeEventQueue.kt:349)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:395)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

Steps to reproduce

No response

CodeGPT version

2.13.0-241.1

Operating System

Linux

marcorotondi commented 1 day ago

Other error probabily related to other

java.lang.IllegalStateException: @NotNull method com/intellij/codeInsight/completion/BaseCompletionLookupArranger.obtainSorter must not return null at com.intellij.codeInsight.completion.BaseCompletionLookupArranger.$$$reportNull$$$0(BaseCompletionLookupArranger.java) at com.intellij.codeInsight.completion.BaseCompletionLookupArranger.obtainSorter(BaseCompletionLookupArranger.java:88) at com.intellij.codeInsight.completion.BaseCompletionLookupArranger.addElement(BaseCompletionLookupArranger.java:167) at com.intellij.codeInsight.completion.CompletionLookupArrangerImpl.addElement(CompletionLookupArrangerImpl.java:27) at com.intellij.codeInsight.lookup.impl.LookupImpl.addItem(LookupImpl.java:303) at ee.carlrobert.codegpt.completions.MethodNameCompletionLookupListener.addCompletionLookupValues$lambda$4(MethodNameCompletionLookupListener.kt:77) at com.intellij.openapi.application.ActionsKt.invokeLater$lambda$5(actions.kt:60) at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:236) at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:25) at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:198) at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread$lambda$2(AnyThreadWriteThreadingSupport.kt:217) at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128) at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread(AnyThreadWriteThreadingSupport.kt:216) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:842) at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:421) at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:101) at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:101) at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:107) at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:101) at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:117) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:43) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722) at java.base/java.security.AccessController.doPrivileged(AccessController.java:400) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:750) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:675) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:573) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16$lambda$15(IdeEventQueue.kt:355) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:857) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16(IdeEventQueue.kt:354) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2$lambda$1(IdeEventQueue.kt:1045) at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24) at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128) at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:916) at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55) at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2(IdeEventQueue.kt:1045) at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$3(IdeEventQueue.kt:1054) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:109) at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1054) at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18(IdeEventQueue.kt:349) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:395) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

whit commented 20 hours ago

Same issue, same version, on MacOS. This error was seen before the latest release but now it also blocks standard line completion provided by IDE itself. So to be able to use PyCharm own local (not AI assistant) completions CodeGPT plugin must be disabled.

carlrobertoh commented 19 hours ago

Thanks for reporting! I will release a hotfix today to address the first error and the one blocking IDE internal line completions. The other issue is not directly related and will be fixed later on.

marcorotondi commented 18 hours ago

Thanks for reporting! I will release a hotfix today to address the first error and the one blocking IDE internal line completions. The other issue is not directly related and will be fixed later on.

Thanks

carlrobertoh commented 16 hours ago

The NPE should be fixed in the latest release (2.13.1). Please let me know if it's still occurring.

whit commented 16 hours ago

It works as before. Error from the second comment is still raised, but it doesn't block other things. Thanks!

marcorotondi commented 14 hours ago

Yes It works!

Thanks

paulwarrentt commented 9 hours ago

Thank you. I came here to report this issue and glad to see it's already fixed.