# Switching to gtk3

**URL:** <https://www.ruby-forum.com/t/switching-to-gtk3/238209>\
**Category:** Ruby-Gnome 2\
**Created:** [December 24, 2013, 8:19am UTC](https://www.ruby-forum.com/t/switching-to-gtk3/238209 "2013-12-24T08:19:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [December 24, 2013, 8:19am UTC](https://www.ruby-forum.com/t/switching-to-gtk3/238209/1 "2013-12-24T08:19:30Z")

</div>

Hi:

I’m trying to upgrade visualruby to gtk3. I understand that there is no  
VBox or HBox in gtk3. When I change them in glade to Gtk::Boxes I get  
this error:

GLib-GObject-WARNING \*\*:cannot create instance of abstract  
(non-instantiatable) type `GtkBox’  
/home/eric/vrp/vrlib/lib/GladeGUI.rb:154: [BUG] Segmentation fault  
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86\_64-linux]

Why can’t I add a GtkBox to a Window?

E

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [December 24, 2013, 2:24pm UTC](https://www.ruby-forum.com/t/switching-to-gtk3/238209/2 "2013-12-24T14:24:14Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“[ruby-gnome2-devel-en] Switching to gtk3” on Tue, 24 Dec 2013  
08:19:30 +0100,  
“Eric C.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’m trying to upgrade visualruby to gtk3. I understand that there is no  
> VBox or HBox in gtk3. When I change them in glade to Gtk::Boxes I get  
> this error:
> 
> GLib-GObject-WARNING \*\*:cannot create instance of abstract  
> (non-instantiatable) type `GtkBox’  
> /home/eric/vrp/vrlib/lib/GladeGUI.rb:154: [BUG] Segmentation fault  
> ruby 1.9.3p392 (2013-02-22 revision 39386) [x86\_64-linux]
> 
> Why can’t I add a GtkBox to a Window?

Could you show your glade file and script?

## Thanks,

kou

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [December 24, 2013, 3:57pm UTC](https://www.ruby-forum.com/t/switching-to-gtk3/238209/3 "2013-12-24T15:57:28Z")

</div>

Eric C. wrote in post #1131515:

> I’m trying to upgrade visualruby to gtk3.

Hi,

As visualruby work on windows: Warning !!  
There are big issue with gtk3 : scrach when resize/move main window…

the bug seem depend on the content of the window:

GLib:ERROR:gmain.c:3057:g\_main\_dispatch: assertion failed:  
(current-\>dispatching\_sources == &current\_source\_link)

or

d:/usr/Ruby/local/Ruiby/lib/ruiby\_gtk/ruiby\_dsl3.rb:1865: [BUG]  
Segmentation fault  
ruby 2.0.0p0 (2013-02-24) [i386-mingw32]

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [December 24, 2013, 7:52pm UTC](https://www.ruby-forum.com/t/switching-to-gtk3/238209/4 "2013-12-24T19:52:51Z")

</div>

Hi guys.

Thanks for your great work.

I’m getting the error from line 154 in GladeGUI:

@builder = Gtk::Builder.new.add\_from\_file(file\_name)

The file name is correct, and it tries to load the attached file  
VR\_ENV\_GLOBAL.glade.

/home/eric/vrp/vrlib/lib/GladeGUI.rb: line 154  
GLib-GObject-WARNING \*\*:cannot create instance of abstract  
(non-instantiatable) type `GtkBox’  
/home/eric/vrp/vrlib/lib/GladeGUI.rb:154: [BUG] Segmentation fault  
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86\_64-linux]

The history is this:

I’m upgrading to gtk3, so I first created the .glade file in glade v2.8  
or so. I believe that it was a libglade file. I don’t understand the  
distinction. Now, I’m opening it with glade v.3.12.1 and changing the  
vboxes and hboxes to boxes. I save it, and the error appears. It works  
fine with the old glade files.

There might be bugs in glade because its crashing and acting funny.

E

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [December 25, 2013, 12:04am UTC](https://www.ruby-forum.com/t/switching-to-gtk3/238209/5 "2013-12-25T00:04:08Z")

</div>

UPDATE: I noticed that they’ve changed vbuttonbox and hbuttonbox to  
just buttonbox too. I changed everything to buttonbox, but the problem  
persists.

---

<div class="post-metadata">

**Author:** ![ericrchr](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/8baadc/32.png) [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Post date:** [December 25, 2013, 1:55pm UTC](https://www.ruby-forum.com/t/switching-to-gtk3/238209/6 "2013-12-25T13:55:22Z")

</div>

Hi,

Thanks for attaching a script and a glade file. Could you  
also attach a script that reproduces your problem?  
GladeGUI.rb just defines a module. The module isn’t used.

## Thanks,

kou

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“Re: [ruby-gnome2-devel-en] Switching to gtk3” on Tue, 24 Dec 2013  
19:52:51 +0100,
