Possible problem with FFI in 3.9-7067 ?

Andreas Raab andreas.raab at gmx.de
Thu Mar 22 20:25:13 UTC 2007


Hi Andy -

Thanks for finding this. I'm still at a loss why this happens (perhaps 
Monticello gets something wrong in its initialization?) but I have added 
those two lines to the SqueakMap installer script. This should prevent 
crashes like you were seeing.

Cheers,
   - Andreas

Andrew Tween wrote:
> 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
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>




More information about the Squeak-dev mailing list