[Cuis-dev] VectorGrahicsPlugin Troubles (WAS: Re: A few tweaks to preferences)
Juan Vuletich
juan at jvuletich.org
Sat Aug 21 11:19:56 PDT 2021
On 8/21/2021 3:10 PM, David T. Lewis via Cuis-dev wrote:
> On Sat, Aug 21, 2021 at 02:54:52PM -0300, Juan Vuletich via Cuis-dev wrote:
>> Thanks Gerald!
>>
>> Luckily, in this case, the crash.dmp pointed straight to a clear bug in
>> the code. In most other cases, any primitive that modifies an array also
>> gets the array as argument (even if passed before). This is in case the
>> GC moves it around. But when I added contour, somehow I forgot about
>> this. #primResetContourTop:bottom: doesn't pass the contour array as
>> argument, and therefore could produce an invalid access after GC.
>>
>> This will require changes to the plugin and new VMs.
>>
> I'll be watching for updates :-)
>
Thanks Dave.
> One suggestion - consider adding some kind of #primitivePluginVersion
> to VectorEnginePlugin, possibly just answering an integer. If the
> VectorGraphics version requires a compatible plugin version, you
> can test for it in advance from the image.
>
> Dave
Yes. We are already doing it:
isPluginAvailable
"
VectorEngineWithPlugin isPluginAvailable
Check if services provided by VM plugin match this class requirements.
"
| pluginApiVersion |
pluginApiVersion _ self pluginApiVersion.
^ pluginApiVersion = 5
If VM plugin API version doesn't match Smalltalk's, the plugin is not
used, and the Smalltalk version of the code is used.
Note that API version number has no relation to package versioning. Last
time I pushed plugin code I didn't update it, because it wasn't an API
change, but a bugfix. Now, I'll have to add an extra parameter to some
primitives, so I'll bump the API version number.
Thanks,
--
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich
More information about the Cuis-dev
mailing list