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

Too many non-blocking read actions submitted at once. #74

Open
vivekmore opened this issue May 19, 2021 · 5 comments
Open

Too many non-blocking read actions submitted at once. #74

vivekmore opened this issue May 19, 2021 · 5 comments

Comments

@vivekmore
Copy link

I got the following exception when I used the Ignore all unmapped target properties action

java.lang.Throwable: Too many non-blocking read actions submitted at once. Please use coalesceBy, BoundedTaskExecutor or another way of limiting the number of concurrently running threads.: 11 with similar stack traces are currently active
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:161)
	at com.intellij.openapi.application.impl.SubmissionTracker.preventTooManySubmissions(SubmissionTracker.java:45)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.<init>(NonBlockingReadActionImpl.java:231)
	at com.intellij.openapi.application.impl.NonBlockingReadActionImpl.submit(NonBlockingReadActionImpl.java:191)
	at com.intellij.refactoring.suggested.SuggestedRefactoringChangeCollector.amendStateInBackground(SuggestedRefactoringChangeCollector.kt:94)
	at com.intellij.refactoring.suggested.SuggestedRefactoringChangeCollector.nextSignature(SuggestedRefactoringChangeCollector.kt:42)
	at com.intellij.refactoring.suggested.SuggestedRefactoringChangeListener$MyDocumentListener.performWhenAllCommitted(SuggestedRefactoringChangeListener.kt:288)
	at com.intellij.refactoring.suggested.SuggestedRefactoringChangeListener$MyDocumentListener.access$performWhenAllCommitted(SuggestedRefactoringChangeListener.kt:189)
	at com.intellij.refactoring.suggested.SuggestedRefactoringChangeListener$MyDocumentListener$documentChanged$1.invoke(SuggestedRefactoringChangeListener.kt:250)
	at com.intellij.refactoring.suggested.SuggestedRefactoringChangeListener$MyDocumentListener$documentChanged$1.invoke(SuggestedRefactoringChangeListener.kt:189)
	at com.intellij.refactoring.suggested.SuggestedRefactoringChangeListener$sam$java_lang_Runnable$0.run(SuggestedRefactoringChangeListener.kt)
	at com.intellij.psi.impl.PsiDocumentManagerBase.performWhenAllCommitted(PsiDocumentManagerBase.java:584)
	at com.intellij.psi.impl.PsiDocumentManagerBase.performWhenAllCommitted(PsiDocumentManagerBase.java:575)
	at com.intellij.refactoring.suggested.SuggestedRefactoringChangeListener$MyDocumentListener.documentChanged(SuggestedRefactoringChangeListener.kt:250)
	at jdk.internal.reflect.GeneratedMethodAccessor449.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.intellij.util.EventDispatcher.dispatchVoidMethod(EventDispatcher.java:123)
	at com.intellij.util.EventDispatcher.lambda$createMulticaster$1(EventDispatcher.java:86)
	at com.sun.proxy.$Proxy91.documentChanged(Unknown Source)
	at com.intellij.openapi.editor.impl.DocumentImpl.changedUpdate(DocumentImpl.java:916)
	at com.intellij.openapi.editor.impl.DocumentImpl.updateText(DocumentImpl.java:820)
	at com.intellij.openapi.editor.impl.DocumentImpl.replaceString(DocumentImpl.java:660)
	at com.intellij.openapi.editor.impl.DocumentImpl.replaceString(DocumentImpl.java:597)
	at com.intellij.psi.impl.PsiToDocumentSynchronizer.doCommitTransaction(PsiToDocumentSynchronizer.java:212)
	at com.intellij.psi.impl.PsiToDocumentSynchronizer.lambda$commitTransaction$1(PsiToDocumentSynchronizer.java:188)
	at com.intellij.psi.impl.PsiToDocumentSynchronizer.lambda$doSync$0(PsiToDocumentSynchronizer.java:106)
	at com.intellij.psi.impl.PsiToDocumentSynchronizer.performAtomically(PsiToDocumentSynchronizer.java:124)
	at com.intellij.psi.impl.PsiToDocumentSynchronizer.doSync(PsiToDocumentSynchronizer.java:106)
	at com.intellij.psi.impl.PsiToDocumentSynchronizer.commitTransaction(PsiToDocumentSynchronizer.java:188)
	at com.intellij.pom.core.impl.PomModelImpl.commitTransaction(PomModelImpl.java:197)
	at com.intellij.pom.core.impl.PomModelImpl.lambda$runTransaction$1(PomModelImpl.java:152)
	at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:567)
	at com.intellij.pom.core.impl.PomModelImpl.lambda$runTransaction$2(PomModelImpl.java:104)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:218)
	at com.intellij.pom.core.impl.PomModelImpl.runTransaction(PomModelImpl.java:93)
	at com.intellij.psi.impl.source.tree.ChangeUtil.prepareAndRunChangeAction(ChangeUtil.java:142)
	at com.intellij.psi.impl.source.tree.CompositeElement.addChild(CompositeElement.java:579)
	at com.intellij.psi.impl.source.tree.CompositeElement.addChildren(CompositeElement.java:673)
	at com.intellij.psi.impl.source.codeStyle.CodeEditUtil.addChildren(CodeEditUtil.java:53)
	at com.intellij.psi.impl.source.tree.CompositeElement.addInternal(CompositeElement.java:447)
	at com.intellij.psi.impl.source.tree.java.AnnotationParamListElement.addInternal(AnnotationParamListElement.java:104)
	at com.intellij.psi.impl.source.JavaStubPsiElement.addBefore(JavaStubPsiElement.java:63)
	at com.intellij.psi.impl.PsiImplUtil.setDeclaredAttributeValue(PsiImplUtil.java:506)
	at com.intellij.psi.impl.source.tree.java.PsiAnnotationImpl.setDeclaredAttributeValue(PsiAnnotationImpl.java:57)
	at com.intellij.codeInsight.intention.AddAnnotationPsiFix.addPhysicalAnnotationTo(AddAnnotationPsiFix.java:293)
	at com.intellij.codeInsight.intention.AddAnnotationPsiFix.addPhysicalAnnotation(AddAnnotationPsiFix.java:236)
	at org.mapstruct.intellij.util.MapstructAnnotationUtils.lambda$addMappingAnnotation$2(MapstructAnnotationUtils.java:101)
	at com.intellij.openapi.command.WriteCommandAction.lambda$runWriteCommandAction$4(WriteCommandAction.java:347)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$1(WriteCommandAction.java:143)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:959)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$2(WriteCommandAction.java:141)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:207)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:182)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.doRunWriteCommandAction(WriteCommandAction.java:150)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.run(WriteCommandAction.java:117)
	at com.intellij.openapi.command.WriteCommandAction.runWriteCommandAction(WriteCommandAction.java:347)
	at org.mapstruct.intellij.util.MapstructAnnotationUtils.runWriteCommandAction(MapstructAnnotationUtils.java:166)
	at org.mapstruct.intellij.util.MapstructAnnotationUtils.addMappingAnnotation(MapstructAnnotationUtils.java:91)
	at org.mapstruct.intellij.inspection.UnmappedTargetPropertiesInspection$UnmappedTargetPropertyFix.invoke(UnmappedTargetPropertiesInspection.java:238)
	at com.intellij.codeInspection.LocalQuickFixOnPsiElement.applyFix(LocalQuickFixOnPsiElement.java:100)
	at com.intellij.codeInspection.LocalQuickFixOnPsiElement.applyFix(LocalQuickFixOnPsiElement.java:90)
	at com.intellij.codeInspection.LocalQuickFixOnPsiElement.applyFix(LocalQuickFixOnPsiElement.java:22)
	at com.intellij.codeInspection.ex.QuickFixWrapper.invoke(QuickFixWrapper.java:78)
	at com.intellij.codeInsight.intention.impl.IntentionActionWithTextCaching$MyIntentionAction.lambda$invoke$0(IntentionActionWithTextCaching.java:209)
	at com.intellij.util.SlowOperations.lambda$allowSlowOperations$0(SlowOperations.java:77)
	at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:64)
	at com.intellij.util.SlowOperations.allowSlowOperations(SlowOperations.java:76)
	at com.intellij.codeInsight.intention.impl.IntentionActionWithTextCaching$MyIntentionAction.invoke(IntentionActionWithTextCaching.java:209)
	at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.lambda$invokeIntention$4(ShowIntentionActionsHandler.java:251)
	at com.intellij.openapi.application.WriteAction.lambda$run$1(WriteAction.java:105)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:947)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:973)
	at com.intellij.openapi.application.WriteAction.run(WriteAction.java:104)
	at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.invokeIntention(ShowIntentionActionsHandler.java:251)
	at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.lambda$chooseActionAndInvoke$3(ShowIntentionActionsHandler.java:227)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:216)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:172)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:162)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:148)
	at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseActionAndInvoke(ShowIntentionActionsHandler.java:226)
	at com.intellij.codeInsight.intention.impl.IntentionListStep.lambda$applyAction$3(IntentionListStep.java:135)
	at com.intellij.ide.IdeEventQueue.onFocusEvent(IdeEventQueue.java:569)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:486)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:781)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:502)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

@filiphr
Copy link
Member

filiphr commented May 19, 2021

How many properties do you have that need to be ignored?

@vivekmore
Copy link
Author

In this particular instance there were 9

@filiphr
Copy link
Member

filiphr commented May 20, 2021

Can you please tell me which IntelliJ version are you using?

Can you also reproduce this in standalone project and share the model with us?

I tried with 12 properties and it works without problems in IntelliJ IDEA 2021.1.2 Preview (Ultimate Edition)

@vivekmore
Copy link
Author

vivekmore commented May 21, 2021 via email

@dragove
Copy link

dragove commented Aug 24, 2021

It's still buggy with idea 2021.2 and mapstruct-idea 1.3.0
I encountered this exception when I invoked "ignore all unmapped target properties" with 31 unmapped propeties. It should be easy to reproduce with too many unmapped propeties.

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

No branches or pull requests

3 participants