Hi,
I've done the changes in FileIO.cpp you suggested but I still have problems with "some" files greater than 63 Bytes. I say "some" files because i can read other files bigger than 63 bytes without problems.
Here the code I use for the test
Can you give a spin to a nightly version of the IDE? http://arduino.cc/en/Main/Software#toc4
They includes all the latest fixes including that from dreggy and are candidate to be next IDE release
First of all thanks for your message.
I've given a try to the nightly version of the IDE.
First try : I've inserted in the IDE 1.5.4 the fileio.cpp and fileio.h files taken from the nightly version of the IDE.
No luck, problem still present.
Second try: I started the full nightly version of the IDE, loading the sketch to test the read from a file written on the SD card behaivour.
Again no luck.
I' really curious to understand why whit one test file (test4.txt) I haven't problem and with the other one (test1.txt) such strange error appear.
Thanks again for your help.
Regards.
Fabio
I've checked your sketch with file1.txt and the problem randomly happens (about 1 time out of 4 or 5).
Would you like to try to change the /usr/bin/run-bridge script on the yun with the following:
#!/bin/sh
cd /usr/lib/python2.7/bridge
exec python -u bridge.py 2> /tmp/bridge.py-stderr.log
I've added the "-u" flag on the last line, that tells python to not line-buffer incoming data from the 32u4.
After this change I wasn't able to reproduce the bug, anymore, I want to know how it works for you.
Hi,
your suggestion seem to have solved the problem I've pointed out.
I've tried several time with different file size and different kind of file and the bug did'nt arose.
Thanks a lot for your help. I've declared the issue as solved.