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

Crash Report: Access is allowed from write thread only; see https://jb.gg/ij-platform-threading for details #177

Open
avro-support-error-reporter bot opened this issue Sep 5, 2024 · 1 comment
Assignees
Labels
bug Something isn't working crash report Crash Reported by the plugin

Comments

@avro-support-error-reporter
Copy link

Crash Report

What happened

(The user did not submit additional information)

Context information

  • Plugin: Avro Schema Support 223.3.2 by Oscar Westra van Holthe - Kind (id: net.sf.opk.avro-schema-support)
  • IDE: IntelliJ IDEA 2024.2.1
  • JVM: OpenJDK 64-Bit Server VM (JetBrains s.r.o.) 21.0.3+13-b509.11
  • OS: Mac OS X (aarch64) 14.6.1

Exception

Exceptions occurred on invoking the intention 'Replace protocol with schema syntax' (class opwvhk.intellij.avro_idl.inspections.AvroIdlUseSchemaSyntaxInspection$ReplaceProtocolWithSchemaSyntaxQuickFix) on a copy of the file.

com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Access is allowed from write thread only; see https://jb.gg/ij-platform-threading for details
Current thread: Thread[#422,ApplicationImpl pooled thread 12,4,main] 2131649370 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[#102,AWT-EventQueue-0,6,main] 940663465
	at com.intellij.util.concurrency.ThreadingAssertions.createThreadAccessException(ThreadingAssertions.java:177)
	at com.intellij.util.concurrency.ThreadingAssertions.throwThreadAccessException(ThreadingAssertions.java:172)
	at com.intellij.util.concurrency.ThreadingAssertions.throwWriteIntentReadAccess(ThreadingAssertions.java:157)
	at com.intellij.util.concurrency.ThreadingAssertions.assertWriteIntentReadAccess(ThreadingAssertions.java:149)
	at com.intellij.openapi.application.impl.ApplicationImpl.assertWriteIntentLockAcquired(ApplicationImpl.java:940)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:200)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:178)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:168)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:154)
	at opwvhk.intellij.avro_idl.inspections.SimpleAvroIdlQuickFixOnPsiElement.invoke(SimpleAvroIdlQuickFixOnPsiElement.java:69)
	at com.intellij.codeInspection.LocalQuickFixAndIntentionActionOnPsiElement.invoke(LocalQuickFixAndIntentionActionOnPsiElement.java:31)
	at com.intellij.codeInsight.intention.IntentionAction.generatePreview(IntentionAction.java:116)
	at com.intellij.codeInsight.intention.impl.IntentionActionWithTextCaching$MyIntentionAction.generatePreview(IntentionActionWithTextCaching.java:262)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable$invokePreview$1$1$1.invoke(IntentionPreviewComputable.kt:124)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable$invokePreview$1$1$1.invoke(IntentionPreviewComputable.kt:123)
	at com.intellij.model.SideEffectGuard$Companion.computeWithAllowedSideEffectsBlocking(SideEffectGuard.kt:42)
	at com.intellij.model.SideEffectGuard$Companion.computeWithoutSideEffects(SideEffectGuard.kt:27)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable.invokePreview$lambda$2$lambda$1(IntentionPreviewComputable.kt:123)
	at com.intellij.psi.impl.source.PostprocessReformattingAspectImpl.lambda$postponeFormattingInside$2(PostprocessReformattingAspectImpl.java:137)
	at com.intellij.psi.impl.source.PostprocessReformattingAspectImpl.postponeFormattingInside(PostprocessReformattingAspectImpl.java:146)
	at com.intellij.psi.impl.source.PostprocessReformattingAspectImpl.postponeFormattingInside(PostprocessReformattingAspectImpl.java:136)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable.invokePreview$lambda$2(IntentionPreviewComputable.kt:122)
	at com.intellij.codeInsight.intention.preview.IntentionPreviewUtils.previewSession(IntentionPreviewUtils.java:123)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable.invokePreview(IntentionPreviewComputable.kt:121)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable.generatePreview(IntentionPreviewComputable.kt:90)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable.tryCreateDiffContent(IntentionPreviewComputable.kt:66)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewComputable.call(IntentionPreviewComputable.kt:44)
	at com.intellij.codeInsight.intention.impl.IntentionHintComponent$IntentionPopup.lambda$getPreviewHandler$3(IntentionHintComponent.java:780)
	at com.intellij.codeInsight.intention.impl.preview.PreviewHandler.lambda$new$0(PreviewHandler.java:53)
	at com.intellij.codeInsight.intention.impl.preview.IntentionPreviewPopupUpdateProcessor.updatePopup$lambda$1(IntentionPreviewPopupUpdateProcessor.kt:108)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor.callWrapped(NonBlockingReadActionImpl.java:840)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor$MonitoredComputation.call(NonBlockingReadActionImpl.java:872)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:604)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$4(NonBlockingReadActionImpl.java:567)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:291)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:965)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:93)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:66)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:155)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:138)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:98)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:217)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:98)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:135)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:93)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:567)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:466)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$2(NonBlockingReadActionImpl.java:481)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
	at java.base/java.lang.Thread.run(Thread.java:1583)
@avro-support-error-reporter avro-support-error-reporter bot added the crash report Crash Reported by the plugin label Sep 5, 2024
@opwvhk opwvhk self-assigned this Sep 5, 2024
@opwvhk opwvhk added the bug Something isn't working label Sep 5, 2024
@opwvhk opwvhk closed this as completed in e7085ef Sep 5, 2024
opwvhk added a commit that referenced this issue Sep 12, 2024
@opwvhk opwvhk reopened this Sep 30, 2024
@opwvhk
Copy link
Owner

opwvhk commented Sep 30, 2024

There's another issue here: generating the preview is also a write action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working crash report Crash Reported by the plugin
Projects
None yet
Development

No branches or pull requests

1 participant