开发者社区 > 通义灵码 > AI编码助手 > 正文

PycharmID环境下,通义灵码程序崩溃

已解决

  1. 系统环境:
    Windows 11家庭中文版22H2,22621.3007
    Jetbrain PyCharm 2023.3.3 (Professional Edition)
    
  2. 出现问题:
    我正在写程序,未主动使用对话功能,突然弹窗提醒IDE内部错误,为tongyi lingma插件出错,报错信息如下:
    java.lang.IllegalArgumentException: Argument for @NotNull parameter 'virtualFile' of com/jetbrains/python/psi/resolve/QualifiedNameFinder.findCachedShortestImportableName must not be null
     at com.jetbrains.python.psi.resolve.QualifiedNameFinder.$$$reportNull$$$0(QualifiedNameFinder.java)
     at com.jetbrains.python.psi.resolve.QualifiedNameFinder.findCachedShortestImportableName(QualifiedNameFinder.java)
     at com.jetbrains.python.statistics.PyCompletionStatisticLogger.getAdditionalUsageData(PyComplectionLogger.kt:23)
     at com.intellij.codeInsight.lookup.impl.LookupUsageTracker$MyLookupTracker.lambda$triggerLookupUsed$0(LookupUsageTracker.java:180)
     at com.intellij.openapi.extensions.impl.ExtensionProcessingHelper.forEachExtensionSafe(ExtensionProcessingHelper.kt:34)
     at com.intellij.openapi.extensions.ExtensionPointName.forEachExtensionSafe(ExtensionPointName.kt:50)
     at com.intellij.codeInsight.lookup.impl.LookupUsageTracker$MyLookupTracker.triggerLookupUsed(LookupUsageTracker.java:178)
     at com.intellij.codeInsight.lookup.impl.LookupUsageTracker$MyLookupTracker.itemSelected(LookupUsageTracker.java:156)
     at com.intellij.codeInsight.lookup.impl.LookupImpl.fireItemSelected(LookupImpl.java:981)
     at com.intellij.codeInsight.lookup.impl.LookupImpl.finishLookupInWritableFile(LookupImpl.java:605)
     at com.intellij.codeInsight.lookup.impl.LookupImpl.lambda$finishLookup$8(LookupImpl.java:563)
     at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:216)
     at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:177)
     at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:167)
     at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:153)
     at com.intellij.codeInsight.lookup.impl.LookupImpl.finishLookup(LookupImpl.java:563)
     at com.intellij.codeInsight.lookup.impl.LookupImpl.finishLookup(LookupImpl.java:548)
     at com.intellij.codeInsight.lookup.impl.actions.ChooseItemAction$Handler.doExecute(ChooseItemAction.java:57)
     at com.intellij.openapi.editor.actionSystem.DynamicEditorActionHandler.doExecute(DynamicEditorActionHandler.java:63)
     at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$4(EditorActionHandler.java:199)
     at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doIfEnabled(EditorActionHandler.java:89)
     at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:198)
     at com.alibabacloud.intellij.cosy.editor.CosyEditorActionHandler.doExecute(CosyEditorActionHandler.java:81)
     at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$4(EditorActionHandler.java:199)
     at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doIfEnabled(EditorActionHandler.java:89)
     at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:198)
     at com.intellij.openapi.editor.actionSystem.EditorAction.lambda$actionPerformed$0(EditorAction.java:92)
     at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:225)
     at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:177)
     at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:101)
     at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:77)
     at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:344)
     at com.intellij.openapi.keymap.impl.ActionProcessor.performAction(ActionProcessor.java:32)
     at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$myActionProcessor$1.performAction(IdeKeyEventDispatcher.kt:496)
     at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.doPerformActionInner$lambda$4$lambda$3(IdeKeyEventDispatcher.kt:831)
     at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:106)
     at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:95)
     at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.doPerformActionInner$lambda$4(IdeKeyEventDispatcher.kt:831)
     at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:381)
     at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.doPerformActionInner(IdeKeyEventDispatcher.kt:829)
     at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.access$doPerformActionInner(IdeKeyEventDispatcher.kt:1)
     at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction$intellij_platform_ide_impl(IdeKeyEventDispatcher.kt:559)
     at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.kt:509)
     at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.kt:448)
     at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.kt:441)
     at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.kt:303)
     at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.kt:620)
     at com.intellij.ide.IdeEventQueue._dispatchEvent$lambda$11(IdeEventQueue.kt:581)
     at com.intellij.openapi.application.impl.RwLockHolder.runWithEnabledImplicitRead(RwLockHolder.kt:75)
     at com.intellij.openapi.application.impl.RwLockHolder.runWithImplicitRead(RwLockHolder.kt:67)
     at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:581)
     at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:72)
     at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:355)
     at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:354)
     at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:793)
     at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:354)
     at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:349)
     at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:1014)
     at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:114)
     at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1014)
     at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:349)
     at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:848)
     at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:391)
     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)
    
  3. 尝试复现
    尝试复现失败,插件之后便无法使用。主动提问题就提示“网络连接超时”,自动补全功能无效,可能是在阅读我的代码,进行代码补全过程中崩溃。

2.6 17:40更新:问题再次出现。
image.png
image.png
错误代码相同,这次是在代码补全过程中发生崩溃。
问题出自

java.lang.IllegalArgumentException: Argument for @NotNull parameter 'virtualFile' of com/jetbrains/python/psi/resolve/QualifiedNameFinder.findCachedShortestImportableName must not be null

看上去像是个空地址错误...?
希望工程师大大能够解决,万分感谢!

展开
收起
狐狸汉克 2024-02-06 13:07:30 86 0
1 条回答
写回答
取消 提交回答
  • 欢迎使用通义灵码:https://tongyi.aliyun.com/lingma/
    官方回答

    感谢反馈,看这个堆栈是调用了ide原生的补全api触发的内部报错,我们看看有没有什么绕过的办法。

    2024-02-18 16:49:35
    赞同 展开评论 打赏

基于通义大模型的 AI 编码辅助工具,支持代码智能生成、单元测试生成、问题排查、研发智能问答等功能,为开发者带来高效、流畅的编码体验。

热门讨论

热门文章

相关电子书

更多
AI 编程技术周 | 通义灵码公开课 第一期 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载