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

Not able to run with AutoCp for kotlin in IntelliJ Ultimate. It shows "Error : Test Framework quit unexpectedly" #107

Closed
ydh0213 opened this issue Nov 22, 2022 · 2 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@ydh0213
Copy link

ydh0213 commented Nov 22, 2022

Describe the bug
I installed AutoCp into IntelliJ IDEA Ultimate and left all settings at default. But, I am not able to run programs using AutoCp for kotlin in this IDE. It shows "Error : Test Framework quit unexpectedly".
It appears to be the same as this issue #102.

Error Message
Test Framework quit unexpectedly

Testing started at 오후 2:24 ...
Building "A+B (2)" ...
This was not supposed to happen, please file an issue

Error message:
Cannot run program "kotlinc" (in directory "C:\Users\DAEHYU1\AppData\Local\Temp\AutoCp146924462823230508"): CreateProcess error=2, 지정된 파일을 찾을 수 없습니다
Stacktrace:
com.intellij.execution.process.ProcessNotCreatedException: Cannot run program "kotlinc" (in directory "C:\Users\DAEHYU1\AppData\Local\Temp\AutoCp146924462823230508"): CreateProcess error=2, 지정된 파일을 찾을 수 없습니다
at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:362)
at com.github.pushpavel.autocp.tester.base.TwoStepProcessFactory$Companion.from(TwoStepProcessFactory.kt:44)
at com.github.pushpavel.autocp.tester.base.TwoStepProcessFactory$Companion$from$1.invokeSuspend(TwoStepProcessFactory.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Caused by: java.io.IOException: Cannot run program "kotlinc" (in directory "C:\Users\DAEHYU1\AppData\Local\Temp\AutoCp146924462823230508"): CreateProcess error=2, 지정된 파일을 찾을 수 없습니다
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
at com.intellij.execution.configurations.GeneralCommandLine.startProcess(GeneralCommandLine.java:438)
at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:352)
... 8 more
Caused by: java.io.IOException: CreateProcess error=2, 지정된 파일을 찾을 수 없습니다
at java.base/java.lang.ProcessImpl.create(Native Method)
at java.base/java.lang.ProcessImpl.(ProcessImpl.java:499)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:158)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
... 11 more

To Reproduce
Steps to reproduce the behavior:

  1. There are Kotlin executables in "C:\kotlin\kotlin-compiler-1.6.10\kotlinc\bin".
  2. Add the kotlin executable path to environment variables.
  3. Confirmed that Kotlin runs fine in the terminal.
  4. Installed AutoCp in IntelliJ IDEA Ultimate.
  5. Using Competitive Companion, Get a problem set from an online judge.
  6. Try to run it (Alt + X), but the error occured.

Expected behavior
According to the error message, it seems that the kotlin executable cannot be found.

Screenshots
image

image

image

image

image

Environment (please complete the following information):

  • OS: Windows 10 / 11 (Same issue on both machines)
  • IDE: IntelliJ IDEA 2022.2.3 (Ultimate Edition)
  • Programming Language: Kotlin

Note that I created this issue by referring to #102 (comment)

@ydh0213 ydh0213 added the bug Something isn't working label Nov 22, 2022
@ydh0213 ydh0213 changed the title Not able to run with AutoCp for kotlin in Intellij Ultimate. It shows "Error : Test Framework quit unexpectedly" Not able to run with AutoCp for kotlin in IntelliJ Ultimate. It shows "Error : Test Framework quit unexpectedly" Nov 22, 2022
@Pushpavel
Copy link
Owner

Thanks for the screenshots. There seems to be an issue with reading the Path variable.

As a workaround, you can call the kotlinc command with absolute path like

C:\kotlin\kotlin-compiler-1.6.10\kotlinc\bin\kotlinc @in ...

@ydh0213
Copy link
Author

ydh0213 commented Nov 22, 2022

Changing command to the absolute path fixed this problem temporarily. I changed the kotlin Build Command to C:\kotlin\kotlin-compiler-1.6.10\kotlinc\bin\kotlinc.bat @in ... and it builds fine. Thank you very much!
I hope the relative path command works as well.

@Pushpavel Pushpavel added the wontfix This will not be worked on label Dec 30, 2022
@Pushpavel Pushpavel closed this as not planned Won't fix, can't repro, duplicate, stale Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants