allwpilib icon indicating copy to clipboard operation
allwpilib copied to clipboard

Fixed opencv version mismatch causing errors while running simulation

Open amorygalili opened this issue 1 year ago • 0 comments

I'm currently seeing these errors when running simulated code on a local build of HEAD:

led-test\build\jni\release\cscorejni.dll: Can't find dependent libraries
A common cause of this error is missing the C++ runtime.
Download the latest at https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

        at edu.wpi.first.util.RuntimeLoader.loadLibrary(RuntimeLoader.java:93)
        at edu.wpi.first.cscore.CameraServerJNI.<clinit>(CameraServerJNI.java:37)
        at edu.wpi.first.wpilibj.RobotBase.startRobot(RobotBase.java:390)
        at frc.robot.Main.main(Main.java:23)

When I inspected the dll to see what dependencies it was using it showed a different version of opencv than what was used in the jni/release folder:

wrong-opencsv-version

I believe the issue is caused by the mismatch here: https://github.com/wpilibsuite/allwpilib/blob/main/shared/opencv.gradle#L1 https://github.com/wpilibsuite/allwpilib/blob/main/shared/config.gradle#L18

However, updating this did not change the dlls produced in later builds. I can't yet confirm if this fixes the issue, or if there's some additional change I need to make.

amorygalili avatar Oct 02 '22 17:10 amorygalili