FFI Primitive bug or my bug?

Andreas Raab andreas.raab at gmx.de
Sat Apr 12 02:24:50 UTC 2003


Hi Noberto,

Most likely you are not using the VM you _think_ you are using (the magic of
Windows determining what app is run when you click on some document - in
this case the image). Please verify that you are in fact using the 3.4.2 VM
(easiest way of doing this is to press F2 and then say "show version
information"). I would suspect that some older VM is run instead of the
3.4.2 and that may lead to the effect that the DLL shipped with 3.4.2 will
deny its services - it has been built against 3.4.2 and will not work with
some older VM versions. Note that older DLLs generally *will* work with
newer VMs which explains the effect you are seeing.

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: Saturday, April 12, 2003 3:52 AM
> To: The general-purpose Squeak developers list
> Subject: RE: FFI Primitive bug or my bug?
> 
> 
> 
> 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