{"action":"created","issue":{"url":"https://api.github.com/repos/wpilibsuite/allwpilib/issues/951","repository_url":"https://api.github.com/repos/wpilibsuite/allwpilib","labels_url":"https://api.github.com/repos/wpilibsuite/allwpilib/issues/951/labels{/name}","comments_url":"https://api.github.com/repos/wpilibsuite/allwpilib/issues/951/comments","events_url":"https://api.github.com/repos/wpilibsuite/allwpilib/issues/951/events","html_url":"https://github.com/wpilibsuite/allwpilib/issues/951","id":298386345,"number":951,"title":"ArrayIndexOutOfBoundsException in Command Scheduler","user":{"login":"Javaru","id":2196944,"avatar_url":"https://avatars1.githubusercontent.com/u/2196944?v=4","gravatar_id":"","url":"https://api.github.com/users/Javaru","html_url":"https://github.com/Javaru","followers_url":"https://api.github.com/users/Javaru/followers","following_url":"https://api.github.com/users/Javaru/following{/other_user}","gists_url":"https://api.github.com/users/Javaru/gists{/gist_id}","starred_url":"https://api.github.com/users/Javaru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Javaru/subscriptions","organizations_url":"https://api.github.com/users/Javaru/orgs","repos_url":"https://api.github.com/users/Javaru/repos","events_url":"https://api.github.com/users/Javaru/events{/privacy}","received_events_url":"https://api.github.com/users/Javaru/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-19T19:57:03Z","updated_at":"2018-02-20T18:09:07Z","closed_at":null,"author_association":"NONE","body":"While a \"While Held\" command is executing, the following exception frequently happens. It causes the Robot to crash and restart the robot code. This is with WPILib v2018.3.3\r\n\r\n```\r\nERROR  1  Unhandled exception: java.lang.ArrayIndexOutOfBoundsException: 1  java.lang.Thread.run(Thread.java:748)\r\n\tat edu.wpi.first.wpilibj.command.Scheduler.lambda$initSendable$0(Scheduler.java:339)\r\n\tat edu.wpi.first.wpilibj.smartdashboard.SendableBuilderImpl.updateTable(SendableBuilderImpl.java:86)\r\n\tat edu.wpi.first.wpilibj.livewindow.LiveWindow.updateValues(LiveWindow.java:282)\r\n\tat edu.wpi.first.wpilibj.IterativeRobotBase.loopFunc(IterativeRobotBase.java:227)\r\n\tat edu.wpi.first.wpilibj.TimedRobot.lambda$new$0(TimedRobot.java:30)\r\n\tat edu.wpi.first.wpilibj.Notifier.lambda$new$0(Notifier.java:97)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\n\r\nError at java.lang.Thread.run(Thread.java:748): Unhandled exception: java.lang.ArrayIndexOutOfBoundsException: 1\r\n\tat edu.wpi.first.wpilibj.command.Scheduler.lambda$initSendable$0(Scheduler.java:339)\r\n\tat edu.wpi.first.wpilibj.smartdashboard.SendableBuilderImpl.updateTable(SendableBuilderImpl.java:86)\r\n\tat edu.wpi.first.wpilibj.livewindow.LiveWindow.updateValues(LiveWindow.java:282)\r\n\tat edu.wpi.first.wpilibj.IterativeRobotBase.loopFunc(IterativeRobotBase.java:227)\r\n\tat edu.wpi.first.wpilibj.TimedRobot.lambda$new$0(TimedRobot.java:30)\r\n\tat edu.wpi.first.wpilibj.Notifier.lambda$new$0(Notifier.java:97)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\n\r\nWARNING  1  Robots should not quit, but yours did!  edu.wpi.first.wpilibj.Notifier.lambda$new$1(Notifier.java:108)\r\nWarning at edu.wpi.first.wpilibj.Notifier.lambda$new$1(Notifier.java:108)14:36:00.177 : Robots should not quit, but yours did!\r\nERROR  1  The loopFunc() method (or methods called by it) should have handled the exception above.  edu.wpi.first.wpilibj.Notifier.lambda$new$1(Notifier.java:109)\r\n\r\nError at edu.wpi.first.wpilibj.Notifier.lambda$new$1(Notifier.java:109): The loopFunc() method (or methods called by it) should have handled the exception above.\r\nWARNING  0  [Phoenix] Shutdown cleanly  \r\n********** Robot program starting **********\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/wpilibsuite/allwpilib/issues/comments/367066530","html_url":"https://github.com/wpilibsuite/allwpilib/issues/951#issuecomment-367066530","issue_url":"https://api.github.com/repos/wpilibsuite/allwpilib/issues/951","id":367066530,"user":{"login":"ThadHouse","id":7727148,"avatar_url":"https://avatars1.githubusercontent.com/u/7727148?v=4","gravatar_id":"","url":"https://api.github.com/users/ThadHouse","html_url":"https://github.com/ThadHouse","followers_url":"https://api.github.com/users/ThadHouse/followers","following_url":"https://api.github.com/users/ThadHouse/following{/other_user}","gists_url":"https://api.github.com/users/ThadHouse/gists{/gist_id}","starred_url":"https://api.github.com/users/ThadHouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThadHouse/subscriptions","organizations_url":"https://api.github.com/users/ThadHouse/orgs","repos_url":"https://api.github.com/users/ThadHouse/repos","events_url":"https://api.github.com/users/ThadHouse/events{/privacy}","received_events_url":"https://api.github.com/users/ThadHouse/received_events","type":"User","site_admin":false},"created_at":"2018-02-20T18:09:07Z","updated_at":"2018-02-20T18:09:07Z","author_association":"MEMBER","body":"All of the code in the command infrastructure is not multi threading safe. It only properly works with a single thread, and trying to run and cancel commands from multiple commands, is unsupported, and would definitely cause this issue given enough time. I would recommend moving all of your command based code to a single thread and seeing if you detect this error again. "}}
{"actor":{"display_login":"ThadHouse"}}