FIRST Forums  

Go Back   FIRST Forums > General Discussions > FIRST Programs > FIRST LEGO League > The Challenge > Programming

Reply
 
Thread Tools
  #1  
Old 12-22-2011, 12:53 PM
apratt2003 apratt2003 is offline
Junior Member
 
Join Date: Dec 2011
Posts: 29
Unhappy File Error

Greetings everyone,

My kids keep getting a file error on the brick when they add one more color sensor wait block to the end of their program. They can add other actions fine without error. File size is only 37K with all other programs deleted on the brick.

Any ideas?

Andy Pratt
Team #55
Middletown, RI
Reply With Quote
  #2  
Old 12-22-2011, 01:30 PM
ISHW ISHW is offline
Junior Member
 
Join Date: Nov 2011
Location: San Bruno, CA
Posts: 21
Default Re: File Error

I fear your team ran into a bug that other teams apparently also encounter.
http://forums.usfirst.org/showthread.php?t=18316

I would try first to isolate the problem. Maybe do the following:
  • Create a small program consisting of one move block (unlimited) and add the suspicious wait-for-color-sensor. See if it works without file error.
  • Replace the wait-for-color-sensor in the original program with the same (working) block you created in the small program (copy / paste). Do you get a file error now?

You write your kids can add other actions to the program. Instead of wait-for-color try a wait-for-light or a wait-for-touch for testing purposes. Do you get the file error?

I fear if you are not able to isolate the problem, then a more complex bug is the culprit. My team ran into a similar problem when trying to create a menu program that links all tournament programs together. We were not able to solve the problem, but maybe your experience provides a further hint where to search.
__________________
Claus, Coach "It Should Have Worked", San Bruno 4-H
Reply With Quote
  #3  
Old 12-22-2011, 02:06 PM
apratt2003 apratt2003 is offline
Junior Member
 
Join Date: Dec 2011
Posts: 29
Default Re: File Error

we took the risk and updated firmware from 1.28 to 1.31. No change in file error status.

changed wait block from color sensor to time, works fine.

the team uses this same wait block many times earlier in the program and works fine. we even ctrl-drag copy a good block with no success.

it almost seems to be a file size problem, but there is more than double the amount of free storage.

to be continued...
Reply With Quote
  #4  
Old 12-22-2011, 02:39 PM
Dean Hystad Dean Hystad is offline
Senior Member
 
Join Date: Sep 2008
Location: Minnesota
Posts: 1,698
Default Re: File Error

Quote:
Originally Posted by apratt2003 View Post
we took the risk and updated firmware from 1.28 to 1.31. No change in file error status.

changed wait block from color sensor to time, works fine.

the team uses this same wait block many times earlier in the program and works fine. we even ctrl-drag copy a good block with no success.

it almost seems to be a file size problem, but there is more than double the amount of free storage.

to be continued...
I don't think this is a file size problem. You said you can replace this block with a timed wait and the program works. If anything replacing the color sensor wait with a timed wait made the program bigger. In NXT you pay a big memory penalty the first time you use a block and a small penalty every time after.

I would look at the "last block in the program" being a problem and "uses the same wait block many times earlier in the program" being fine. What happens if you add some blocks after the color sensor wait?
Reply With Quote
  #5  
Old 12-22-2011, 02:51 PM
apratt2003 apratt2003 is offline
Junior Member
 
Join Date: Dec 2011
Posts: 29
Default Re: File Error

Tested problem on 3 bricks. Same results.

Added 12-15 move blocks to end of program, with out color sensor wait block. no problems.

can have multiple color sensor wait blocks in a "new" program. no problems.

ctrl-drag copy existing "working" color sensor wait block. "File Error" on brick. (see attched picture)

i am stumped
Attached Images
File Type: jpg Capture.JPG (61.8 KB, 16 views)
Reply With Quote
  #6  
Old 12-22-2011, 02:57 PM
Dean Hystad Dean Hystad is offline
Senior Member
 
Join Date: Sep 2008
Location: Minnesota
Posts: 1,698
Default Re: File Error

Quote:
Originally Posted by apratt2003 View Post
Tested problem on 3 bricks. Same results.

Added 12-15 move blocks to end of program, with out color sensor wait block. no problems.

can have multiple color sensor wait blocks in a "new" program. no problems.

ctrl-drag copy existing "working" color sensor wait block. "File Error" on brick. (see attched picture)

i am stumped
Does "Multiple color sensor blocks in a new program" equate to the same number of color sensor wait blocks in the program that is having problems?
Reply With Quote
  #7  
Old 12-22-2011, 02:58 PM
timdavid timdavid is online now
Senior Member
 
Join Date: Sep 2009
Location: Minnesota
Posts: 881
Default Re: File Error

Quote:
Originally Posted by apratt2003 View Post
Tested problem on 3 bricks. Same results.

Added 12-15 move blocks to end of program, with out color sensor wait block. no problems.

can have multiple color sensor wait blocks in a "new" program. no problems.

ctrl-drag copy existing "working" color sensor wait block. "File Error" on brick. (see attched picture)

i am stumped
What version of the PC/Mac NXT Mindstorms NXT-G software are you using?
Commercial versus Educational?
2.0 or 2.1?
PC versus Mac?
What operating system on the PC / Mac?

Can you create a pack and go file with the problem program and make it available for people to grab (via Dropbox or some other site) and try in another environment?

I'd be happy to try it on my local machines to see if I can recreate the error. I promise not to steal any of your code for tournament use...
Reply With Quote
  #8  
Old 12-22-2011, 03:34 PM
apratt2003 apratt2003 is offline
Junior Member
 
Join Date: Dec 2011
Posts: 29
Default Re: File Error

Quote:
Originally Posted by Dean Hystad View Post
Does "Multiple color sensor blocks in a new program" equate to the same number of color sensor wait blocks in the program that is having problems?
yes. i started with the same sequence:

move 75% unlimited
wait for white
move 75% unlimited
wait for black
move 75% unlimited
wait for white
move 75% unlimited
wait for blue
move 75% unlimited
wait for white
move 75% unlimited
wait for black
move 75% unlimited
wait for white

worked fine.
Reply With Quote
  #9  
Old 12-22-2011, 03:38 PM
apratt2003 apratt2003 is offline
Junior Member
 
Join Date: Dec 2011
Posts: 29
Default Re: File Error

Quote:
Originally Posted by timdavid View Post
What version of the PC/Mac NXT Mindstorms NXT-G software are you using?
Commercial versus Educational?
2.0 or 2.1?
PC versus Mac?
What operating system on the PC / Mac?

Can you create a pack and go file with the problem program and make it available for people to grab (via Dropbox or some other site) and try in another environment?

I'd be happy to try it on my local machines to see if I can recreate the error. I promise not to steal any of your code for tournament use...
PC version 2.0 commercial with windows vista. I never tried a pack and go file nor used dropbox, but i will give it a try.
Reply With Quote
  #10  
Old 12-22-2011, 03:50 PM
timdavid timdavid is online now
Senior Member
 
Join Date: Sep 2009
Location: Minnesota
Posts: 881
Default Re: File Error

Quote:
Originally Posted by apratt2003 View Post
PC version 2.0 commercial with windows vista. I never tried a pack and go file nor used dropbox, but i will give it a try.
If you haven't used dropbox, you can just create a zip file containing the pack and go file (.rbtx extension I think), and post a reply to this thread.
I'm not usually a fan of posting source on the forum, but you can delete the post after any volunteers have grabbed it to test.

The pack and go tool just creates a single file containing all the used MyBlocks for a program. Very convenient when trying to share programs between computers.
Reply With Quote
Reply

Tags
color sensor, file error


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
File Error and Compiler Error ISHW Programming 35 12-28-2011 07:46 AM
Mac OSX Error Code 1003: "A required file is broken" kaylitos Programming 2 08-24-2011 08:58 AM


All times are GMT -4. The time now is 02:17 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.