From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matija Obid Newsgroups: gmane.lisp.guile.user Subject: Re: G-Golf - Callback segmentation fault Date: Tue, 27 Aug 2024 20:09:29 +0000 Message-ID: <87a5gxybgm.fsf@posteo.net> References: <87msl6c4lf.fsf@posteo.net> <20240821212129.7647d035@tintin> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35116"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user@gnu.org To: David Pirotte Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Tue Aug 27 22:10:18 2024 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sj2W9-0008xP-RD for guile-user@m.gmane-mx.org; Tue, 27 Aug 2024 22:10:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sj2VY-0000VB-MR; Tue, 27 Aug 2024 16:09:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sj2VX-0000V0-1z for guile-user@gnu.org; Tue, 27 Aug 2024 16:09:39 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sj2VU-0006wL-U0 for guile-user@gnu.org; Tue, 27 Aug 2024 16:09:38 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id B8118240027 for ; Tue, 27 Aug 2024 22:09:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1724789371; bh=vg7fWQllcsHaErxdgcgZCFwjXCPdYTZGP+fnUwMW2cg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=WVomAf9w5B/AUZGFZBbLvxR01nAYP5p7JUu+y137pdnsDkUZ+4ITdlIYnh4IEPEcp XMqZvpk8duU/h4vfUyWb5krgLBxUvcE64ktoF9ioI4M8Fhej8z1tQMI4mv8l+XoKac METUL2FfwONKLc+dbxhWJzOZrEry2DCFAXnrqw0IlW4xgf9H16y/s/jzes98Y44ViC sc0hxbvN2cBW4HupmQEftHNwSP6iAYTOTPvCOCtBQzlOXM2ekRSoRg+9waauzugt16 7QrCNF7oS4a0zqE2KrCynDxRggy2QG4+NAvdTLhoCdm+jkOqW7BAxtx7ker7ZzUzCG yRuxHIewNTZew== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WtdtL4bZgz9rxB; Tue, 27 Aug 2024 22:09:30 +0200 (CEST) In-Reply-To: <20240821212129.7647d035@tintin> (David Pirotte's message of "Wed, 21 Aug 2024 21:21:29 -0300") Received-SPF: pass client-ip=185.67.36.65; envelope-from=matija.obid@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19771 Archived-At: --=-=-= Content-Type: text/plain Hello again, I think I found something. There is a version check in "g-callable-info-make-closure" function, if I disable it (check patch) all examples works just fine. I'm not quite sure what these functions does, can you take another look? My gi version is 1.80.1. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Fixing-callbacks-segfaults.patch >From 4bec7836f17dfd453b877f65d5e91aa29c082d70 Mon Sep 17 00:00:00 2001 From: Matija Obid Date: Tue, 27 Aug 2024 21:34:50 +0200 Subject: [PATCH] Fixing callbacks segfaults --- g-golf/hl-api/callback.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g-golf/hl-api/callback.scm b/g-golf/hl-api/callback.scm index 633635c..04b9ea2 100644 --- a/g-golf/hl-api/callback.scm +++ b/g-golf/hl-api/callback.scm @@ -150,7 +150,7 @@ ffi-cif ffi-closure-callback user-data) - (if (gi-check-version 1 71 0) + (if (and #f (gi-check-version 1 71 0)) (g-callable-info-create-closure info ffi-cif ffi-closure-callback user-data) (g-callable-info-prepare-closure -- 2.45.2 --=-=-= Content-Type: text/plain -- Regards, Matija --=-=-=--