oblarg / oblog Goto Github PK
View Code? Open in Web Editor NEWJava Annotation-driven Shuffleboard-based logging library for FRC teams
License: GNU General Public License v3.0
Java Annotation-driven Shuffleboard-based logging library for FRC teams
License: GNU General Public License v3.0
It would be nice to a SendableChooser so that we can use Oblog for all of our debugging and be able to use it in our competition code aswell.
When implementing Loggable
on a class, if that class also has a list of references to loggables in a cycle, such as static references to itself, the recursion does not terminate until a stack overflow causes a crash. Example output from crash:
Error at java.base/jdk.internal.misc.Unsafe.allocateUninitializedArray(Unsafe.java:1375): Unhandled exception: java.lang.StackOverflowError
at java.base/jdk.internal.misc.Unsafe.allocateUninitializedArray(Unsafe.java:1375)
at java.base/java.lang.StringConcatHelper.newArray(StringConcatHelper.java:494)
at java.base/java.lang.StringConcatHelper.newArrayWithSuffix(StringConcatHelper.java:475)
at edu.wpi.first.util.ErrorMessages.requireNonNullParam(ErrorMessages.java:27)
at edu.wpi.first.wpilibj.shuffleboard.ShuffleboardLayout.<init>(ShuffleboardLayout.java:24)
at edu.wpi.first.wpilibj.shuffleboard.ContainerHelper.getLayout(ContainerHelper.java:45)
at edu.wpi.first.wpilibj.shuffleboard.ShuffleboardLayout.getLayout(ShuffleboardLayout.java:34)
at edu.wpi.first.wpilibj.shuffleboard.ShuffleboardContainer.getLayout(ShuffleboardContainer.java:49)
at io.github.oblarg.oblog.WrappedShuffleboardLayout.getLayout(WrappedShuffleboardLayout.java:21)
at io.github.oblarg.oblog.Logger.logLoggable(Logger.java:1342)
at io.github.oblarg.oblog.Logger.lambda$logLoggable$68(Logger.java:1396)
at io.github.oblarg.oblog.Logger.logLoggable(Logger.java:1461)
at io.github.oblarg.oblog.Logger.lambda$logLoggable$68(Logger.java:1396)
at io.github.oblarg.oblog.Logger.logLoggable(Logger.java:1461)
at io.github.oblarg.oblog.Logger.lambda$logLoggable$68(Logger.java:1396)
at io.github.oblarg.oblog.Logger.logLoggable(Logger.java:1461)
at io.github.oblarg.oblog.Logger.lambda$logLoggable$68(Logger.java:1396)
at io.github.oblarg.oblog.Logger.logLoggable(Logger.java:1461)
at io.github.oblarg.oblog.Logger.lambda$logLoggable$68(Logger.java:1396)
...truncated...
For example
public class MyClass implements Loggable {
private List<MyClass> references;
private static List <MyClass> staticReferences
}
This is the specific class that fails once brought to 2023 and add Loggable
Added everything into build.gradle from prior project Oblog 3.1.2 after updating to the beta3 wpilib project. Did not resolve the Oblog classes (logger, config, etc). So showed as a problem. Was able to build robot code with highlighted Oblog problems, but produced errors when deploying on robot. Will try to get more info on them.
1 not available, check if controller is plugged in CS: USB Camera 0: Connecting to USB camera on /dev/video0 Unhandled exception: java.lang.ClassNotFoundException: edu.wpi.first.wpilibj.Sendable Error at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source): Unhandled exception: java.lang.ClassNotFoundException: edu.wpi.first.wpilibj.Sendable The robot program quit unexpectedly. This is usually due to a code error. The above stacktrace can help determine where the error occurred. See https://wpilib.org/stacktrace for more information. at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source) The startCompetition() method (or methods called by it) should have handled the exception above. at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) at frc.robot.Robot.robotInit(Robot.java:36) at edu.wpi.first.wpilibj.TimedRobot.startCompetition(TimedRobot.java:107) at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:373) at edu.wpi.first.wpilibj.RobotBase.startRobot(RobotBase.java:463) at frc.robot.Main.main(Main.java:27) Warning at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:388): The robot program quit unexpectedly. This is usually due to a code error.
I did remove Oblog and was able to successfully deploy robot code, so I think the problem is within it.
Attempting to @Log
certain types, such as integer arrays, causes a silent crash. Even if logging types such as integer arrays is not intended behavior / intended to work, the program will throw an error that the startCompetition() method failed without referencing Oblog or the @log annotation, which makes troubleshooting more difficult.
Silently Crashing Code:
@Log(name = "TestOutput")
private int[] getColorFromSensor()
{
...
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.