FFI Primitive bug or my bug?

Norberto Manzanos nmanzanos at sion.com
Sat Apr 12 01:52:24 UTC 2003


Sorry, I see I was not clear. The problem was not "reading a binary file" 
but copying an array instead.

This

^(anArray copyFrom:1 to: 4) signedLongAt:1

gives an error in 3.4,
while anArray is

a ByteArray(0 0 0 0 22 0 0 0 2 0 0 0 109 1 0 0 21 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0)

in SQ 3.1 (or using the old DLL) the method returns 0, in SQ4 raises a 
primitive error exception.
The 3.4 release is 3.4-5170-3.4.2, windows VM.

At 02:22 12/04/03 +0200, you wrote:
>Hi,
>
>It would be helpful if you could explain in more detail what you're trying
>to do. #signedLongAt: references memory and you can't use this for "reading
>a binary file" at all so it's quite unclear what the relation between what
>you're trying to do (reading a file) and the primitive failure is. The ffi
>primitives haven't changed much (if at all) between 3.1 and 3.4 so it's
>unlikely (though not entirely impossible) that there's something in the
>primitives itself going wrong.
>
>Cheers,
>   - Andreas
>
> > -----Original Message-----
> > From: squeak-dev-bounces at lists.squeakfoundation.org
> > [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On
> > Behalf Of Norberto Manzanos
> > Sent: Friday, April 11, 2003 5:45 PM
> > To: squeak-dev at lists.squeakfoundation.org
> > Subject: FFI Primitive bug or my bug?
> >
> >
> > Hello.
> >
> > I have a little problem with Squeak 3.4 and FFIPrims.Dll. I'm
> > not sure if
> > it's a bug of the primitive or a bug of my own.
> > I'm reading a binary file. The primitive signedLongAt: gives
> > a "primitive
> > failed" error in SQ 3.4, while it does not in 3.1, reading
> > the same file,
> > same code. I copied the old DLL (the one of version 3.1 to
> > 3.4 directory)
> > and everything works fine.
> > Is there a bug in the new dll? Has anybody reported this? Or
> > I was doing
> > something wrong that version 3.4 detected and 3.1 didn't?
> > Will I be in
> > trouble using the old DLL?
> >
> > Thanks in advance.
> >
> >
> > Norberto Manzanos
> > http://www.amanza.com.ar
> >
> >

Norberto Manzanos
http://www.amanza.com.ar



More information about the Squeak-dev mailing list