Possible problem with FFI in 3.9-7067 ?

Andrew Tween amtween at hotmail.com
Thu Mar 22 19:23:43 UTC 2007


Hi,
I have managed to "cure" the problem by doing the following...

After installing FFI in 3.9-7067, file-in the attached method (ExternalType
class-initializeStructureTypes.st).
Then evaluate,

    ExternalType initialize.
    ExternalStructure compileAllFields.

the "Win32Window win32Draw" example then performs correctly without crashing the
VM.
Cheers,
Andy

----- Original Message ----- 
From: "Andrew Tween" <amtween at hotmail.com>
To: "The general-purpose Squeak developers list"
<squeak-dev at lists.squeakfoundation.org>
Sent: Wednesday, March 14, 2007 8:38 AM
Subject: Re: Possible problem with FFI in 3.9-7067 ?


> Hi,
> ----- Original Message ----- 
> From: "Andreas Raab" <andreas.raab at gmx.de>
> To: "The general-purpose Squeak developers list"
> <squeak-dev at lists.squeakfoundation.org>
> Sent: Tuesday, March 13, 2007 4:47 AM
> Subject: Re: Possible problem with FFI in 3.9-7067 ?
>
>
> > Andrew Tween wrote:
> > > I have been trying to use FFI (the latest on SqueakMap) in 3.9-7067, on
> Windows
> > > 2000, to get a device context, and do stuff with it. It doesn't seem to
work
> > > like it used to.
> >
> > I'm seeing the same problems.
> >
> > > Some investigation reveals that everything worked ok up to 7052.
> >
> > How interesting. Do you know what changed between 7052 and later versions?
>
> The main difference was that FFI was removed from the image.
> I have just tried removing FFI from a 7052 image, and then immediately
> re-loading FFI from SqueakMap into the same 7052 image.
> Having done so, "Win32Window win32Draw" crashes the VM.
> The removal code I used is from ScriptLoader-md.296, the same as used when
> transitioning from 7052 - 7053, and is shown below....
> ---------
>  | copies namesOfpackagesToUnload |
>  namesOfpackagesToUnload := #('*FFI*').
>  copies := MCWorkingCopy allManagers asSortedCollection:
>   [ :a :b | a package name <= b package name ].
>  (copies select: [:each | namesOfpackagesToUnload anySatisfy: [:ea | ea match:
> each package name ]])
>   do: [:z | z unload].
>  Smalltalk recreateSpecialObjectsArray
> -----------
>
> So perhaps something isn't being initialised when FFI is installed?
>
> It may be a red-herring but evaluating "Win32HDC compiledSpec" before and
after
> unloading/reloading, gives diffferent results...
>
> Before - Win32HDC compiledSpec a WordArray(100925444)
> After - Win32HDC compiledSpec  a WordArray(65536)
>
> >
> > > Have I installed the wrong FFI packages for 3.9?
> >
> > No, this is the right place.
> >
> > > Or is there a problem in FFI?
> > > Or maybe there is a problem in the Compiler?
> >
> > That's a good question. I'm not sure right now; I'll have to check 7052
> > and later to see what the difference exactly is.
>
> Thanks.
>
> Cheers,
> Andy
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ExternalType class-initializeStructureTypes.st
Type: application/octet-stream
Size: 821 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070322/26bea7af/ExternalTypeclass-initializeStructureTypes.obj


More information about the Squeak-dev mailing list