debugger help

Now that the season is over, it is time to try Wind River again. The last time I tried, I got tossed an error by the debugger. Neither I nor the mentor there could figure it out as all we got was a disassembled listing of the code. There was no error message aside from terminating the control loop with a message saying error. We have it narrowed down to one of three places. It seemed to stop somewhere around my call to the constructor of an accelerometer. However, in teh debugger window, there were two classes listed. There was the DS class and the Compressor class (both near that call to the accelerometer class). They had the same two methods listed under them (can’t remember the exact names and I can’t get to our CRIO for a week). Neither could be run. If anyone has any idea what might be going on, or even if there is any way to get a C++ version of the code instead of assembly, please let me know. Thanks in advance.

I have found that generally when it does that, it means that there is a bad pointer somewhere.

Did you specify the slot of the accelerometer? If you specify the wrong one, or really if specify something wrong when creating it then you will get bad results, because the internal functions reference an object and if it never gets created… then invalid memory references happen. You might want to try launching a target console and see if there are error messages there, since the WPILib does not break into the debugger when asserts occur (which is incredibly annoying, actually).

You could also try running the code in my test harness (http://www.chiefdelphi.com/forums/showthread.php?t=75811), though I don’t think it supports accelerometers – but many other problems (like NULL pointers and such) its pretty good at catching.