wpilibsuite / vscode-wpilib

Visual Studio Code WPILib extensions
Other
111 stars 49 forks source link

Build failures after ending simulation. #419

Open stemrobotics opened 3 years ago

stemrobotics commented 3 years ago

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.

ThadHouse commented 3 years ago

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.

stemrobotics commented 3 years ago

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