shuffleboard icon indicating copy to clipboard operation
shuffleboard copied to clipboard

Shuffleboard Crash when Velocity Mode is Used

Open GaganBhat opened this issue 7 years ago • 18 comments

Shuffleboard works totally fine for everything else....except when I do velocity mode on the robot. I am using CTRE v4 Legacy for my talons.

The moment the robot drives in velocity mode, shuffleboard lags and becomes unresponsive. It does give me the dialogue box asking me if it wants to save the current setup when I try to close it though.

We are not sending any velocity related values to shuffleboard.

GaganBhat avatar Feb 18 '18 19:02 GaganBhat

Do you have a minimal robot code test case that demonstrates this?

sciencewhiz avatar Feb 18 '18 20:02 sciencewhiz

Yup, the moment I change the talon mode to velocity, for some odd reason, it freezes lags and eats up the CPU of the driverstation through....shuffleboard.

GaganBhat avatar Feb 20 '18 14:02 GaganBhat

Does closing shuffleboard significantly decrease CPU usage?

SamCarlberg avatar Feb 20 '18 14:02 SamCarlberg

Nope, in the background a java process continues to make the entire driverstation lag and makes the robot uncontrollable. This has been tested on multiple laptops.

CPU usage is around 90% by that one process.

GaganBhat avatar Feb 20 '18 14:02 GaganBhat

Can you confirm that the Java process is the shuffleboard process? Check the process ID when you start shuffleboard, then confirm that it's the same as the one that pegs your CPU.

If it is the shuffleboard process, we'd need you to open OutlineViewer and save the NetworkTable state and share that .ini file so we can see what's going on in NetworkTables. It would also be useful to have the shuffleboard log file as well

SamCarlberg avatar Feb 20 '18 16:02 SamCarlberg

Sam,

Did you get the information you needed to help resolve this? I believe we are experiencing the same bug.

bigabos-hey avatar Feb 22 '18 05:02 bigabos-hey

I am not familiar with CTRE's NetworkTables telemetry implementation. It's odd that this only happens when the Talons are in velocity mode. You could take a snapshot of the NetworkTables state with OutlineViewer, though I suspect the cause is elsewhere.

For sanity's sake, does this still happen with version 1.3.1?

SamCarlberg avatar Apr 02 '18 18:04 SamCarlberg

I will check tonight and let you know. Installing 1.3.1 right now...

GaganBhat avatar Apr 05 '18 21:04 GaganBhat

Just ran that one command again. It did the exact same thing. Completely froze. The only thing different about this time though is that it recovered after around 20 seconds.

GaganBhat avatar Apr 05 '18 23:04 GaganBhat

Does it also do that with SmartDashboard?

bradamiller avatar Apr 06 '18 13:04 bradamiller

Nope, it doesn't happen with SmartDasboard.

GaganBhat avatar Apr 06 '18 13:04 GaganBhat

@GaganBhat Please take a "before" and "after" snapshot of the NetworkTables state with OutlineViewer. You should also have a data recording from shuffleboard with everything up to the point of the crash; please also share that as well. Having a copy of your robot code will also make it a lot easier to troubleshoot. You can upload each of those to this issue thread in a .zip, or send them to me in an email if you don't want them public

SamCarlberg avatar Apr 09 '18 16:04 SamCarlberg

Absolutely. I will do that today and attach it to this thread. By "snapshot" you mean a simple screenshot of contents of the network tables displayed in the left side of the program right?

GaganBhat avatar Apr 09 '18 16:04 GaganBhat

No, an actual content dump. You can do that with File->Save State. That will create a .ini file containing everything in NetworkTables at the time you save it

SamCarlberg avatar Apr 09 '18 16:04 SamCarlberg

Can you zip the code for a minimal failing example and post it here? One of the CTRE developers offered to look at it to see what's up. We can then also test it with Shuffleboard.

bradamiller avatar Apr 10 '18 16:04 bradamiller

Sorry for the delayed response,

For the past week I have been trying to get the post-crash data, but Shuffleboard just doesn't respond anymore. I also couldn't find a "save state" option so I just saved it like I normally do. Here's the ZIP file with the command I am running, as well as the latest log files where I experienced the crash.

@bradamiller Although it's already in the zip file attached, here's a quick link to the minimal failing example. https://gist.github.com/GaganBhat/e64476c7b9ed5c256613572febfad156

logs_code.zip

GaganBhat avatar Apr 22 '18 14:04 GaganBhat

Sam is asking you to use the OutlineViewer tool that also comes with the wpilib plugins. Open both Shuffleboard and OutlineViewer and when Shuffleboard crashes, use OutlinrViewer to save the state.

sciencewhiz avatar Apr 22 '18 18:04 sciencewhiz

pre_post_save_states.zip

@sciencewhiz Thanks! I have attached the state of the network tables using the Outline Viewer in the zip file above. It has the states right before the crash as well as right after the crash.

It also includes the code for the command that is causing the crash.

GaganBhat avatar Apr 22 '18 18:04 GaganBhat