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

Can't find dependent libraries - CTRE_PhoenixCCI.dll #5

Open
dbauducco opened this issue Jan 6, 2019 · 4 comments
Open

Can't find dependent libraries - CTRE_PhoenixCCI.dll #5

dbauducco opened this issue Jan 6, 2019 · 4 comments
Labels
bug Something isn't working low-priority

Comments

@dbauducco
Copy link
Collaborator

When running WPILib: Simulate Robot Code On Desktop, this error appears:

java.lang.UnsatisfiedLinkError: C:\Users\David\Documents\Robot Code\Robot2019\build\tmp\jniExtractDir\CTRE_PhoenixCCI.dll: Can't find dependent libraries
        at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
        at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2430)
        at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2487)
        at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2684)
        at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2649)
        at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:829)
        at java.base/java.lang.System.loadLibrary(System.java:1867)
        at com.ctre.phoenix.CTREJNIWrapper.<clinit>(CTREJNIWrapper.java:9)
        at com.ctre.phoenix.motorcontrol.can.BaseMotorController.<init>(BaseMotorController.java:54)        at com.ctre.phoenix.motorcontrol.can.TalonSRX.<init>(TalonSRX.java:27)
        at com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX.<init>(WPI_TalonSRX.java:49)
        at org.usfirst.frc.team3735.robot.util.hardware.VortxTalon.<init>(VortxTalon.java:31)        at org.usfirst.frc.team3735.robot.util.hardware.VortxTalon.<init>(VortxTalon.java:37)
        at org.usfirst.frc.team3735.robot.subsystems.Drive.<init>(Drive.java:75)        at org.usfirst.frc.team3735.robot.Robot.robotInit(Robot.java:70)
        at org.usfirst.frc.team3735.robot.util.bases.VortxIterative.startCompetition(VortxIterative.java:71)        at edu.wpi.first.wpilibj.RobotBase.startRobot(RobotBase.java:263)
        at org.usfirst.frc.team3735.robot.Main.main(Main.java:20)
@dbauducco dbauducco added bug Something isn't working low-priority labels Jan 6, 2019
@dbauducco
Copy link
Collaborator Author

dbauducco commented Jan 6, 2019

Currently getting past this by commenting these two lines in Robot.java:

drive = new Drive();
navigation = new Navigation();

@nleach999
Copy link
Contributor

Windows or Mac? That file is not likely to be a correct shared lib on a mac (I guess they could have named it that, but usually it will end in .so)

Does the simulator support simulating the Talons? If not, we have to code some mock classes to use when running under the simulator.

@dbauducco
Copy link
Collaborator Author

I'm running Windows.

From what I am hearing around, Simulator is currently not supporting using the Talons.
I'm having to make sure that they are never referenced. So far, commenting out those two lines does it for now.

@nleach999
Copy link
Contributor

I suggest reading about Mock Objects (https://en.wikipedia.org/wiki/Mock_object) to avoid commenting stuff in and out for simulation. We'll also probably need to do a little with dependency injection that will be similar to dynamically loading robot sub systems. The proper way to perform the mock/dependency injection is through Inversion of Control (https://en.wikipedia.org/wiki/Inversion_of_control).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low-priority
Projects
None yet
Development

No branches or pull requests

2 participants