// C Function signature: DOS_API DosQMetaObjectConnection* DOS_CALL dos_qobject_connect_lambda_static(DosQObject *sender, const char *signal, DosQObjectConnectLambdaCallback callback, void* callbackData, DosQtConnectionType connection_type); ;; Chicken foreign lambda: (define-foreign-type DosQMetaObjectConnection "DosQMetaObjectConnection") (define-foreign-type DosQObject "DosQObject") (define-foreign-type DosQtConnectionType (enum "DosQtConnectionType")) (define dos_qobject_connect_lambda_static (foreign-lambda (c-pointer DosQMetaObjectConnection) "dos_qobject_connect_lambda_static" (c-pointer DosQObject) ;; sender c-string ;; signal (function void (c-pointer int pointer-vector)) ;; callback c-pointer ;; callbackData DosQtConnectionType)) ;; connection_type ;; Stack trace: segmentation violation [] ...more... qml.core.scm:348: coops#slot-value qml.core.scm:354: chicken.memory#object->pointer qml.core.scm:378: chicken.base#print qml.core.scm:379: val qml.core.scm:170: coops#slot-value qml.core.scm:379: chicken.base#print qml.core.scm:380: ptr qml.core.scm:272: coops#slot-value qml.core.scm:381: pointer qml.core.scm:354: obj qml.core.scm:348: coops#slot-value qml.core.scm:354: chicken.memory#object->pointer qml.core.scm:382: val qml.core.scm:170: coops#slot-value qml.core.scm:380: qml.lowlevel#dos_qobject_connect_lambda_static qml.lowlevel.scm:875: ##sys#make-c-string <-- ;; The function gets called with a pointer, string, procedure (windowCloseCallback cbdata argc argv), pointer, int. ;; Repository: https://codeberg.org/zilti/qml ;; One-liner to reproduce segmentation violation: chicken-install -s && csc -X r7rs -R r7rs -gui examples/helloworld.scm && examples/helloworld