Problem While Debugging Code on the robot (Windriver)

Hello,
Yesterday we tried to run a commandbased code on our robot, we chose to debug the code and when it ran we clicked “Resume” as usual, but this time
not like any other time, we encountered an error -
http://img442.imageshack.us/img442/8624/errorae.png
After pushing “Yes” another window showed up:
http://img593.imageshack.us/img593/1934/anotheru.png

We thought that if we’ll close the current project and open another one the problem will disappear.
So, we did create another project and we copy-paste the files and ran the code, that problem happened again.

Just to make sure we tried to run a blank commandbased project and it worked perfectly.

Frustrated as we were, we decided to re-write the project part by part so we could find the source of the problem.

After doing this and waiting for the problem to appear, we found ourselves at the end of the project and the problem disappeared.

We are really curios about that and it’ll be great if someone could help us find out what was the source of the problem so we could avoid it in the future.

Did you use RobotBuilder to generate your code? There is a bug in RobotBuilder-r619, the version in the 2013 WPILib C++ update, that causes newly added subsystems and components to not be initialized in Robot.cpp when regenerating code, as described in this thread. This bug has since been fixed in r620+; you can download a newer version from FIRST Forge. You also might want to take a look at this thread, as it discusses the same or a similar linking error.

That message means that there is an unresolved symbol in the CommandBase class. The weird name for the symbol: “_ZN11CommandBase6pickUpE” is because there can be many symbols that have the same name (for example overloaded methods) and the compiler generates “mangled” names. This allows them to be different from one another even though they have the same name.

In CommandBase you usually list static pointers to all your subsystems, then include the “CommandBase.h” file in each command. This makes it possible for the commands to call methods on the subsystems.

Perhaps you referred to a class in CommandBase called pickUp that wasn’t defined there. If you use RobotBuilder, it automatically generates that file for you, but if you write the code by hand, you need to remember to add each subsystem to CommandBase. You can see more details if you look at the WPILib Cookbook which is located here:

http://firstforge.wpi.edu/sf/go/doc1297?nav=1

In any case, you seem to have it working now.

Brad