unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Mike Gran <spk121@yahoo.com>
To: Luis Felipe <luis.felipe.la@protonmail.com>
Cc: "guile-user@gnu.org" <guile-user@gnu.org>
Subject: Re: Guile-GI: builder:new-from-file: Segmentation fault
Date: Sat, 24 Apr 2021 15:47:26 -0700	[thread overview]
Message-ID: <20210424224726.GA2581775@spikycactus.com> (raw)
In-Reply-To: <nzYQVUykww3Kvk57dWOxQlIurVUsCrKqG8DgSrAUYwAG5rdVvqYf6OKWYVJOVGvYUBln5KBcJagrA18SzeRT3nCvg0Lg77AGM3-JB631fTs=@protonmail.com>

On Sat, Apr 24, 2021 at 08:46:08PM +0000, Luis Felipe wrote:
> Hi,
> 
> I'm trying to learn some Guile-GI, but I just hit a segfault. I was
> trying to create a GTK Builder from a file:

Hello.
GTK needs to be initialized before builder can be used

(use-modules (gi) (gi repository))
(require "Gio" "2.0")
(require "Gtk" "3.0")
(load-by-name "Gtk" "Builder")
(load-by-name "Gtk" "init")
(init!)
(builder:new-from-file "app.ui")

Another way to initialize is to use the trio of
application:new, connect, and run.

Hope this helps,
Mike

> 
> ????????????????????????????????????????????????????????????
> $ guile
> GNU Guile 3.0.5
> Copyright (C) 1995-2021 Free Software Foundation, Inc.
> 
> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> This program is free software, and you are welcome to redistribute it
> under certain conditions; type `,show c' for details.
> 
> Enter `,help' for help.
> scheme@(guile-user)> (use-modules (gi) (gi repository))
> scheme@(guile-user)> (require "Gio" "2.0")
> scheme@(guile-user)> (require "Gtk" "3.0")
> scheme@(guile-user)> (load-by-name "Gtk" "Builder")
> $1 = (translation-domain builder:translation-domain value-from-string-type! builder:value-from-string-type! value-from-string! builder:value-from-string! set-translation-domain builder:set-translation-domain set-application builder:set-application get-type-from-name builder:get-type-from-name get-translation-domain builder:get-translation-domain get-objects builder:get-objects get-object builder:get-object get-application builder:get-application extend-with-template builder:extend-with-template expose-object builder:expose-object connect-signals-full builder:connect-signals-full connect-signals builder:connect-signals add-objects-from-string builder:add-objects-from-string add-objects-from-resource builder:add-objects-from-resource add-objects-from-file builder:add-objects-from-file add-from-string builder:add-from-string add-from-resource builder:add-from-resource add-from-file builder:add-from-file add-callback-symbol builder:add-callback-symbol builder:new-from-string builder:new-from-resource builder:new-from-file builder:new <GtkBuilder>)
> scheme@(guile-user)> (builder:new-from-file "app.ui")
> 
> (process:13659): Gtk-CRITICAL **: 15:12:12.366: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
> 
> (process:13659): Gtk-CRITICAL **: 15:12:12.366: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
> 
> (process:13659): Gtk-CRITICAL **: 15:12:12.366: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
> Violaci??n de segmento
> ????????????????????????????????????????????????????????????
> 
> I don't have a GitHub account (https://github.com/spk121/guile-gi), so I'm reporting here instead.
> 
> This is the UI file I used: https://luis-felipe.gitlab.io/downloads/temp/app.ui.
> 
> I'm on Guix System, using guile-gi 0.3.1.
> 
> 
> ---
> Luis Felipe L??pez Acevedo
> https://luis-felipe.gitlab.io/
> 



  reply	other threads:[~2021-04-24 22:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-24 20:46 Guile-GI: builder:new-from-file: Segmentation fault Luis Felipe
2021-04-24 22:47 ` Mike Gran [this message]
2021-04-25 13:18   ` Luis Felipe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210424224726.GA2581775@spikycactus.com \
    --to=spk121@yahoo.com \
    --cc=guile-user@gnu.org \
    --cc=luis.felipe.la@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).