Three issues I couldn't report from IDE

14 views
Skip to first unread message

Grzegorz Rynkowski

unread,
Jun 18, 2021, 5:42:46 AMJun 18
to Cursive
I'm using Cursive 1.10.2-2021.1 with IntelliJ Idea 2021.2. Today morning when closing IDE I noticed yesterday I had three issues coming from Cursive. I would use the button "Report to Cursive", but submission fails.

Sorry, I'm posting it here, but I wasn't sure where should I, and I didn't want to loose these potentially useful stacktraces.


Issue 1 (occurred once)
```
java.lang.IllegalArgumentException: Count 'n' must be non-negative, but was -5.
    at kotlin.text.StringsKt__StringsJVMKt.repeat(StringsJVM.kt:662)
    at cursive.structural.Parinfer.addIndent(parinfer.kt:947)
    at cursive.structural.Parinfer.onIndent(parinfer.kt:996)
    at cursive.structural.Parinfer.checkIndent(parinfer.kt:1073)
    at cursive.structural.Parinfer.processChar(parinfer.kt:1090)
    at cursive.structural.Parinfer.processLine(parinfer.kt:1111)
    at cursive.structural.Parinfer.processText(parinfer.kt:1155)
    at cursive.structural.Parinfer.parinfer(parinfer.kt:1184)
    at cursive.structural.ParinferComponent.applyParinfer(ParinferComponent.kt:117)
    at cursive.structural.ParinferComponent$ParinferCommandListener.performUpdates(ParinferComponent.kt:403)
    at cursive.structural.ParinferComponent$ParinferCommandListener.commandFinished(ParinferComponent.kt:371)
    at com.intellij.util.messages.impl.MessageBusImpl.invokeMethod(MessageBusImpl.java:674)
    at com.intellij.util.messages.impl.MessageBusImpl.invokeListener(MessageBusImpl.java:649)
    at com.intellij.util.messages.impl.MessageBusImpl.access$300(MessageBusImpl.java:33)
    at com.intellij.util.messages.impl.MessageBusImpl$MessagePublisher.executeOrAddToQueue(MessageBusImpl.java:215)
    at com.intellij.util.messages.impl.CompositeMessageBus$ToDirectChildrenMessagePublisher.publish(CompositeMessageBus.java:135)
    at com.intellij.util.messages.impl.MessageBusImpl$MessagePublisher.invoke(MessageBusImpl.java:181)
    at com.sun.proxy.$Proxy94.commandFinished(Unknown Source)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.fireCommandFinished(CoreCommandProcessor.java:275)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.finishCommand(CoreCommandProcessor.java:256)
    at com.intellij.openapi.command.impl.CommandProcessorImpl.finishCommand(CommandProcessorImpl.java:34)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:222)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:172)
    at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:98)
    at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:73)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAware$5(ActionUtil.java:273)
    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.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:273)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:616)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$processAction$3(IdeKeyEventDispatcher.java:676)
    at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:95)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:675)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:626)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:486)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:481)
    at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:232)
    at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:889)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:833)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:808)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
    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)
```

Issue 2 (occurred once)
```
java.lang.Throwable: Non-idempotent computation: it returns different results when invoked multiple times or on different threads:
  REPL class java.time.Instant (class cursive.psi.repl.ReplClass) != REPL class java.time.Instant (class cursive.psi.repl.ReplClass)
  which is element of cursive.psi.resolve.ClojureResolveResultImpl@3fb4ad1e and cursive.psi.resolve.ClojureResolveResultImpl@3b261389
  which is 0th element of [cursive.psi.resolve.ClojureResolveResultImpl@3fb4ad1e] and [cursive.psi.resolve.ClojureResolveResultImpl@3b261389]

Recomputation gives [Lcursive.psi.resolve.ClojureResolveResult;@410cdd8d (class [Lcursive.psi.resolve.ClojureResolveResult;) which is different from both values
Recomputation log:
  Resolving cursive.psi.impl.symbols.SymbolReference@96f9ef02 of class cursive.psi.impl.symbols.SymbolReference
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:161)
    at com.intellij.util.IdempotenceChecker.reportFailure(IdempotenceChecker.java:90)
    at com.intellij.util.IdempotenceChecker.checkEquivalence(IdempotenceChecker.java:77)
    at com.intellij.psi.impl.source.resolve.ResolveCache.cache(ResolveCache.java:322)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:249)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:154)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:169)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:162)
    at cursive.psi.impl.symbols.SymbolReference.multiResolve(SymbolReference.java:60)
    at cursive.resolve$resolve.invokeStatic(resolve.clj:54)
    at cursive.resolve$resolve.invoke(resolve.clj:51)
    at cursive.resolve$resolve_keys.invokeStatic(resolve.clj:191)
    at cursive.resolve$resolve_keys.invoke(resolve.clj:179)
    at cursive.inspections$element_in_inspect_context_QMARK_.invokeStatic(inspections.clj:26)
    at cursive.inspections$element_in_inspect_context_QMARK_.invoke(inspections.clj:21)
    at cursive.psi$cached_value$reify__663.compute(psi.clj:555)
    at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:54)
    at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:227)
    at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:42)
    at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:227)
    at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
    at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:43)
    at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
    at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:228)
    at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:43)
    at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:72)
    at cursive.psi$cached_value.invokeStatic(psi.clj:558)
    at cursive.psi$cached_value.doInvoke(psi.clj:545)
    at clojure.lang.RestFn.invoke(RestFn.java:445)
    at cursive.inspections$inspect_context_QMARK_.invokeStatic(inspections.clj:33)
    at cursive.inspections$inspect_context_QMARK_.invoke(inspections.clj:32)
    at clojure.lang.Var.invoke(Var.java:384)
    at cursive.api.DelayedFn.invoke(DelayedFn.java:31)
    at cursive.inspections.ClListInspection$buildVisitor$1.visitList(Inspections.kt:65)
    at cursive.psi.impl.list.ClListImpl.accept(ClListImpl.java:25)
    at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:65)
    at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:56)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.runToolOnElements(LocalInspectionsPass.java:320)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$4(LocalInspectionsPass.java:279)
    at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:161)
    at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:153)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$5(LocalInspectionsPass.java:277)
    at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:132)
    at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:121)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$6(LocalInspectionsPass.java:277)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:136)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1096)
    at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:92)
    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.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:104)
    at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:83)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:167)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:178)
    at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:83)
    at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
```

Issue 3 (occurred multiple times)
This one actually looks like it is strictly related to the problem with issue submission failure.
```
java.lang.Throwable: No project found when submitting report
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:161)
    at cursive.exception.ClojureErrorReportSubmitter.submit(ClojureErrorReportSubmitter.kt:217)
    at com.intellij.diagnostic.IdeErrorsDialog.reportMessage(IdeErrorsDialog.java:622)
    at com.intellij.diagnostic.IdeErrorsDialog.doOKAction(IdeErrorsDialog.java:373)
    at com.intellij.openapi.ui.DialogWrapper$OkAction.doAction(DialogWrapper.java:1887)
    at com.intellij.openapi.ui.DialogWrapper$DialogWrapperAction.actionPerformed(DialogWrapper.java:1840)
    at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
    at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
    at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
    at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
    at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:270)
    at java.desktop/java.awt.Component.processMouseEvent(Component.java:6652)
    at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3345)
    at java.desktop/java.awt.Component.processEvent(Component.java:6417)
    at java.desktop/java.awt.Container.processEvent(Container.java:2263)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5027)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)
    at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
    at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
    at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2784)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4859)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:778)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:751)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:749)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:748)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:969)
    at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:906)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:836)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:449)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:808)
    at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:448)
    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)
```

About the context of the first two. I noticed yesterday a weird thing. Cursive remote nREPL was failing when the same nREPL but in terminal was ok. There was a problem with calling a method on record (defprotocol defines interface, defrecord implements it). When I tried to call defrecord method it complained that such a keywordized method doesn't exist. It was ok in terminal REPL, it wasn't in Curisve remote REPL.
Might be related to the issue #1 or #2, might be not.

Kind regards,
Grzegorz Rynkowski

Reply all
Reply to author
Forward
0 new messages