KronicDeth / intellij-elixir

Elixir plugin for JetBrain's IntelliJ Platform (including Rubymine)
Other
1.84k stars 153 forks source link

Failed to launch Run/Debug configuration: "Already disposed" #1652

Open unsignedint opened 4 years ago

unsignedint commented 4 years ago

Describe the bug Failed to launch Run/Debug configuration.

6:03 PM Error running 'Phoenix Server'
                    Already disposed:
                    -------------Own trace:
                    com.intellij.openapi.util.TraceableDisposable$DisposalException: 588589259
                    at com.intellij.openapi.util.TraceableDisposable.getStackTrace(TraceableDisposable.java:123)
                    at com.intellij.openapi.vfs.impl.VirtualFilePointerContainerImpl.checkDisposed(VirtualFilePointerContainerImpl.java:394)
                    at com.intellij.openapi.vfs.impl.VirtualFilePointerContainerImpl.getOrCache(VirtualFilePointerContainerImpl.java:202)
                    at com.intellij.openapi.vfs.impl.VirtualFilePointerContainerImpl.getFiles(VirtualFilePointerContainerImpl.java:294)
                    at com.intellij.openapi.projectRoots.impl.RootsAsVirtualFilePointers.getFiles(RootsAsVirtualFilePointers.java:45)
                    at com.intellij.openapi.projectRoots.impl.ProjectJdkImpl$MyRootProvider.getFiles(ProjectJdkImpl.java:279)
                    at org.elixir_lang.Erl.ebinDirectories(Erl.kt:48)
                    at org.elixir_lang.Erl.prependCodePaths(Erl.kt:39)
                    at org.elixir_lang.Erl.setErl(Erl.kt:62)
                    at org.elixir_lang.Erl.commandLine(Erl.kt:16)

To Reproduce Steps to reproduce the behavior:

  1. Created a new Phoenix project
  2. Opened with IntelliJ + Elixir plugin
  3. Added new "Elixir Mix" Run/Debug configuration.
    • Mix arguments: "phx.server"
  4. Click Run

Desktop:

Plugin:

tjb commented 4 years ago

hey @KronicDeth is there any update on this? i am also facing this issue.

manzanit0 commented 3 years ago

Same issue here.

Plugin version: 11.9.1

IDE

IntelliJ IDEA 2020.3.1 (Community Edition) Build #IC-203.6682.168, built on December 29, 2020 Runtime version: 11.0.9.1+11-b1145.63 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 10.15.7 GC: ParNew, ConcurrentMarkSweep Memory: 1981M Cores: 8 Non-Bundled Plugins: AceJump, IdeaVIM, org.jetbrains.IdeaVim-EasyMotion, org.elixir_lang

Stacktrace

Already disposed: -------------Own trace: com.intellij.openapi.util.TraceableDisposable$DisposalException: 191044455 at com.intellij.openapi.util.TraceableDisposable.getStackTrace(TraceableDisposable.java:120) at com.intellij.openapi.vfs.impl.VirtualFilePointerContainerImpl.checkDisposed(VirtualFilePointerContainerImpl.java:392) at com.intellij.openapi.vfs.impl.VirtualFilePointerContainerImpl.getOrCache(VirtualFilePointerContainerImpl.java:202) at com.intellij.openapi.vfs.impl.VirtualFilePointerContainerImpl.getFiles(VirtualFilePointerContainerImpl.java:293) at com.intellij.openapi.projectRoots.impl.RootsAsVirtualFilePointers.getFiles(RootsAsVirtualFilePointers.java:40) at com.intellij.openapi.projectRoots.impl.ProjectJdkImpl$MyRootProvider.getFiles(ProjectJdkImpl.java:285) at org.elixir_lang.Erl.ebinDirectories(Erl.kt:48) at org.elixir_lang.Erl.prependCodePaths(Erl.kt:39) at org.elixir_lang.Erl.setErl(Erl.kt:62) at org.elixir_lang.Erl.commandLine(Erl.kt:16) at org.elixir_lang.Elixir.commandLine(Elixir.kt:20) at org.elixir_lang.Mix.commandLine(Mix.kt:19) at org.elixir_lang.mix.Configuration.commandLine(Configuration.kt:86) at org.elixir_lang.mix.State.startProcess(State.kt:44) at com.intellij.execution.configurations.CommandLineState.execute(CommandLineState.java:61) at org.elixir_lang.mix.State.execute(State.kt:39) at com.intellij.execution.runners.DefaultProgramRunnerKt.executeState(DefaultProgramRunner.kt:32) at org.elixir_lang.elixir.Runner.doExecute(Runner.kt:20) at com.intellij.execution.runners.GenericProgramRunner$execute$1.invoke(GenericProgramRunner.kt:20) at com.intellij.execution.runners.GenericProgramRunner$execute$1.invoke(GenericProgramRunner.kt:13) at com.intellij.execution.impl.ExecutionManagerImpl$startRunProfile$1.invoke(ExecutionManagerImpl.kt:155) at com.intellij.execution.impl.ExecutionManagerImpl$startRunProfile$1.invoke(ExecutionManagerImpl.kt:65) at com.intellij.execution.impl.ExecutionManagerImpl$doStartRunProfile$startRunnable$1.run(ExecutionManagerImpl.kt:216) at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:216) at com.intellij.openapi.application.TransactionGuardImpl.access$200(TransactionGuardImpl.java:24) at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:199) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822) at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:324) at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:85) at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:134) at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47) at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:190) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776) 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.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:976) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:843) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:454) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:773) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$9(IdeEventQueue.java:453) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:822) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:501) 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)
jkbbwr commented 3 years ago

Having the same issue on 11.8.1-pre+20200925190150

22:34   Error running 'Unnamed'
                Already disposed:
                -------------Own trace:
                com.intellij.openapi.util.TraceableDisposable$DisposalException: 2028403814
                at com.intellij.openapi.util.TraceableDisposable.getStackTrace(TraceableDisposable.java:120)
                at com.intellij.openapi.vfs.impl.VirtualFilePointerContainerImpl.checkDisposed(VirtualFilePointerContainerImpl.java:389)
                at com.intellij.openapi.vfs.impl.VirtualFilePointerContainerImpl.getOrCache(VirtualFilePointerContainerImpl.java:199)
                at com.intellij.openapi.vfs.impl.VirtualFilePointerContainerImpl.getFiles(VirtualFilePointerContainerImpl.java:290)
                at com.intellij.openapi.projectRoots.impl.RootsAsVirtualFilePointers.getFiles(RootsAsVirtualFilePointers.java:40)
                at com.intellij.openapi.projectRoots.impl.ProjectJdkImpl$MyRootProvider.getFiles(ProjectJdkImpl.java:285)
                at org.elixir_lang.Erl.ebinDirectories(Erl.kt:48)
                at org.elixir_lang.Erl.prependCodePaths(Erl.kt:39)
                at org.elixir_lang.Erl.setErl(Erl.kt:62)
                at org.elixir_lang.Erl.commandLine(Erl.kt:16)
                at org.elixir_l... (show balloon)
ryanbrainard commented 3 years ago

I had the same issue and fixed it by doing the following. I'm actually not sure if all these were needed, but it worked after I did them, so hopefully, it can help someone else or help @KronicDeth debug it.

  1. Closed the project and deleted the .idea and *.iml files in the project to clear all the project config.
  2. Uninstalled both the Elixir and Erlang plugins. I found the kld SDK config was getting cached before I did this.
  3. Uninstalled Erlang from Homebrew, leaving the one from asdf. I found the plugin was picking up the Homebrew one even though I chose the one from asdf.
  4. Followed the SDK setup instructions. In particular, I installed the Erlang plugin and configured both the Erlang and Elixir SDK locations. Not sure it matters, but I'm using asdf for their installations.
  5. Re-opened the project, which automatically picked up the SDK config. I tried running tests again, and it just worked!