Hey all,
Me and my team have lately been having issues deploying code on the RIO (already posted a similar post). When trying to deploy our robot project code, the RIO deploys it very slowly and then can’t be discovered the next deployment. Rebooting the RIO didn’t work, since it loads the same .jar that doesn’t work (the compiled code) into it’s filesystem.
To reset it and let us try deploying again, we directly SSH’d into the RIO and removed the .jar. After trying to deploy, the same problem repeats (code takes a long time to deploy, and then when trying to redeploy it can’t be discovered).
I suspect that the problem may be in dependencies configured in our build.gradle, would love to know if someone has had a problem with them:
dependencies {
implementation wpi.java.deps.wpilib()
implementation wpi.java.vendor.java()
roborioDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.roborio)
roborioDebug wpi.java.vendor.jniDebug(wpi.platforms.roborio)
roborioRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.roborio)
roborioRelease wpi.java.vendor.jniRelease(wpi.platforms.roborio)
nativeDebug wpi.java.deps.wpilibJniDebug(wpi.platforms.desktop)
nativeDebug wpi.java.vendor.jniDebug(wpi.platforms.desktop)
simulationDebug wpi.sim.enableDebug()
nativeRelease wpi.java.deps.wpilibJniRelease(wpi.platforms.desktop)
nativeRelease wpi.java.vendor.jniRelease(wpi.platforms.desktop)
simulationRelease wpi.sim.enableRelease()
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.1'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation files('libs/jna.jar')
implementation files('libs/Jama-1.0.3.jar')
implementation files('libs/commons-collections4-4.4.jar')
implementation files('libs/commons-compress-1.19.jar')
implementation files('libs/mysql-connector.jar')
implementation files('libs/poi-4.1.2.jar')
implementation files('libs/poi-ooxml-4.1.2.jar')
implementation files('libs/poi-ooxml-schemas-4.1.2.jar')
implementation files('libs/xmlbeans-3.1.0.jar')
implementation "com.github.sarxos:webcam-capture:0.3.12"
implementation "com.github.sarxos:webcam-capture-driver-ipcam:0.3.12"
}
Anyways, if anybody has any other suggestions, I would love to hear them.
Thanks in advance,
Niran Schneller,
BumbleB 3339
dan
January 18, 2024, 11:50pm
2
I’d create a fresh project, then add stuff piece by piece until you hit this problem again. That way you’ll see the root cause of the issue.
2 Likes
nstrike
January 19, 2024, 12:07am
4
Me thinks AI was involved in this process.
3 Likes
I would just re image the rio if I were you. Trying to ssh in and repair it manually will take more work then just re imaging it
Hello all,
the problem ended up being assigning an invalid PWM Port in the software, which caused the RIO to crash.
It didn’t output any invalid port issues, because no port sanity check is done on ports < 0 on WPI’s side, see:
opened 02:32PM - 19 Jan 24 UTC
**Describe the bug**
When deploying code that tries to initialize a PWM Port th… at is <= 0, the roboRIO doesn't do anything upon ENABLE, and when trying to redeploy code, it says build failed because of - discoverroborio.
**To Reproduce**
Steps to reproduce the behavior:
1. Initialize a PWM Port which is <=0
2. Deploy code
3. Try to redeploy code, and see that the build fails on - discoverroborio.
- Link to code:
https://github.com/wpilibsuite/allwpilib/blob/a2d45dbca406ee7bdc17d1da010c509006606dd2/hal/src/main/native/athena/PWM.cpp#L81
There are other files where the sanity check doesn't occur, I provided this specific one.
**Expected behavior**
The expected behavior is getting an error that the port we entered was invalid.
**Desktop (please complete the following information):**
- OS: Windows 11.
- Project Information:
Project Version: 2024.1.1
VS Code Version: 1.84.0
WPILib Extension Version: 2024.1.1
C++ Extension Version: 1.17.5
Java Extension Version: 1.23.0
Java Debug Extension Version: 0.52.0
Java Dependencies Extension Version 0.23.0
Java Version: 17
Java Location: C:\Users\Public\wpilib\2024\jdk
Vendor Libraries:
NavX (2024.1.0)
CTRE-Phoenix (v5) (5.33.0)
CTRE-Phoenix (v6) (24.1.0)
REVLib (2024.2.0)
WPILib-New-Commands (1.0.0)
**Additional context**
It started when we had problems deploying our robot code. The code deployment failed on discoverroborio, so e naturally though it was a networking issue of some sort. After endless pings, network checks and version switches (2023 and back), we realized they weren't the problem, and the problem had to be in the code itself. After many more hours of debugging, we found out the problem was that we had initialized a PWM Port of 0 in the code. While that fixed it, I still could not find find any correlation between the problem (Invalid port) and the error that we got, since we should have gotten an error about the port. So out of curiosity, I looked at the JNI files in this repository. After close inspection, I found out that there is no checking for PWM ports that are <= 0. Not checking this is what caused the RIO to crash everytime we tried to redeploy code, when the previous deployed code had that incorrect port.
system
Closed
January 18, 2025, 2:38pm
7
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.