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

fix getRelativePathToContextRoot invoked without read-lock #5025

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Will-ShaoHua
Copy link
Contributor

@Will-ShaoHua Will-ShaoHua commented Oct 29, 2024

Description

#5024

java.lang.Throwable: Slow operations are prohibited on EDT. See SlowOperations.assertSlowOperationsAreAllowed javadoc.
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
	at com.intellij.util.SlowOperations.assertSlowOperationsAreAllowed(SlowOperations.java:106)
	at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexDataImpl.ensureIsUpToDate(WorkspaceFileIndexDataImpl.kt:149)
	at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexDataImpl.getFileInfo(WorkspaceFileIndexDataImpl.kt:94)
	at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.getFileInfo(WorkspaceFileIndexImpl.kt:260)
	at com.intellij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.findFileSetWithCustomData(WorkspaceFileIndexImpl.kt:243)
	at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.getContentRootForFile(ProjectFileIndexImpl.java:152)
	at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.getContentRootForFile(ProjectFileIndexImpl.java:146)
	at software.aws.toolkits.jetbrains.services.codewhisperer.editor.CodeWhispererEditorUtil$getRelativePathToContentRoot$1$1$contentRoot$1.invoke(CodeWhispererEditorUtil.kt:80)
	at software.aws.toolkits.jetbrains.services.codewhisperer.editor.CodeWhispererEditorUtil$getRelativePathToContentRoot$1$1$contentRoot$1.invoke(CodeWhispererEditorUtil.kt:80)
	at com.intellij.openapi.application.ActionsKt.runReadAction$lambda$3(actions.kt:31)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction$lambda$3(AnyThreadWriteThreadingSupport.kt:219)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:228)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runReadAction(AnyThreadWriteThreadingSupport.kt:219)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:852)
	at com.intellij.openapi.application.ActionsKt.runReadAction(actions.kt:31)
	at software.aws.toolkits.jetbrains.services.codewhisperer.editor.CodeWhispererEditorUtil.getRelativePathToContentRoot(CodeWhispererEditorUtil.kt:80)
	at software.aws.toolkits.jetbrains.services.codewhisperer.toolwindow.CodeWhispererCodeReferenceManager.insertCodeReference(CodeWhispererCodeReferenceManager.kt:73)
	at software.aws.toolkits.jetbrains.services.cwc.controller.ReferenceLogController.addReferenceLog(ReferenceLogController.kt:36)
	at software.aws.toolkits.jetbrains.services.cwc.inline.InlineChatController$processNewCode$1$4.invoke(InlineChatController.kt:318)
	at software.aws.toolkits.jetbrains.services.cwc.inline.InlineChatController$processNewCode$1$4.invoke(InlineChatController.kt:314)
	at software.aws.toolkits.jetbrains.services.cwc.inline.InlineChatController$diffAcceptHandler$1$1.invokeSuspend(InlineChatController.kt:173)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Will-ShaoHua
Copy link
Contributor Author

incorrect, will update PR

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

Successfully merging this pull request may close these issues.

1 participant