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.

https://firsttechchallenge.blogspot....orum-blog.html

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

RC app crashing while editing config file

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

  • RC app crashing while editing config file

    The RC app is crashing while editing a config file on our ZTE Speed. Here's a video showing what's happening: https://drive.google.com/open?id=0B8...G1VQ2ZZczZoSlE

    But get this - I plugged in my Nexus 7 and deployed the app to that, and I also coped the config file on our ZTE Speed to my Nexus 7.

    Guess what? Doing the exact same thing on my Nexus 7 does not cause a crash.

    Both my Nexus 7 and the ZTE Speed are running Android 4.4.4, and SDK version 2.4 (this also happens with 2.35)

    What the heck?

  • #2
    Here's the stacktrace of the crash:

    Code:
    V/RobotCore( 5089): EditLegacyModuleControllerActivity: activity result: code=1 result=0
    D/dalvikvm( 5089): GC_FOR_ALLOC freed 1377K, 45% free 6210K/11140K, paused 22ms, total 22ms
    D/AndroidRuntime( 5089): Shutting down VM
    W/dalvikvm( 5089): threadid=1: thread exiting with uncaught exception (group=0x415edd58)
    E/AndroidRuntime( 5089): FATAL EXCEPTION: main
    E/AndroidRuntime( 5089): Process: com.qualcomm.ftcrobotcontroller, PID: 5089
    E/AndroidRuntime( 5089): java.lang.NullPointerException
    E/AndroidRuntime( 5089): 	at com.qualcomm.ftccommon.configuration.EditActivity$1.itemViewFromSpinnerItem(EditActivity.java:485)
    E/AndroidRuntime( 5089): 	at com.qualcomm.ftccommon.configuration.EditActivity$1.onItemSelected(EditActivity.java:468)
    E/AndroidRuntime( 5089): 	at android.widget.AdapterView.fireOnSelected(AdapterView.java:893)
    E/AndroidRuntime( 5089): 	at android.widget.AdapterView.selectionChanged(AdapterView.java:880)
    E/AndroidRuntime( 5089): 	at android.widget.AdapterView.checkSelectionChanged(AdapterView.java:1043)
    E/AndroidRuntime( 5089): 	at android.widget.AdapterView.handleDataChanged(AdapterView.java:1023)
    E/AndroidRuntime( 5089): 	at android.widget.AbsSpinner.onMeasure(AbsSpinner.java:180)
    E/AndroidRuntime( 5089): 	at android.widget.Spinner.onMeasure(Spinner.java:482)
    E/AndroidRuntime( 5089): 	at android.view.View.measure(View.java:16514)
    E/AndroidRuntime( 5089): 	at android.widget.RelativeLayout.measureChild(RelativeLayout.java:689)
    E/AndroidRuntime( 5089): 	at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:473)
    E/AndroidRuntime( 5089): 	at android.view.View.measure(View.java:16514)
    E/AndroidRuntime( 5089): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
    E/AndroidRuntime( 5089): 	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404)
    E/AndroidRuntime( 5089): 	at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
    E/AndroidRuntime( 5089): 	at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
    E/AndroidRuntime( 5089): 	at android.view.View.measure(View.java:16514)
    E/AndroidRuntime( 5089): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
    E/AndroidRuntime( 5089): 	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404)
    E/AndroidRuntime( 5089): 	at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
    E/AndroidRuntime( 5089): 	at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
    E/AndroidRuntime( 5089): 	at android.view.View.measure(View.java:16514)
    E/AndroidRuntime( 5089): 	at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:719)
    E/AndroidRuntime( 5089): 	at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:455)
    E/AndroidRuntime( 5089): 	at android.view.View.measure(View.java:16514)
    E/AndroidRuntime( 5089): 	at android.widget.TableRow.getColumnsWidths(TableRow.java:312)
    E/AndroidRuntime( 5089): 	at android.widget.TableLayout.findLargestCells(TableLayout.java:508)
    E/AndroidRuntime( 5089): 	at android.widget.TableLayout.measureVertical(TableLayout.java:473)
    E/AndroidRuntime( 5089): 	at android.widget.TableLayout.onMeasure(TableLayout.java:439)
    E/AndroidRuntime( 5089): 	at android.view.View.measure(View.java:16514)
    E/AndroidRuntime( 5089): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
    E/AndroidRuntime( 5089): 	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404)
    E/AndroidRuntime( 5089): 	at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
    E/AndroidRuntime( 5089): 	at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
    E/AndroidRuntime( 5089): 	at android.view.View.measure(View.java:16514)
    E/AndroidRuntime( 5089): 	at android.widget.ScrollView.measureChildWithMargins(ScrollView.java:1226)
    E/AndroidRuntime( 5089): 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    E/AndroidRuntime( 5089): 	at android.widget.ScrollView.onMeasure(ScrollView.java:326)
    E/AndroidRuntime( 5089): 	at android.view.View.measure(View.java:16514)
    E/AndroidRuntime( 5089): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
    E/AndroidRuntime( 5089): 	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404)
    E/AndroidRuntime( 5089): 	at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
    E/AndroidRuntime( 5089): 	at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
    E/AndroidRuntime( 5089): 	at android.view.View.measure(View.java:16514)
    E/AndroidRuntime( 5089): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
    E/AndroidRuntime( 5089): 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    E/AndroidRuntime( 5089): 	at android.view.View.measure(View.java:16514)
    E/AndroidRuntime( 5089): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
    E/AndroidRuntime( 5089): 	at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404)
    E/AndroidRuntime( 5089): 	at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
    E/AndroidRuntime( 5089): 	at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
    E/AndroidRuntime( 5089): 	at android.view.View.measure(View.java:16514)
    E/AndroidRuntime( 5089): 	at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
    E/AndroidRuntime( 5089): 	at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    E/AndroidRuntime( 5089): 	at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2294)
    E/AndroidRuntime( 5089): 	at android.view.View.measure(View.java:16514)
    E/AndroidRuntime( 5089): 	at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1912)
    E/AndroidRuntime( 5089): 	at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1109)
    E/AndroidRuntime( 5089): 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1291)
    E/AndroidRuntime( 5089): 	at android.vi
    W/ActivityManager(  815):   Force finishing activity com.qualcomm.ftcrobotcontroller/com.qualcomm.ftccommon.configuration.EditLegacyModuleControllerActivity

    Comment


    • #3
      Try clearing the RC's cache and/or data (Settings/Apps/FTC Robot Controller, then Clear cache or Clear data).

      Comment


      • #4
        Originally posted by Alec View Post
        Try clearing the RC's cache and/or data (Settings/Apps/FTC Robot Controller, then Clear cache or Clear data).
        That was the first thing I tried. I also tried completely uninstalling it before deploying it again from Android Studio.

        Here's the super weird part: editing the config file remotely from the DS phone does NOT cause a crash, and works fine!

        Comment


        • #5
          Great report... I have some questions.

          I notice in the video, you aren't actually connected to the robot hardware.
          I assume the same crash occurs if the hardware is present.

          Has this error always occured, or did it start after adding any particular device?

          Phil.

          Comment


          • #6
            Originally posted by Philbot View Post
            Great report... I have some questions.

            I notice in the video, you aren't actually connected to the robot hardware.
            I assume the same crash occurs if the hardware is present.

            Has this error always occured, or did it start after adding any particular device?

            Phil.
            I'm not sure if it still crashes when connected to the HW, but we have a meeting tonight and I'll test with the HW connected.

            The app only seems to crash when editing something inside of the Legacy Module. I know we didn't have this issue last season. I had to go and edit the XML file manually to get my code running

            Comment


            • #7
              The video shows you scrolling down to edit "Motor Controller 3" which is on port 3. I have a hunch that the scrolling is the cause of the problem. This raises a few questions:
              • On the Nexus 7, do you have to scroll to see "Motor Controller 3"?
              • On the ZTE Speed, if you move "Motor Controller 3" to port 1, does the app still crash?
              John McDonnell
              Volunteer, former mentor

              Comment


              • #8
                Originally posted by 4634 Programmer View Post
                ..we have a meeting tonight and I'll test with the HW connected.

                I'm so sorry I haven't reported back yet.
                I have been swamped with different things and our first qualifier is tomorrow.

                Comment


                • #9
                  Would it be possible to share the configuration .XML file?

                  Comment


                  • #10
                    Originally posted by FTC0417 View Post
                    Would it be possible to share the configuration .XML file?
                    Code:
                    <?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
                    <Robot type="FirstInspires-FTC">
                        <MotorController name="Motor Controller 2" serialNumber="AL00XUU9">
                            <Motor name="Left Flywheel" port="1" />
                            <Motor name="Right Flywheel" port="2" />
                        </MotorController>
                        <MotorController name="Motor Controller 1" serialNumber="AL00XU9V">
                            <Motor name="Left Drive Motor" port="1" />
                            <Motor name="Right Drive Motor" port="2" />
                        </MotorController>
                        <LegacyModuleController name="Legacy Module" serialNumber="AL00XPOY">
                            <ServoController name="Servo Controller" port="2">
                                <Servo name="Right Beacon Activator" port="1" />
                                <Servo name="Left Beacon Activator" port="2" />
                            </ServoController>
                            <MotorController name="Motor Controller 3" port="3">
                                <Motor name="Ballevator" port="1" />
                                <Motor name="Noodle Flipping Thingy" port="2" />
                            </MotorController>
                            <MotorController name="Motor Controller 4" port="4">
                                <Motor name="liftStage1" port="1" />
                                <Motor name="liftStage2" port="2" />
                            </MotorController>
                        </LegacyModuleController>
                    </Robot>

                    Comment


                    • #11
                      Originally posted by JohnMcDonnell View Post
                      The video shows you scrolling down to edit "Motor Controller 3" which is on port 3. I have a hunch that the scrolling is the cause of the problem. This raises a few questions:
                      • On the Nexus 7, do you have to scroll to see "Motor Controller 3"?
                      • On the ZTE Speed, if you move "Motor Controller 3" to port 1, does the app still crash?
                      Scrolling has nothing to do with it, because I also tried it on one of our member's Nexus 5 (which did require scrolling) and it did not experience the crash.

                      Comment

                      Working...
                      X