unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* Guile-GI: builder:new-from-file: Segmentation fault
@ 2021-04-24 20:46 Luis Felipe
  2021-04-24 22:47 ` Mike Gran
  0 siblings, 1 reply; 3+ messages in thread
From: Luis Felipe @ 2021-04-24 20:46 UTC (permalink / raw)
  To: guile-user

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:

★★★★★★★★★★★★★★★★★★★★
$ 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/



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Guile-GI: builder:new-from-file: Segmentation fault
  2021-04-24 20:46 Guile-GI: builder:new-from-file: Segmentation fault Luis Felipe
@ 2021-04-24 22:47 ` Mike Gran
  2021-04-25 13:18   ` Luis Felipe
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Gran @ 2021-04-24 22:47 UTC (permalink / raw)
  To: Luis Felipe; +Cc: guile-user

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/
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Guile-GI: builder:new-from-file: Segmentation fault
  2021-04-24 22:47 ` Mike Gran
@ 2021-04-25 13:18   ` Luis Felipe
  0 siblings, 0 replies; 3+ messages in thread
From: Luis Felipe @ 2021-04-25 13:18 UTC (permalink / raw)
  To: Mike Gran; +Cc: guile-user

On Saturday, April 24, 2021 10:47 PM, Mike Gran <spk121@yahoo.com> wrote:

> 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,

It does! Thank you Mike.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-25 13:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-24 20:46 Guile-GI: builder:new-from-file: Segmentation fault Luis Felipe
2021-04-24 22:47 ` Mike Gran
2021-04-25 13:18   ` Luis Felipe

unofficial mirror of guile-user@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guile-user/0 guile-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-user guile-user/ https://yhetil.org/guile-user \
		guile-user@gnu.org
	public-inbox-index guile-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.lisp.guile.user
	nntp://news.gmane.io/gmane.lisp.guile.user


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git