help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

completly useless report of fwrite() problem


From: David Grohmann
Subject: completly useless report of fwrite() problem
Date: Mon, 07 May 2007 11:07:07 -0500
User-agent: Thunderbird 1.5.0.10 (Windows/20070221)

Disclaimer: this report is most likely useless and it is just to see if I am the only one experiencing something like it.

I have some code that writes out a bunch of data to a file. It does it in chunks. I compare the count returned from fwrite() with the number of items I sent in. It always comes back equal. But when reading the file back it is not of the correct size. So I think how is this possible and write in some additional checks that calls ftell(fid) after each chunk is written and checks it against what I believe the file length should be so far after each write. The check always comes out true and the file reads perfectly. Remove the call to ftell() and the problem appears again.

Actually finding the problem would be quite hard for me to boil the code down to the point where it looks like the example above. Calling ftell() seems to fix my problem. But I just wanted to give a heads up and see if anyone else has had similar problems. I am using octave 2.9.10

The file is only 33 MB and so it is not some kind of 2GB limit bug.

Again, sorry for this being useless without any code.

--
David Grohmann
Senior Student Associate
Applied Research Lab : UT Austin : ESL - S206
Office: 512-835-3237




reply via email to

[Prev in Thread] Current Thread [Next in Thread]