Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Instance of FFIVariableArgument did not understand #emitArgument:context: #20

Closed
pavel-krivanek opened this issue Jan 20, 2020 · 9 comments · Fixed by #21
Closed

Instance of FFIVariableArgument did not understand #emitArgument:context: #20

pavel-krivanek opened this issue Jan 20, 2020 · 9 comments · Fixed by #21

Comments

@pavel-krivanek
Copy link

The current version has troubles with the TTF initialization.

To reproduce just install the latest mars-gtk and save the image.

FFIVariableArgument(Object)>>doesNotUnderstand: #emitArgument:context:
[ :each | each emitArgument: builder context: sender ] in TFCalloutMethodBuilder>>generateFFICallout:spec: in Block: [ :each | each emitArgument: builder context: send...etc...
OrderedCollection>>do:
TFCalloutMethodBuilder>>generateFFICallout:spec:
[ :builder | self generateFFICallout: builder spec: functionSpec ] in TFCalloutMethodBuilder(FFICalloutMethodBuilder)>>generateMethodFromSpec: in Block: [ :builder | self generateFFICallout: builder spec...etc...
IRBuilder class>>buildIR:
TFCalloutMethodBuilder(FFICalloutMethodBuilder)>>generateMethodFromSpec:
TFCalloutMethodBuilder(FFICalloutMethodBuilder)>>generate
TFCalloutMethodBuilder(FFICalloutMethodBuilder)>>build:
TFCalloutAPI(FFICalloutAPI)>>function:library:
FreeTypeFace(Object)>>ffiCall:library:options:
FreeTypeFace(Object)>>ffiCall:library:
FreeTypeFace(Object)>>ffiCall:
FreeTypeFace(FT2Face)>>ffiOutline:embolden:
@pavel-krivanek
Copy link
Author

caused by Pharo commit b839d66, threaddedFFI needs to be synchronized with the UFFI API

@guillep
Copy link
Member

guillep commented Jan 21, 2020

Hi Pavel, would you mind checking with the changes in #21?

@pavel-krivanek
Copy link
Author

It is not enough. I did a same hotpatch of my image but, at least, I had to define FFICalloutMethodBuilder>>#stringEncodingStrategy too. I did it like

stringEncodingStrategy 
	^ FFILegacyStringEncodingStrategy new

...but I haven't studied how much correct it really is (but it seems to work)

@guillep
Copy link
Member

guillep commented Jan 21, 2020

That seems strange. I haven't tried setting TFFI for the whole image (which seems to be what you have...). Gimme some more minutes :)

@guillep
Copy link
Member

guillep commented Jan 21, 2020

I've downloaded Mars-gtk in an image with my patch and It seems to be working. My steps:

  • load new pharo8
  • load TFFI with my patch
  • load mars-gtk
  • save as Pharo.1.image
  • open Pharo.1.image

Did you do something else?

@guillep
Copy link
Member

guillep commented Jan 21, 2020

Did you use self requestor as argument of the inCallout: keyword?

@pavel-krivanek
Copy link
Author

you are probably right, It seems to work. Let's merge it and I will let rebuild our full images to see if it is really fine. Thanks!

@guillep
Copy link
Member

guillep commented Jan 21, 2020

Cool, ping me if you find something else!

@pavel-krivanek
Copy link
Author

it looks fixes. Once again, thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants