Go to Post studies have shown that postive feedback works better. Driver should get a shock until he obtains target lock, then it stops. Performance incentive :^) - KenWittlief [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 02-22-2016, 11:00 AM
ncarvo ncarvo is offline
Registered User
FRC #5473 (Team Spitfire)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2012
Location: Grand Rapids
Posts: 5
ncarvo is an unknown quantity at this point
Driver Station long error

My code compiles but when in the driver station i get this long error message that no one understands.


ERROR Unhandled exception instantiating robot org.usfirst.frc.team5473.robot.Robot java.lang.RuntimeException: Code: -1029. HAL: Resource already allocated at [edu.wpi.first.wpilibj.hal.PWMJNI.allocatePWMChanne l(Native Method), edu.wpi.first.wpilibj.PWM.initPWM(PWM.java:117), edu.wpi.first.wpilibj.PWM.<init>(PWM.java:134), edu.wpi.first.wpilibj.SafePWM.<init>(SafePWM.java: 35), edu.wpi.first.wpilibj.Talon.<init>(Talon.java:51), edu.wpi.first.wpilibj.RobotDrive.<init>(RobotDrive .java:95), org.usfirst.frc.team5473.robot.Robot.<init>(Robot. java:46), sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method), sun.reflect.NativeConstructorAccessorImpl.newInsta nce(NativeConstructorAccessorImpl.java:62), sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:45) , java.lang.reflect.Constructor.newInstance(Construc tor.java:408), java.lang.Class.newInstance(Class.java:433), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:204)]




please help. need solution asap.
Reply With Quote
  #2   Spotlight this post!  
Unread 02-22-2016, 11:09 AM
pblankenbaker pblankenbaker is offline
Registered User
FRC #0868
 
Join Date: Feb 2012
Location: Carmel, IN, USA
Posts: 102
pblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of light
Re: Driver Station long error

The stack trace (error output) indicates that you have a problem at line 46 in your Robot.java code.

The error message indicates that you tried to use the same PWM port in the construction of more than one SpeedController or Servo.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-22-2016, 11:22 AM
VrewDaive VrewDaive is offline
Registered User
FRC #4284
 
Join Date: Sep 2015
Location: Cincinnati
Posts: 21
VrewDaive is an unknown quantity at this point
Re: Driver Station long error

Read through your code very thoroughly, odds are you declared something incorrectly or you put something in the wrong spot. I could try and help if you post code
Reply With Quote
  #4   Spotlight this post!  
Unread 02-22-2016, 11:58 AM
abigailthefox's Avatar
abigailthefox abigailthefox is offline
Registered User
FRC #1711 (Raptors)
Team Role: Programmer
 
Join Date: Feb 2015
Rookie Year: 2015
Location: Traverse City
Posts: 48
abigailthefox is an unknown quantity at this point
Re: Driver Station long error

Quote:
Originally Posted by ncarvo View Post
(Robot.java:46)
There's your error!!
Any time you get a ridiculously long error message (I've been getting several of these over the past few days as we restructure some code), look through it to identify any java file YOU wrote...i.e. Robot.java. The other .java files are from the wpilib, and can help you see what element of the code is causing the problem. Also, the Robot.java:46 shows that the error (as mentioned by someone earlier) is at line 46.
Open up Eclipse (or whatever development environment you're using), and scroll down to line 46 in your Robot.java file.
There may not be any explicit errors, so you'll have to look at what exactly is written there. Chances are, it's a problem with a class from the wpilib that you're calling for the first time, and from the rest of the error message, it looks like potentially a Talon/PWM port issue.
Check to see where you declare the port that your PWM plugs into (usually declared in the RobotMap, or at the top of a class), and make sure there's no duplicates (i.e. Talon 1 is being assigned to port 0, and Talon 2 is also being assigned to port 0). This may not be obvious, especially if you've redone your code a few times, or physically moved things around. Also, make sure to look at the physical robot, and where everything is plugged into the RoboRIO. Make sure that the assigned port in the code matches the port that it is physically plugged into on the RoboRIO.
If everything lines up and you're still getting an error, post some code and we can try to help you out!!
Reply With Quote
  #5   Spotlight this post!  
Unread 02-22-2016, 10:27 PM
ncarvo ncarvo is offline
Registered User
FRC #5473 (Team Spitfire)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2012
Location: Grand Rapids
Posts: 5
ncarvo is an unknown quantity at this point
Re: Driver Station long error

Thanks, guys, works now.
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:00 AM.

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