FIRST Tech Challenge Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

"File error!" when trying to execute code on NXT Brick

The AutoMission1-v3.vi runs fine by itself.  The Autonomous template works fine by itself.  Put the two together and I get a "File error!" on the NXT brick as soon as I try to run it.

0 Kudos
Message 1 of 4
(9,447 Views)

Hi Jamie,

This error usually occurs when the NXT runs out of memory. Trying deleting all the programs off the brick and only adding this new program. Also, makes sure you're not allocating any very large arrays or using large strings that could be eating up the memory.

Let me know if this help!

Tanya V

Tanya Visser
National Instruments
LabVIEW Group Manager
0 Kudos
Message 2 of 4
(4,006 Views)

Thanks Tanya but that didn't end up helping.  At about 2:30 on Friday we had to punt.  We froze our code with the functionality we had been able to successfully implement and went to tournament.  Fortunately, the teleop and driving were could enough to carry the team through in spite of only a limitedly functional autonomous program.

I don't think the brick is running out of memory.  We have "room" for our Teleop, Program Chooser, Samostat, and our Autonomous on the brick.  We have re-flashed the brick, deleted all of the extra files (sound files, graphics etc), loaded only our automous leaving approx 40-50k free on the brick.  We go to run our automous and immediately get "File error!".

I notice that our autonomous program is about 62k in size.  Is there a 64k addressablility limitation or anything like that in LabVIEW code compiled for NXT?  Our program had reached the point where to add something here I had to delete something there so I am confident that we reached some kind of resource limit but it feels more like it is limited by something in the addressability model, stack size, heap size or something along those lines than actual free memory on the brick.  But that's just a feel.

I posted the complete code set in the zip file in my first post.  All it requires to re-create the error is an NXT brick at the appropriate ROM level.  No sensors or motors are needed.  It gets the error immediately as it is loading or starting the program.  We are using 1.31 but have also re-created the problem at 1.29.  If possible please try loading our code and see the error for yourself.  If you can tell us what is actually causing the error we can look at options work around it.  We need to add quite a bit more functionality to our autonomous program.  So if we are bumping up against a pure size limitation we may need to look at other options.  However if we are doing something drastically wrong which is causing an order of magnitude kind of efficiency problem then we have opportunities to fix it.

Thanks for your prompt response on Friday,

Jamie

0 Kudos
Message 3 of 4
(4,007 Views)

Hi Jamie,

Sorry for not replying sooner. I've been away for the last week. I have not yet had a chance to try running your code on my end. I just wanted to mention another possible reason for the error. Since this error is pretty generic, it could also mean that you are indexing a value in an array that doesn not exist. Does any part of your code work with arrays of any kind?

While waiting for your response, I will try to reproduce the problem here.

Take care!

Tanya V

Tanya Visser
National Instruments
LabVIEW Group Manager
0 Kudos
Message 4 of 4
(4,007 Views)