snobotsim / SnobotSim

Simulator For FRC Java and C++ Robots
MIT License
57 stars 11 forks source link

Build Failure #48

Closed ynx0 closed 5 years ago

ynx0 commented 5 years ago

Describe the bug I followed the setup page, and when running the gradlew runSnobotSim command, I get a build failure error. One line seemed to catch my eye:

15:51:36.001 [main] FATAL com.snobot.simulator.Main - Unsatisfied link error.  This likely means that there is a native call in WpiLib or the NetworkTables libraries.  Please tell PJ so he can mock it out.

Quick Glance Configuration Please provide the following information

  1. SnobotSimPlugin version "2018.05.23"
  2. SnobotSim version ??
  3. GradleRIO version 2019.0.0-alpha-3
  4. Your Operating System. Windows 10
  5. N/A

To Reproduce Please information on when the issue occurs, and/or what you did to cause the issue to surface. i.e. The issue happens when simulating from the command line (gradlew runSnobotSim) and the error message states that ther is an unsatisfied link.

Expected behavior I expect the command to run successfully.

Detailed Setup

Gradle File ```gradle plugins { id "java" id "eclipse" id "edu.wpi.first.GradleRIO" version "2019.0.0-alpha-3" id "com.snobot.simulator.plugin.SnobotSimulatorPlugin" version "2018.05.23"// Should point to the latest version at https://login.gradle.org/plugin/com.snobot.simulator.plugin.SnobotSimulatorPlugin } def ROBOT_CLASS = "org.usfirst.frc.team1683.robot.Robot" // Define my targets (RoboRIO) and artifacts (deployable files) // This is added by GradleRIO's backing project EmbeddedTools. deploy { targets { target("roborio", edu.wpi.first.gradlerio.frc.RoboRIO) { // Team number is loaded either from the .wpilib/wpilib_preferences.json // or from command line. If not found an exception will be thrown. // You can use getTeamOrDefault(team) instead of getTeamNumber if you // want to store a team number in this file. team = getTeamNumber() } } artifacts { artifact('frcJava', edu.wpi.first.gradlerio.frc.FRCJavaArtifact) { targets << "roborio" // Debug can be overridden by command line, for use with VSCode debug = getDebugOrDefault(false) } } } // Defining my dependencies. In this case, WPILib (+ friends), CTRE Toolsuite (Talon SRX) // and NavX. dependencies { compile wpilib() compile ctre() compile navx() testCompile snobotSimCompile() testCompile snobotSimJavaCompile() } // Setting up my Jar File. In this case, adding all libraries into the main jar ('fat jar') // in order to make them all available at runtime. Also adding the manifest so WPILib // knows where to look for our Robot Class. jar { from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } manifest edu.wpi.first.gradlerio.GradleRIOPlugin.javaManifest(ROBOT_CLASS) } // Force Java 8 Compatibility mode for deployed code, in case the develoment // system is using Java 10. compileJava { sourceCompatibility = 1.8 targetCompatibility = 1.8 } wrapper { gradleVersion = '4.9' } ```
Stack Trace ```gradle > Task :runSnobotSim FAILED C:\Users\lux\.gradle\caches\modules-2\files-2.1\com.snobot.simulator\snobot_sim_gui\0.11.0\e1a97cc451c5fddf77085a07846bd882b1f2e188\snobot_sim_gui-0.11.0-all.jar; C:\Users\lux\.gradle\caches\modules-2\files-2.1\jfree\jcommon\1.0.16\376f19a7c317509a57dfc684cdfd4081db7c082c\jcommon-1.0.16.jar; C:\Users\lux\.gradle\caches\modules-2\files-2.1\jfree\jfreechart\1.0.13\b5fbdc552c4caec3dac4b4dcbc10d119a194946e\jfreechart-1.0.13.jar; C:\Users\lux\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-api\2.11.0\bede79a3f150711634a3047985517431bf6499f2\log4j-api-2.11.0.jar; C:\Users\lux\.gradle\caches\modules-2\files-2.1\org.apache.logging.log4j\log4j-core\2.11.0\e6b751e02120c08702d98750f6a80bc25343b7f5\log4j-core-2.11.0.jar; C:\Users\lux\.gradle\caches\modules-2\files-2.1\org.yaml\snakeyaml\1.18\e4a441249ade301985cb8d009d4e4a72b85bf68e\snakeyaml-1.18.jar; C:\Users\lux\.gradle\caches\modules-2\files-2.1\com.miglayout\miglayout-swing\4.2\ca85067488e79a2078ba4eb8e2617653e9172388\miglayout-swing-4.2.jar; C:\Users\lux\.gradle\caches\modules-2\files-2.1\com.miglayout\miglayout-core\4.2\70f2bfa2a077ee1632cc8229deffa1d942825c78\miglayout-core-4.2.jar; C:\Users\lux\.gradle\caches\modules-2\files-2.1\org.opencv\opencv-jni\3.2.0\5c6a5b457a6a4071007cf53b8bab479933e01327\opencv-jni-3.2.0-all.jar; C:\Users\lux\.gradle\caches\modules-2\files-2.1\net.java.jinput\jinput\2.0.7\7795d3dbbcfecd03e3d2bf964b04c0cd042415f7\jinput-2.0.7.jar; C:\Users\lux\.gradle\caches\modules-2\files-2.1\net.java.jutils\jutils\1.0.0\e12fe1fda814bd348c1579329c86943d2cd3c6a6\jutils-1.0.0.jar; C:\Users\lux\.gradle\caches\modules-2\files-2.1\com.snobot.simulator\snobot_sim_java\0.11.0\e0bd8716659eba70a05c773e1f768a5f493349d5\snobot_sim_java-0.11.0-uber_native-windows.jar; C:\Users\lux\.gradle\caches\modules-2\files-2.1\edu.wpi.first.ntcore\ntcore-jni\2019.1.1-beta-2\ae15a1e70f5cabfc517e96e9336dc114111abfcb\ntcore-jni-2019.1.1-beta-2-all.jar; C:\Users\lux\.gradle\caches\modules-2\files-2.1\edu.wpi.first.cscore\cscore-jni\2019.1.1-beta-2\1868c45b57df8e3c0864f39b7d4c6f47386057e4\cscore-jni-2019.1.1-beta-2-all.jar; Info C:/projects/snobotsim/snobot_sim_java/cpp/lib/SnobotSimJava/Jni/RegisterCallbacksJni.cpp:32 - Initializing the simulator 15:51:36.001 [main] FATAL com.snobot.simulator.Main - Unsatisfied link error. This likely means that there is a native call in WpiLib or the NetworkTables libraries. Please tell PJ so he can mock it out. Error Message: java.lang.UnsatisfiedLinkError: no ntcore in java.library.path java.lang.UnsatisfiedLinkError: no ntcore in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) ~[?:1.8.0_144] at java.lang.Runtime.loadLibrary0(Runtime.java:870) ~[?:1.8.0_144] at java.lang.System.loadLibrary(System.java:1122) ~[?:1.8.0_144] at edu.wpi.first.networktables.NetworkTablesJNI.(NetworkTablesJNI.java:53) ~[TitanWare2018Grits.jar:?] at edu.wpi.first.networktables.NetworkTableInstance.getDefault(NetworkTableInstance.java:88) ~[TitanWare2018Grits.jar:?] at edu.wpi.first.wpilibj.DriverStation$MatchDataSender.(DriverStation.java:106) ~[TitanWare2018Grits.jar:?] at edu.wpi.first.wpilibj.DriverStation.(DriverStation.java:210) ~[TitanWare2018Grits.jar:?] at edu.wpi.first.wpilibj.DriverStation.(DriverStation.java:128) ~[TitanWare2018Grits.jar:?] at edu.wpi.first.wpilibj.RobotBase.initializeHardwareConfiguration(RobotBase.java:180) ~[TitanWare2018Grits.jar:?] at com.snobot.simulator.robot_container.JavaRobotContainer.constructRobot(JavaRobotContainer.java:25) ~[snobot_sim_gui-0.11.0-all.jar:?] at com.snobot.simulator.Simulator.createRobot(Simulator.java:171) ~[snobot_sim_gui-0.11.0-all.jar:?] at com.snobot.simulator.Simulator.loadConfig(Simulator.java:133) ~[snobot_sim_gui-0.11.0-all.jar:?] at com.snobot.simulator.Simulator.startSimulation(Simulator.java:220) ~[snobot_sim_gui-0.11.0-all.jar:?] at com.snobot.simulator.Main.main(Main.java:50) [snobot_sim_gui-0.11.0-all.jar:?] FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':runSnobotSim'. > Process 'command 'java'' finished with non-zero exit value -1 ```
yuhao1118 commented 5 years ago

I have the same problem

Sent with GitHawk

pjreiniger commented 5 years ago

SnobotSim 2019 beta is coming soon. Complete with a couple of example projects.

pjreiniger commented 5 years ago

Try the latest version. This is a good example to base your build file on