[Top][All Lists]

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

[Gm2] IOChan.RawRead() returns fewer bytes than available

From: SiTex Graphics
Subject: [Gm2] IOChan.RawRead() returns fewer bytes than available
Date: Wed, 27 Jan 2010 17:26:41 -0500

Hi Gaius,

The RawRead() function in GM2 exhibits some unexpected behavior
compared to the XDS and Stonybrook versions.  RawRead() sometimes
returns fewer than the number of bytes requested even when there are
more bytes remaining in the file.  I've attached a simple test module
which tries to read a file named test.dat.  Compile with

gm2 -fiso -fmakeall -o readtest readtest.mod

Every 16000-30000 bytes there is a short read.  I'm not sure if this
is a bug (does the ISO spec address this?), but it is unexpected.  I
have my own wrappers for all the file IO functions, and coding around
this behavior was simple enough once I discovered what was happening.

Buglet from coding the test file:  commenting out the buf variable
definition in the test module and then trying to compile produces a
seg fault in gm2 (instead of the expected error report).


Attachment: readtest.mod
Description: audio/mod

reply via email to

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