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 compile with autoCp for java in intellij ultimate. It shows "Error : Test Framework quit unexpectedly" #102

Closed
sourabhshukla opened this issue Sep 14, 2022 · 8 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@sourabhshukla
Copy link

Describe the bug
I am not able to run programs using autocp for java in intellij idea ultimate.It shows "Error : Test Framework quit unexpectedly".
I am using UBUNTU 22.04.1 LTS.

BELOW IS THE FULL ERROR MESSAGE :

Testing started at 11:38 pm ...
Building "C. Sereja and Brackets" ...
This was not supposed to happen, please file an issue

Error message:
Cannot run program "javac" (in directory "/tmp/AutoCp8746492203352981476"): error=2, No such file or directory
Stacktrace:
com.intellij.execution.process.ProcessNotCreatedException: Cannot run program "javac" (in directory "/tmp/AutoCp8746492203352981476"): error=2, No such file or directory
at com.intellij.execution.configurations.GeneralCommandLine.createProcess(GeneralCommandLine.java:362)
at com.github.pushpavel.autocp.tester.base.TwoStepProcessFactory$Companion.from(TwoStepProcessFactory.kt:43)
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 "javac" (in directory "/tmp/AutoCp8746492203352981476"): error=2, No such file or directory
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: error=2, No such file or directory
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.(ProcessImpl.java:314)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
... 11 more

END OF ERROR MSG:

Environment (please complete the following information):

  • OS: Ubuntu 22.04.1 LTS
  • IDE -> Intellij IDEA Ultimate 2022.2.2
  • Programming Language -> JAVA
@sourabhshukla sourabhshukla added the bug Something isn't working label Sep 14, 2022
@Pushpavel
Copy link
Owner

Hi, I could not reproduce this error. Is this error occurring only for new projects ? was AutoCp working before ?

@sourabhshukla
Copy link
Author

I have never used Autocp I just recently installed plugin and it shows me this error.

@Pushpavel
Copy link
Owner

Can u run it again and check if there is any directory like "/tmp/AutoCp..." is being created.

@sourabhshukla
Copy link
Author

yes the directory is definetely being created. But it is still throwing the same error.

@sourabhshukla
Copy link
Author

I am also getting an IDE internal error because of AutoCp plugin:

com.intellij.openapi.editor.ReadOnlyModificationException: Attempt to modify read-only document
at com.intellij.openapi.editor.impl.DocumentImpl.assertWriteAccess(DocumentImpl.java:699)
at com.intellij.openapi.editor.impl.DocumentImpl.replaceString(DocumentImpl.java:608)
at com.intellij.openapi.editor.impl.DocumentImpl.lambda$setText$2(DocumentImpl.java:1086)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:174)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:164)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:150)
at com.intellij.openapi.editor.impl.DocumentImpl.setText(DocumentImpl.java:1091)
at com.github.pushpavel.autocp.database.AutoCpStorageSaver$beforeAllDocumentsSaving$lambda-3$lambda-2$$inlined$runWriteAction$1.compute(actions.kt:60)
at com.intellij.openapi.application.impl.ApplicationImpl.lambda$runWriteAction$13(ApplicationImpl.java:1032)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteActionWithClass(ApplicationImpl.java:1011)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:1032)
at com.github.pushpavel.autocp.database.AutoCpStorageSaver$beforeAllDocumentsSaving$lambda-3$$inlined$runReadAction$1.compute(actions.kt:67)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:928)
at com.github.pushpavel.autocp.database.AutoCpStorageSaver.beforeAllDocumentsSaving(AutoCpStorage.kt:100)
at jdk.internal.reflect.GeneratedMethodAccessor131.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.multiCast(FileDocumentManagerImpl.java:185)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.lambda$new$0(FileDocumentManagerImpl.java:128)
at jdk.proxy2/jdk.proxy2.$Proxy28.beforeAllDocumentsSaving(Unknown Source)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.saveDocuments(FileDocumentManagerImpl.java:274)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.saveAllDocuments(FileDocumentManagerImpl.java:262)
at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.saveAllDocuments(FileDocumentManagerImpl.java:255)
at com.intellij.openapi.wm.impl.status.ToggleReadOnlyAttributePanel.lambda$getClickConsumer$1(ToggleReadOnlyAttributePanel.java:109)
at com.intellij.openapi.wm.impl.status.widget.StatusBarWidgetWrapper$StatusBarWidgetClickListener.onClick(StatusBarWidgetWrapper.java:173)
at com.intellij.ui.ClickListener$1.mouseReleased(ClickListener.java:59)
at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6648)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3392)
at java.desktop/java.awt.Component.processEvent(Component.java:6413)
at java.desktop/java.awt.Container.processEvent(Container.java:2266)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5022)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2802)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:730)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:724)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:754)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:752)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:751)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:918)
at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:840)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:763)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:450)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:791)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:449)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:624)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:447)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:493)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

@brubrz
Copy link

brubrz commented Sep 20, 2022

Hey, I am also having problems. I encountered the error Test Framework quit unexpectedly when:
a) renaming the solution class Main.java to something else then even if I change the path in the run configuration, autocp would throw the error above.
b) this also happens if I rename the folder that autocp generated, which (unfortunately) is not a valid package name.

I will open a separate issue for my java issue.

@ydh0213
Copy link

ydh0213 commented Nov 21, 2022

I'm having similar issue too.
I installed the kotlin compiler on my computer and confirmed that it works well in the terminal. But I don't know why AutoCp is not working.
However, it works well in PyCharm (Python) and CLion (C++). Only IntelliJ (Kotlin) has this issue. 🤔
I'd really appreciate if someone could help me with this issue.

  • OS: Windows 10
  • IDE: IntelliJ IDEA Ultimate 2022.2.3
  • Programming Language: Kotlin

@Pushpavel
Copy link
Owner

Can u create a new issue with more details like what commands did you check in terminal and if any settings u have changed from defaults and is your folder structure different from default like you renamed something...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants