Announcement

Collapse

Technology Forum Has Moved!

The FIRST Tech Challenge Technology forum has moved to a new location! Please take a look at our forum blog for links and instructions on how to access the new forum.

The official blog of the FIRST Tech Challenge - a STEM robotics programs for students grades 7-12.


Note that volunteers (except for FTA/WTA/CSA will still access their role specific forum through this site. The blog also outlines how to access the volunteer forums.
See more
See less

256 character limit for all OpMode names

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 256 character limit for all OpMode names

    A team I mentor ran into a situation today with none of their OpModes showing up in the selector list on the Driver Station. Through the process of elimination (and the help of logcat), I was able to isolate the cause: there's a 256 character maximum size for the names of all of the OpMode's that are displayed in the drop-down list on the driver station. The specific output in logcat was:

    Code:
    10-24 17:13:50.761 I/FIRST   (19575): Processing Command: CMD_REQUEST_OP_MODE_LIST
    10-24 17:13:50.761 E/RobotCore(19575): Event loop threw an exception while processing a command
    10-24 17:13:50.761 E/RobotCore(19575): java.lang.IllegalArgumentException: command extra data length is too long (MAX: 256)
    10-24 17:13:50.761 E/RobotCore(19575): com.qualcomm.robotcore.robocol.Command.<init>(SourceFile:90)
    10-24 17:13:50.761 E/RobotCore(19575): com.qualcomm.ftccommon.FtcEventLoop.b(SourceFile:183)
    10-24 17:13:50.761 E/RobotCore(19575): com.qualcomm.ftccommon.FtcEventLoop.processCommand(SourceFile:161)
    10-24 17:13:50.761 E/RobotCore(19575): com.qualcomm.robotcore.eventloop.EventLoopManager.d(SourceFile:652)
    10-24 17:13:50.761 E/RobotCore(19575): com.qualcomm.robotcore.eventloop.EventLoopManager.d(SourceFile:60)
    10-24 17:13:50.761 E/RobotCore(19575): com.qualcomm.robotcore.eventloop.EventLoopManager$c.run(SourceFile:171)
    10-24 17:13:50.771 E/RobotCore(19575): java.lang.Thread.run(Thread.java:841)
    If you find that you have a lot of OpModes and suddenly your DS doesn't display any of them but you have no other errors anywhere, check to make sure your names aren't too long and/or shorten some names by removing underscores or spaces you might have in their names.

    I hope this saves someone some troubleshooting time!

    -- Gordon.

  • #2
    Originally posted by gorpong View Post
    A team I mentor ran into a situation today with none of their OpModes showing up in the selector list on the Driver Station. Through the process of elimination (and the help of logcat), I was able to isolate the cause: there's a 256 character maximum size for the names of all of the OpMode's that are displayed in the drop-down list on the driver station. T

    If you find that you have a lot of OpModes and suddenly your DS doesn't display any of them but you have no other errors anywhere, check to make sure your names aren't too long and/or shorten some names by removing underscores or spaces you might have in their names.

    -- Gordon.
    To clarify... this is a problem if the total length of all the opmode names combined are greater than 255 chars (not just a single name limit) ?

    Phil.

    Comment


    • #3
      Originally posted by Philbot View Post
      To clarify... this is a problem if the total length of all the opmode names combined are greater than 255 chars (not just a single name limit) ?

      Phil.
      Hmmm, good question, but my guess is even if you have a single opmode name that's > 255 characters you're going to be in trouble. If there's a problem with the total adding up, I don't know why you wouldn't also have trouble with a single one that's > 255, but I didn't actually test this. I don't even know what the DS would do with a single opmode name that was that long. I wonder if there's an implicit truncation on each name itself (whatever fits on the width of the ZTE Speed in portrait mode, perhaps?).

      Comment


      • #4
        If each name plus a record separator char plus the null terminating byte is converted to UTF-8 and is greater than 255 bytes, this error is thrown.

        Comment

        Working...
        X
        😀
        🥰
        🤢
        😎
        😡
        👍
        👎