vscode-wpilib icon indicating copy to clipboard operation
vscode-wpilib copied to clipboard

Build failures after ending simulation.

Open stemrobotics opened this issue 4 years ago • 2 comments

Working with 2021.1.1 beta-4, if I run a simulation and then end the simulation with the red square button in the simulation control menu in vscode, any subsequent build or attempt to restart simulation results in:

Execution failed for task ':extractTestJNI'.

Could not copy file 'C:\Users\name\workspace\FRC Java\Robot21C\build\tmp\expandedArchives\opencv-cpp-3.4.7-5-windowsx86-64.zip_fffab528a2a8fe3f8b05d8b9ec5a431d\windows\x86-64\shared\opencv_calib3d347.dll' to 'C:\Users\name\workspace\FRC Java\Robot21C\build\tmp\jniExtractDir\opencv_calib3d347.dll'. C:\Users\name\workspace\FRC Java\Robot21C\build\tmp\jniExtractDir\opencv_calib3d347.dll (The process cannot access the file because it is being used by another process)

I have to restart vscode to get going again.

  • OS: Windows
  • Java version 11.0.8

stemrobotics avatar Dec 15 '20 23:12 stemrobotics

Moved this issue to the correct repo. This is actually something we don't have a great solution for, as that stop button actually doesn't fully stop the Java runtime.

As a fix, without needing to restart VS Code, go to the terminal tab on the bottom, and one of the terminals in the dropdown will be the actual sim backend (I'll get the exact name later, but its obvious). If you either close that terminal, or just "ctrl c" it, it will stop the Java process and things will work again.

Or if youre using the Sim UI, close the UI rather then using the stop debugging button.

ThadHouse avatar Dec 15 '20 23:12 ThadHouse

Closing the UI does fix the problem but closing the debug terminal does. Thanks.

stemrobotics avatar Dec 16 '20 20:12 stemrobotics