Go to Post The robot is never 'done' there is always something that can be done to improve it. - Jonathan Norris [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-03-2016, 19:30
Stevil99 Stevil99 is offline
Registered User
FRC #2495
 
Join Date: Jan 2014
Location: Hamilton
Posts: 2
Stevil99 is an unknown quantity at this point
Java Deploy Error

Hello, I tried deploying my code (https://github.com/FRC2495/2016-Java-FRC-Code.git) and am getting this error when i do:
➔ Launching «'/usr/local/frc/JRE/bin/java' '-jar' '/home/lvuser/FRCUserProgram.jar'»
platform: /Linux/arm/
********** Robot program starting **********
Error at edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:244): ERROR Unhandled exception: java.lang.StackOverflowError at [edu.wpi.first.wpilibj.communication.UsageReporting .report(UsageReporting.java:21), edu.wpi.first.wpilibj.communication.UsageReporting .report(UsageReporting.java:17), edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:70), org.usfirst.frc.team2495.robot.Robot.robotInit(Rob ot.java:51), edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:72), org.usfirst.frc.team2495.robot.Robot.robotInit(Rob ot.java:51), edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:72), org.usfirst.frc.team2495.robot.Robot.robotInit(Rob ot.java:51), edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:72), org.usfirst.frc.team2495.robot.Robot.robotInit(Rob ot.java:51), edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:72), org.usfirst.frc.team2495.robot.Robot.robotInit(Rob ot.java:51), edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:72), org.usfirst.frc.team2495.robot.Robot.robotInit(Rob ot.java:51), edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:72), org.usfirst.frc.team2495.robot.Robot.robotInit(Rob ot.java:51), edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:72), org.usfirst.frc.team2495.robot.Robot.robotInit(Rob ot.java:51), edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:72), org.usfirst.frc.team2495.robot.Robot.robotInit(Rob ot.java:51), (Continues on for a really long time.)]
WARNING: Robots don't quit!
---> The startCompetition() method (or methods called by it) should have handled the exception above.

Last edited by Stevil99 : 03-03-2016 at 19:41. Reason: That error continues on for a long time, shouldnt have posted the whole thing.
Reply With Quote
  #2   Spotlight this post!  
Unread 03-03-2016, 20:44
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Java Deploy Error

Looks like you have a run-away recursion. What is on line 51 in robot.java? It is somehow calling startCompetition.
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 05-03-2016, 19:04
Oromus's Avatar
Oromus Oromus is offline
Lead Programmer, Community Liason
AKA: Ryan
FRC #1902 (Exploding Bacon)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Florida
Posts: 80
Oromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to behold
Re: Java Deploy Error

The problem is here:

Code:
public void robotInit() {
    	
		oi = new OI();
       // autochooser = new SendableChooser();
        //autochooser.addDefault("Default Auto", new ExampleCommand());
//        chooser.addObject("My Auto", new MyAutoCommand());
       // SmartDashboard.putData("Auto mode", autochooser);
        
      startCompetition();
    }
Remove the startCompetition() line and it will fix the problem. robotInit() is called when you call startCompetition(), so calling startCompetition() in robotInit() causes an infinite loop (AKA, a StackOverflowError). Also, you shouldn't call startCompetition() anywhere, since that function is handled by FIRST.
__________________


2016 Roles: Manipulator, Strategy Co-Lead, Programmer
2016 Orlando Regional: Quarterfinalist (Captain w/ 1557, 5557 and 4352)
2016 Rocket City Regional: Quarterfinalist (w/ 283 and 34), Regional Chairman's Award Winner
2016 Championship: N/A (had fun and was inspired, that's what counts)
-------------
2015 Role: Programmer
2015 GSCR: Quarterfinalist (w/ 4189 and 4026), Regional Chairman's Award Winner
2015 Orlando Regional: Semifinalist (w/ 456 and 86), Imagery Award Winner
2015 Championship: Pit Safety Award Winner
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:20.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi