Thread: cant build
View Single Post
  #5   Spotlight this post!  
Unread 26-02-2010, 21:00
rellimcire rellimcire is offline
Robolopes Software Advisor
AKA: Eric Miller
FRC #2339 (Robolopes)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Lancaster, CA
Posts: 11
rellimcire is an unknown quantity at this point
Re: cant build

OK, I kind of owe Greg an apology. I did find an error, but I think my explanation is instructive. At least I didn't find this anywhere else.

First, although enabling debug allowed me to build, it turns out it wrecked my deployment. I'd build, then deploy. LabVIEW says all is OK. But after deploying the code would not run on the cRIO. The only way to run was from LabVIEW.

So I went back to the most recent version that built without enabling debug. (Lesson: I was saved a lot of grief because I make daily or more often backups of our project.) That version also deployed so the two problems are linked.

Since LabVIEW gave no clues, I took the current project and went back to the Teleop.vi that worked. Then I retraced my steps bit by bit until I found the step that broke it. Finally after a couple of hours I found it was caused by a new sub vi. That vi referenced the drive motors (specifically arcade drive) which is a logical conflict with the reference in Teleop.vi. Cleared that up and everything builds OK and deploys OK. WHEW!

I started by saying I "kind of" owed Greg an apology. He was right that something was wrong. However, LabVIEW gave no clue as to what. Only the build failed. I could run from LabVIEW despite the problem. The wrong thing is what I normally think of as a runtime error, not a build time error. So, yes, something was wrong, but it's not real helpful to have to disassemble code blindly hoping to find the problem. Plus, it's surprising that the LabVIEW build and deploy pick up a runtime error, but running my code in debug mode through LabVIEW completely misses the error.

Glad I found the problem. Hope this helps someone else.
Reply With Quote