Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   'No Robot Code' Message After Seemingly Successful Upload (http://www.chiefdelphi.com/forums/showthread.php?t=134623)

akatt99 14-02-2015 21:50

'No Robot Code' Message After Seemingly Successful Upload
 
Hey everyone! I'm new on these forums, so please correct me if anything is not up to standard.

We're having a pretty big problem just days before this build season ends. We have programmed most of the aspects of our robot, and we need to test the robot and its full capabilities. We have a master project which contains all of the code merged together for the different parts of the robot's operation. We are able to build with no errors. The problems arise when deploying. Everything looks fine in the eclipse console when the code deploys; however, when the driver station is opened, we get the message saying 'No Robot Code.' Other projects deploy just fine. I don't believe it's a code issue, because multiple programmers have verified the code as correct, though I don't rule this out as a possible issue. I also don't think it's a project or workspace issue because the projects and workspaces have been switched multiple times for the same source code.

Any help would be appreciated.

Thanks! :)

thatprogrammer 14-02-2015 21:53

Re: 'No Robot Code' Message After Seemingly Successful Upload
 
Quote:

Originally Posted by akatt99 (Post 1444180)
Hey everyone! I'm new on these forums, so please correct me if anything is not up to standard.

We're having a pretty big problem just days before this build season ends. We have programmed most of the aspects of our robot, and we need to test the robot and its full capabilities. We have a master project which contains all of the code merged together for the different parts of the robot's operation. We are able to build with no errors. The problems arise when deploying. Everything looks fine in the eclipse console when the code deploys; however, when the driver station is opened, we get the message saying 'No Robot Code.' Other projects deploy just fine. I don't believe it's a code issue, because multiple programmers have verified the code as correct, though I don't rule this out as a possible issue. I also don't think it's a project or workspace issue because the projects and workspaces have been switched multiple times for the same source code.

Any help would be appreciated.

Thanks! :)

Check to make sure your code has only possible ports for objects. The same thing happened to me when I tried using a gyro in port 3 rather than 1 or 0.

jajabinx124 14-02-2015 21:55

Re: 'No Robot Code' Message After Seemingly Successful Upload
 
Have you checked your logs in the driver station for any errors? It's common for the code to build and deploy and then say no robot code when really it is something like a null pointer exception(coding error) etc. that is causing it to fail.

Joey1939 14-02-2015 21:57

Re: 'No Robot Code' Message After Seemingly Successful Upload
 
This has happened to me when the code throws an Exception (or equivalent in non-Java code) at startup/initialization. Check for errors in the rioLog or the window on the driver station.

alopex_rex 14-02-2015 21:58

Re: 'No Robot Code' Message After Seemingly Successful Upload
 
I've had this happen many many times, and it's always the result of a code issue. There are lots of things that won't cause compiler errors, but will cause the code to crash (and when the code crashes, the driver station will say there's no code.) Right after merging together a bunch of code is a prime time for errors to pop up. There's lots of things that could cause it; in the past it's often been variables that are used without being initialized, and this year we've done it with SmartDashboard (eg trying to read a variable that doesn't exist).

The best thing to do is often to comment out broad swathes of code, until it stops crashing, then to slowly add stuff in until you figure out what the problem lines are. If the separate parts worked by themselves, the natural first place to look would be the joints where they come together.

Hope this helps!

akatt99 14-02-2015 22:09

Re: 'No Robot Code' Message After Seemingly Successful Upload
 
Thanks for all the replies! I figured immediately after that some of the devices I was initializing as objects weren't hooked up yet, possibly causing errors when starting the code. I'll try re-deploying the code without these objects tomorrow to see if anything changes.


All times are GMT -5. The time now is 01:48.

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