Everyone is reading way too much into this. The game piece is clearly a bunch of Opahs this year. Problem solved, case closed. Start designing your fish handling robots now. - Ryan Dognaux [more]
I'm not sure why this would be freed at after that for loop. It looks like there are other functions that want to access that array later on. It should be freed somewhere else (perhaps a destructor), but I don't think that this is the source of the problem. It appears it's only called at most twice during the program's run before it crashes.
As mentioned already, that Elevator_Mechanism structure is very strange looking. It's difficult to follow, so I can't say for sure whether or not that part would work.
Spoiler for incorrect information:
Here's what I noticed at a quick glance in the constructor's initialization list:
This is because the constructor for Victor expects an int with the value of a PWM port, and instead you're passing a pointer to a Victor. Since there are checks to make sure a valid PWM channel number is provided, I'd expect an IndexOutOfRange ("Allocating channel or module that is out of range") fatal error to be thrown by WPILib.
This is a situation where it would be useful to post the console output. The debugger would also be a valuable tool to use.
2010 WPI Engineering Inspiration Award 2010 WPI Regional Champions (Thanks 230 & 20!) 2010 CT VEX Champions 2010 CT VEX Innovate Award 2009 QCC VEX Champions 2009 CT Motorola Quality Award 2007 CT J&J Sportsmanship Award 2006 CT Best Website Award