Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

RobotLog.logMatch() sometimes crashes EventLoop when restarting robot while OpMode is running #88

Closed
Windwoes opened this issue Oct 15, 2019 · 1 comment

Comments

@Windwoes
Copy link
Member

Sometimes RobotLog.logMatch() will crash the EventLoop with a NullPointerException if the robot is restarted while an OpMode is running. Most of the time the exception is caught and handled just as if the user code had crashed, but occasionally the entire app will go down. Here's the stacktrace:


2019-10-14 20:36:52.495 15358-15850/com.qualcomm.ftcrobotcontroller E/EventLoopManager: Event loop threw an exception
2019-10-14 20:36:52.505 15358-15850/com.qualcomm.ftcrobotcontroller E/EventLoopManager: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.Calendar.get(int)' on a null object reference
2019-10-14 20:36:52.507 15358-15850/com.qualcomm.ftcrobotcontroller E/EventLoopManager:     at com.qualcomm.robotcore.util.RobotLog.logMatch(RobotLog.java:637)
2019-10-14 20:36:52.512 15358-15850/com.qualcomm.ftcrobotcontroller E/EventLoopManager:     at com.qualcomm.robotcore.util.RobotLog.stopMatchLogging(RobotLog.java:608)
2019-10-14 20:36:52.519 15358-15850/com.qualcomm.ftcrobotcontroller E/EventLoopManager:     at org.firstinspires.ftc.robotcore.internal.opmode.OpModeManagerImpl.stopActiveOpMode(OpModeManagerImpl.java:286)
2019-10-14 20:36:52.520 15358-15850/com.qualcomm.ftcrobotcontroller E/EventLoopManager:     at com.qualcomm.ftccommon.FtcEventLoop.processOpModeStopRequest(FtcEventLoop.java:403)
2019-10-14 20:36:52.521 15358-15850/com.qualcomm.ftcrobotcontroller E/EventLoopManager:     at com.qualcomm.ftccommon.FtcEventLoop.loop(FtcEventLoop.java:206)
2019-10-14 20:36:52.523 15358-15850/com.qualcomm.ftcrobotcontroller E/EventLoopManager:     at com.qualcomm.robotcore.eventloop.EventLoopManager$EventLoopRunnable$1.run(EventLoopManager.java:301)
2019-10-14 20:36:52.524 15358-15850/com.qualcomm.ftcrobotcontroller E/EventLoopManager:     at com.qualcomm.robotcore.util.ThreadPool.logThreadLifeCycle(ThreadPool.java:737)
2019-10-14 20:36:52.526 15358-15850/com.qualcomm.ftcrobotcontroller E/EventLoopManager:     at com.qualcomm.robotcore.eventloop.EventLoopManager$EventLoopRunnable.run(EventLoopManager.java:244)
2019-10-14 20:36:52.528 15358-15850/com.qualcomm.ftcrobotcontroller E/EventLoopManager:     at com.qualcomm.robotcore.eventloop.EventLoopManager$1.run(EventLoopManager.java:569)
2019-10-14 20:36:52.529 15358-15850/com.qualcomm.ftcrobotcontroller E/EventLoopManager:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
2019-10-14 20:36:52.530 15358-15850/com.qualcomm.ftcrobotcontroller E/EventLoopManager:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
2019-10-14 20:36:52.530 15358-15850/com.qualcomm.ftcrobotcontroller E/EventLoopManager:     at com.qualcomm.robotcore.util.ThreadPool$ThreadFactoryImpl$1.run(ThreadPool.java:793)
2019-10-14 20:36:52.531 15358-15850/com.qualcomm.ftcrobotcontroller E/EventLoopManager:     at java.lang.Thread.run(Thread.java:761)
2019-10-14 20:36:52.531 15358-15850/com.qualcomm.ftcrobotcontroller V/RobotCore: RobotCoreException in EventLoopManager: EventLoop Exception in loop(): NullPointerException - Attempt to invoke virtual method 'int java.util.Calendar.get(int)' on a null object reference
2019-10-14 20:36:52.531 15358-15850/com.qualcomm.ftcrobotcontroller V/RobotCore: EventLoopManager state is EMERGENCY_STOP
2019-10-14 20:36:52.532 15358-15850/com.qualcomm.ftcrobotcontroller V/RobotCore: Robot Status: EMERGENCY STOP
@Windwoes
Copy link
Member Author

Fixed in v5.4

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant