You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(6) |
Sep
(16) |
Oct
(36) |
Nov
(85) |
Dec
(151) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(49) |
Feb
(51) |
Mar
(71) |
Apr
(87) |
May
(91) |
Jun
(93) |
Jul
(160) |
Aug
(229) |
Sep
(85) |
Oct
(89) |
Nov
(85) |
Dec
(98) |
2004 |
Jan
(40) |
Feb
(98) |
Mar
(149) |
Apr
(106) |
May
(153) |
Jun
(77) |
Jul
(85) |
Aug
(55) |
Sep
(50) |
Oct
(53) |
Nov
(83) |
Dec
(32) |
2005 |
Jan
(97) |
Feb
(124) |
Mar
(60) |
Apr
(79) |
May
(55) |
Jun
(62) |
Jul
(70) |
Aug
(130) |
Sep
(115) |
Oct
(32) |
Nov
(46) |
Dec
(54) |
2006 |
Jan
(114) |
Feb
(78) |
Mar
(37) |
Apr
(54) |
May
(82) |
Jun
(34) |
Jul
(54) |
Aug
(50) |
Sep
(26) |
Oct
(46) |
Nov
(105) |
Dec
(83) |
2007 |
Jan
(105) |
Feb
(64) |
Mar
(57) |
Apr
(20) |
May
(18) |
Jun
(80) |
Jul
(108) |
Aug
(26) |
Sep
(36) |
Oct
(49) |
Nov
(94) |
Dec
(46) |
2008 |
Jan
(24) |
Feb
(24) |
Mar
(200) |
Apr
(92) |
May
(112) |
Jun
(54) |
Jul
(41) |
Aug
(50) |
Sep
(66) |
Oct
(82) |
Nov
(15) |
Dec
(44) |
2009 |
Jan
(68) |
Feb
(34) |
Mar
(55) |
Apr
(50) |
May
(95) |
Jun
(33) |
Jul
(24) |
Aug
(40) |
Sep
(61) |
Oct
(33) |
Nov
(7) |
Dec
(61) |
2010 |
Jan
(18) |
Feb
(47) |
Mar
(24) |
Apr
(24) |
May
(42) |
Jun
(59) |
Jul
(28) |
Aug
(23) |
Sep
(55) |
Oct
(102) |
Nov
(33) |
Dec
(11) |
2011 |
Jan
(37) |
Feb
(115) |
Mar
(96) |
Apr
(37) |
May
(8) |
Jun
(13) |
Jul
(7) |
Aug
(61) |
Sep
(143) |
Oct
(78) |
Nov
(14) |
Dec
(33) |
2012 |
Jan
(49) |
Feb
(57) |
Mar
(62) |
Apr
(38) |
May
(26) |
Jun
(16) |
Jul
(12) |
Aug
(10) |
Sep
(8) |
Oct
(12) |
Nov
(38) |
Dec
(25) |
2013 |
Jan
(55) |
Feb
(53) |
Mar
(39) |
Apr
(37) |
May
(21) |
Jun
(4) |
Jul
(7) |
Aug
(8) |
Sep
(24) |
Oct
(17) |
Nov
(11) |
Dec
(81) |
2014 |
Jan
(22) |
Feb
(9) |
Mar
(29) |
Apr
(133) |
May
(12) |
Jun
(13) |
Jul
(5) |
Aug
(11) |
Sep
|
Oct
(10) |
Nov
(18) |
Dec
(1) |
2015 |
Jan
(18) |
Feb
(2) |
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(28) |
Oct
(15) |
Nov
(8) |
Dec
(7) |
2016 |
Jan
(19) |
Feb
|
Mar
|
Apr
(1) |
May
(10) |
Jun
(3) |
Jul
(19) |
Aug
|
Sep
(5) |
Oct
(1) |
Nov
(9) |
Dec
|
2017 |
Jan
|
Feb
(18) |
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
(2) |
Dec
|
From: Kouhei S. <ko...@co...> - 2016-07-28 14:43:25
|
Hi, In <201...@up...> "[ruby-gnome2-devel-en] use of rb_cFixnum in rbgobj_type.c" on Tue, 26 Jul 2016 09:03:03 +0200, Michael Uplawski <mic...@up...> wrote: > I am just asking if I can expect in the near future an update which > makes ruby-gtk3 compatible to the current ruby2.4 development branch, > or rather: when? We'll support Ruby 2.4 before Ruby 2.4.0 is released. Thanks, -- kou |
From: Kouhei S. <ko...@co...> - 2016-07-28 14:41:27
|
Hi, In <60a...@ro...> "Re: [ruby-gnome2-devel-en] How-To Interfaces" on Sun, 24 Jul 2016 12:24:46 +0200, Thomas Martitz <ku...@ro...> wrote: > I have prototyped what I mentioned above, see > http://pastebin.geany.org/A26m9/. The printfs eventually print "closure > for TestPlugin::activate called" for a my test ruby class which includes > the Peas::Activatable module. Thanks. We can't use this approach because glib2 gem doesn't depend on GObject Introspection. It's OK that we add a singleton method to GObjectIntrospection::Loader for the feature. > I believe the _dynamic functions are meant to be used with GTypePlugins. > I don't think rbg uses this mechanism > (GLib::Object.type_register/rbgobj_register_type uses > g_type_register_static). pygobject doesn't do either and also uses > _static variants. > > You can use the static variants if you don't plan to recycle GType > values IIUC. Sorry. Maybe you're right. Thanks, -- kou |
From: cedlemo <ce...@gm...> - 2016-07-26 12:33:20
|
Hi Michael, no sure but it may be related to Fixnum and Bignum are unified into Integer in ruby 2.4 https://blog.blockscore.com/new-features-in-ruby-2-4/ https://bugs.ruby-lang.org/issues/12005 I think that there will be some little work to support for ruby v <= 2.3 and v 2.4. Regards. Cédric Le Moigne On 26/07/2016 09:03, Michael Uplawski wrote: > Good morning, > > I am just asking if I can expect in the near future an update which > makes ruby-gtk3 compatible to the current ruby2.4 development branch, > or rather: when? > > Chances are, I misunderstand the change-logs and all the error messages. > The fact is that the current gtk3 gem is not properly installed with an > rbgobj_type.c:403:42: error: ‘rb_cFixnum’ undeclared > > I verified and can really not see where rb_cFixnum is currently > declared but I venture that this is development in progress. Hence my > question. > > This is not awfully important, nor urgent but two of my rather small > projects depend on gtk3 and I hate to check back in vain every now and > then. > > Michael > > > ------------------------------------------------------------------------------ > What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic > patterns at an interface-level. Reveals which users, apps, and protocols are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity planning > reports.http://sdm.link/zohodev2dev > > > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en |
From: Michael U. <mic...@up...> - 2016-07-26 09:30:28
|
Good morning, I am just asking if I can expect in the near future an update which makes ruby-gtk3 compatible to the current ruby2.4 development branch, or rather: when? Chances are, I misunderstand the change-logs and all the error messages. The fact is that the current gtk3 gem is not properly installed with an rbgobj_type.c:403:42: error: ‘rb_cFixnum’ undeclared I verified and can really not see where rb_cFixnum is currently declared but I venture that this is development in progress. Hence my question. This is not awfully important, nor urgent but two of my rather small projects depend on gtk3 and I hate to check back in vain every now and then. Michael -- S'il faut être quelque chose, je suis Rémi Fraisse. GnuPG brainpoolP512r1/5C2A258D 2015-10-02 [expires: 2017-10-01] Michael Uplawski <mic...@up...> fingerprint: 2A44 09D4 54B4 EBD2 90DA 0B2D E8B8 0614 5C2A 258D sub brainpoolP512r1/53461AFA 2015-10-02 [expires: 2017-10-01] |
From: Thomas M. <ku...@ro...> - 2016-07-24 10:25:19
|
Am 24.07.2016 um 05:00 schrieb Kouhei Sutou: > Hi, > > In <453...@ro...> > "Re: [ruby-gnome2-devel-en] How-To Interfaces" on Sat, 23 Jul 2016 17:16:33 +0200, > Thomas Martitz <ku...@ro...> wrote: > >>> Ruby-GNOME2 doesn't support implementing interface in >>> Ruby. Because it needs interface specific C code. >>> >> What do you mean with interface specific c code? From my >> current observations it should be possible to extend rbg >> (seems to be the general shorthand for ruby-gnome2 in the >> code so I'll use that) such that you can create classes >> (inheriting gobject) that implement gobject interfaces >> purely in ruby. > Do you know how to implement GObject interface in C? > > Here are codes that GtkSizeGroup implements GtkBuildable: > > https://git.gnome.org/browse/gtk+/tree/gtk/gtksizegroup.c#n150 > https://git.gnome.org/browse/gtk+/tree/gtk/gtksizegroup.c#n273 > > You need to assign pointers of GObject interface functions > like: > > iface->custom_tag_start = gtk_size_group_buildable_custom_tag_start; > iface->custom_finished = gtk_size_group_buildable_custom_finished; > > https://git.gnome.org/browse/gtk+/tree/gtk/gtksizegroup.c#n276 > > The function type is GObject interface specific. So we need > to create function for each GObject interface functions. > > How did you implement GObject interfaces purely in Ruby? I see what you mean. Actually libffi provides that ability. You can use ffi closures to dynamically create trampoline (trampoline == closure) functions which call a generic ffi callback. The ffi callback is passed enough information to resolve which interface method to call (how the ffi callback receives the parameters from the trampoline is managed by libffi). The ffi callback also receives the paramters that the trampoline in order to link the method call to the actual GObjecet instance. The gobject-introspection library even has a helper function for that: g_callable_info_prepare_closure(). This receives a GICallableInfo and creates such a trampoline function. You also pass it an ffi callback which would (in our case) dispatch the method call into Ruby space (using rb_funcall or whatever). I have prototyped what I mentioned above, see http://pastebin.geany.org/A26m9/. The printfs eventually print "closure for TestPlugin::activate called" for a my test ruby class which includes the Peas::Activatable module. rbg uses libffi already in another place, and it comes automatically via glib dependency. > >> pygobject can do it after all. > Could you show us how PyGObject do it? pygobject does what I described above, it starts here: https://git.gnome.org/browse/pygobject/tree/gi/gimodule.c#n459 _pygi_make_native_closure() makes g_callable_info_prepare_closure() call based on GI information and then sets the function pointer to that trampoline function (*method_ptr = closure->closure) > >> That's clear. Before I implement a loader I need rbg to >> meet the requirements for libpeas. That's mainly >> supporting interfaces. The libpeas loader would look for >> ruby classes that implement certain interfaces, and >> instantiate them. > You can use Ruby-GNOME2 when you implement the Ruby loader. That's my plan. > >> PS: I'm currently having a problem with "rgbobjects" being >> initialized twice if I call g_type_interface_static() for >> it > g_type_register_static()? > I don't know about the details of what you're doing but you > should not call XXX_static() dynamically. I believe the _dynamic functions are meant to be used with GTypePlugins. I don't think rbg uses this mechanism (GLib::Object.type_register/rbgobj_register_type uses g_type_register_static). pygobject doesn't do either and also uses _static variants. You can use the static variants if you don't plan to recycle GType values IIUC. Best regards. |
From: Kouhei S. <ko...@co...> - 2016-07-24 03:00:40
|
Hi, In <453...@ro...> "Re: [ruby-gnome2-devel-en] How-To Interfaces" on Sat, 23 Jul 2016 17:16:33 +0200, Thomas Martitz <ku...@ro...> wrote: >>Ruby-GNOME2 doesn't support implementing interface in >>Ruby. Because it needs interface specific C code. >> > > What do you mean with interface specific c code? From my > current observations it should be possible to extend rbg > (seems to be the general shorthand for ruby-gnome2 in the > code so I'll use that) such that you can create classes > (inheriting gobject) that implement gobject interfaces > purely in ruby. Do you know how to implement GObject interface in C? Here are codes that GtkSizeGroup implements GtkBuildable: https://git.gnome.org/browse/gtk+/tree/gtk/gtksizegroup.c#n150 https://git.gnome.org/browse/gtk+/tree/gtk/gtksizegroup.c#n273 You need to assign pointers of GObject interface functions like: iface->custom_tag_start = gtk_size_group_buildable_custom_tag_start; iface->custom_finished = gtk_size_group_buildable_custom_finished; https://git.gnome.org/browse/gtk+/tree/gtk/gtksizegroup.c#n276 The function type is GObject interface specific. So we need to create function for each GObject interface functions. How did you implement GObject interfaces purely in Ruby? > pygobject can do it after all. Could you show us how PyGObject do it? > That's clear. Before I implement a loader I need rbg to > meet the requirements for libpeas. That's mainly > supporting interfaces. The libpeas loader would look for > ruby classes that implement certain interfaces, and > instantiate them. You can use Ruby-GNOME2 when you implement the Ruby loader. > PS: I'm currently having a problem with "rgbobjects" being > initialized twice if I call g_type_interface_static() for > it g_type_register_static()? I don't know about the details of what you're doing but you should not call XXX_static() dynamically. Thanks, -- kou |
From: Thomas M. <ku...@ro...> - 2016-07-23 15:16:47
|
Am 23. Juli 2016 16:35:45 MESZ, schrieb Kouhei Sutou <ko...@co...>: >Hi, > > >Ruby-GNOME2 doesn't support implementing interface in >Ruby. Because it needs interface specific C code. > What do you mean with interface specific c code? From my current observations it should be possible to extend rbg (seems to be the general shorthand for ruby-gnome2 in the code so I'll use that) such that you can create classes (inheriting gobject) that implement gobject interfaces purely in ruby. pygobject can do it after all. >> Btw, I'm using GObjectIntrospection::Loader to load libpeas bindings >> through Peas-1.0.typelib. This part seems to work okay, but maybe I'm > >> missing something here? Are there other interfaces that are known to >> work fine? > >I think that you should implement Ruby loader for libpeas >instead of implementing libpeas bindings. > >It means that >https://git.gnome.org/browse/libpeas/tree/loaders/ruby is implemented >at >https://git.gnome.org/browse/libpeas/tree/loaders like >https://git.gnome.org/browse/libpeas/tree/loaders/python . > > >Thanks, >-- >kou That's clear. Before I implement a loader I need rbg to meet the requirements for libpeas. That's mainly supporting interfaces. The libpeas loader would look for ruby classes that implement certain interfaces, and instantiate them. Actually libpeas bindings seem to work mostly out of the box based on introspection. For example, rgb already generates a module for the PeasActivatable interface. PS: I'm currently having a problem with "rgbobjects" being initialized twice if I call g_type_interface_static() for it Best regards |
From: Kouhei S. <ko...@co...> - 2016-07-23 14:55:03
|
Hi, In <579...@ro...> "[ruby-gnome2-devel-en] How-To Interfaces" on Thu, 21 Jul 2016 18:33:34 +0200, Thomas Martitz <ku...@ro...> wrote: > The code looks like this: > > class TestPlugin < GLib::Object # GLib::Instantiatable doesn't work too > > include Peas::Activtabable # Peas::Activatable.class => Module > > def activate() > > end > > […] > > end > > Doing a TestPlugin.ancestors reveals that GLib::Instantiatable is > actually in the class hierarchy. > > Am I doing interface implementation wrong here? Is it even supported by > ruby-gnome2? Ruby-GNOME2 doesn't support implementing interface in Ruby. Because it needs interface specific C code. > Btw, I'm using GObjectIntrospection::Loader to load libpeas bindings > through Peas-1.0.typelib. This part seems to work okay, but maybe I'm > missing something here? Are there other interfaces that are known to > work fine? I think that you should implement Ruby loader for libpeas instead of implementing libpeas bindings. It means that https://git.gnome.org/browse/libpeas/tree/loaders/ruby is implemented at https://git.gnome.org/browse/libpeas/tree/loaders like https://git.gnome.org/browse/libpeas/tree/loaders/python . Thanks, -- kou |
From: Thomas M. <ku...@ro...> - 2016-07-23 11:41:20
|
Hello, I have determined (by going through the code) that ruby-gnome2 simply doesn't support GObject interfaces at the moment. I'm currently working on adding such support which seems not too hard given the truly fine codebase. However, it's a bit complicated by the fact that interfaces can also require properties. Implementations of an interface have to override properties by calling g_object_class_override_property() in their class_init. Properties are currently handled by calling "install_property" after "type_register". This conflicts with the above so I need to find a way to make interface&properties work. Best regards |
From: Mario S. <ma...@ru...> - 2016-07-22 10:05:16
|
You know, thinking about it, it may not be, as the methods defined on the ruby object isn't directly available on the c side, without having to get a pointer to the ruby method and called via a ruby specific c routine. If you can figure out how to capture and call the specific ruby method from the c side to the ruby side you should be good. On Jul 22, 2016 4:33 AM, "Thomas Martitz" <ku...@ro...> wrote: > Am 22.07.2016 um 10:28 schrieb Mario Steele: > > Here's a silly question, > > > > Hello, > > not silly at all! > > > Have you tried to implement the methods Peas::Activatable requires? > > EG: activate, deactivate, update_state, even if the methods aren't > > actually doing anything? > > > > EG: > > > > class Foo < GLib::Object > > type_register > > > > include Peas::Activatable > > > > def activate > > puts "Activate is here!" > > end > > > > def deactivate > > puts "Deactivate is here!" > > end > > > > def update_state > > puts "Update State is here!" > > end > > end > > > > $foo = Foo.new > > > > Then try on your C side: assert(PEAS_IS_ACTIVATABLE(foo_gobj)) > > Yes, I have tried this, without success. > > At this point I'm wondering if implementing GObject interfaces is > supported at all? Surprising if not, since interfaces are a fundamental > aspect of the GObject system (and OOP in general). > > Best regards. > > > ------------------------------------------------------------------------------ > What NetFlow Analyzer can do for you? Monitors network bandwidth and > traffic > patterns at an interface-level. Reveals which users, apps, and protocols > are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity > planning > reports.http://sdm.link/zohodev2dev > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en > |
From: Thomas M. <ku...@ro...> - 2016-07-22 08:33:34
|
Am 22.07.2016 um 10:28 schrieb Mario Steele: > Here's a silly question, > Hello, not silly at all! > Have you tried to implement the methods Peas::Activatable requires? > EG: activate, deactivate, update_state, even if the methods aren't > actually doing anything? > > EG: > > class Foo < GLib::Object > type_register > > include Peas::Activatable > > def activate > puts "Activate is here!" > end > > def deactivate > puts "Deactivate is here!" > end > > def update_state > puts "Update State is here!" > end > end > > $foo = Foo.new > > Then try on your C side: assert(PEAS_IS_ACTIVATABLE(foo_gobj)) Yes, I have tried this, without success. At this point I'm wondering if implementing GObject interfaces is supported at all? Surprising if not, since interfaces are a fundamental aspect of the GObject system (and OOP in general). Best regards. |
From: Mario S. <ma...@ru...> - 2016-07-22 08:28:10
|
Here's a silly question, Have you tried to implement the methods Peas::Activatable requires? EG: activate, deactivate, update_state, even if the methods aren't actually doing anything? EG: class Foo < GLib::Object type_register include Peas::Activatable def activate puts "Activate is here!" end def deactivate puts "Deactivate is here!" end def update_state puts "Update State is here!" end end $foo = Foo.new Then try on your C side: assert(PEAS_IS_ACTIVATABLE(foo_gobj)) Mario Steele Ruby Developer C# Developer Java Developer On Fri, Jul 22, 2016 at 2:07 AM, Thomas Martitz <ku...@ro...> wrote: > Am 22.07.2016 um 04:13 schrieb Mario Steele: > > Hello Thomas, > > > > What your looking for to allow your Custom Ruby library to work with > > libpeas, and various other things, that require the GTYPE, is the > > ability to register it. To do this, I utilize this method of creating > > the class name: > > > > module MyModule > > class MyCustomClass < GLib::Object > > unless defined? MYCUSTOMCLASS_TYPE > > MYCUSTOMCLASS_TYPE = self.name.split(":").collect {|x| x.empty? > > ? nil : x}.compact.join("_") > > type_register(MYCUSTOMCLASS_TYPE) > > end > > > > # Proceed with defining my class, and required methods > > end > > end > > > > This class is a simple class, that inherits from GLib::Object, but can > > inherit from anything, as long as somewhere in it's ancestry, > > GLib::Object is a parent class for it. What the above does is: > > > > Converts MyModule::MyCustomClass to MyModule_MyCustomClass (Or > > MYMODULE_MYCUSTOMCLASS in C terms), and then calls > > GLib::Object#type_register() with the class name, which is defined by > > MYCUSTOMCLASS_TYPE. I include a defined? check, incase the file is > > loaded / required multiple times, or somehow re-loaded, the class > > doesn't accidentally get re-registered with GLib. Once you have done > > this, you should be able to associate the > > MyModule::MyCustomClass::MYCUSTOMCLASS_TYPE (Or just TYPE for short), > > with libpeas, and have libpeas utilize this. > > > > Hope this helps you out. > > > Thanks, this helped a bit. Based on your suggestion I found in the > examples that I should do: > > class Foo < GLib::Object > type_register # this was missing > […] > end > > I can now successfully create a global $foo = Foo.new and in C: > > void *(*rbg2gobj)(VALUE obj); > foo = rb_gv_get("$foo"); > rbg2gobj = dlsym(NULL, "rbgobj_instance_from_ruby_object"); > foo_gobj = rbg2gobj(foo); > assert(G_IS_OBJECT(foo_gobj)); > > However, I'm still unable to implement the Peas::Activatable interface, > due to the error message. > > When I remove the specific check that throws this from the ruby-gnome2 > code, then I can use the "include Peas::Activatable" statement. Then, > $foo.is_a?(Peas::Activatable) even returns true. BUT the following fails > (in C): > > assert(PEAS_IS_ACTIVATABLE(foo_gobj)); > > Doing the "include Peas::Activatable" before or after the type_register > call doesn't seem to matter. > > Best regards > > > ------------------------------------------------------------------------------ > What NetFlow Analyzer can do for you? Monitors network bandwidth and > traffic > patterns at an interface-level. Reveals which users, apps, and protocols > are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity > planning > reports.http://sdm.link/zohodev2dev > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en > |
From: Thomas M. <ku...@ro...> - 2016-07-22 06:07:39
|
Am 22.07.2016 um 04:13 schrieb Mario Steele: > Hello Thomas, > > What your looking for to allow your Custom Ruby library to work with > libpeas, and various other things, that require the GTYPE, is the > ability to register it. To do this, I utilize this method of creating > the class name: > > module MyModule > class MyCustomClass < GLib::Object > unless defined? MYCUSTOMCLASS_TYPE > MYCUSTOMCLASS_TYPE = self.name.split(":").collect {|x| x.empty? > ? nil : x}.compact.join("_") > type_register(MYCUSTOMCLASS_TYPE) > end > > # Proceed with defining my class, and required methods > end > end > > This class is a simple class, that inherits from GLib::Object, but can > inherit from anything, as long as somewhere in it's ancestry, > GLib::Object is a parent class for it. What the above does is: > > Converts MyModule::MyCustomClass to MyModule_MyCustomClass (Or > MYMODULE_MYCUSTOMCLASS in C terms), and then calls > GLib::Object#type_register() with the class name, which is defined by > MYCUSTOMCLASS_TYPE. I include a defined? check, incase the file is > loaded / required multiple times, or somehow re-loaded, the class > doesn't accidentally get re-registered with GLib. Once you have done > this, you should be able to associate the > MyModule::MyCustomClass::MYCUSTOMCLASS_TYPE (Or just TYPE for short), > with libpeas, and have libpeas utilize this. > > Hope this helps you out. Thanks, this helped a bit. Based on your suggestion I found in the examples that I should do: class Foo < GLib::Object type_register # this was missing […] end I can now successfully create a global $foo = Foo.new and in C: void *(*rbg2gobj)(VALUE obj); foo = rb_gv_get("$foo"); rbg2gobj = dlsym(NULL, "rbgobj_instance_from_ruby_object"); foo_gobj = rbg2gobj(foo); assert(G_IS_OBJECT(foo_gobj)); However, I'm still unable to implement the Peas::Activatable interface, due to the error message. When I remove the specific check that throws this from the ruby-gnome2 code, then I can use the "include Peas::Activatable" statement. Then, $foo.is_a?(Peas::Activatable) even returns true. BUT the following fails (in C): assert(PEAS_IS_ACTIVATABLE(foo_gobj)); Doing the "include Peas::Activatable" before or after the type_register call doesn't seem to matter. Best regards |
From: Mario S. <ma...@ru...> - 2016-07-22 02:31:50
|
Hello Thomas, What your looking for to allow your Custom Ruby library to work with libpeas, and various other things, that require the GTYPE, is the ability to register it. To do this, I utilize this method of creating the class name: module MyModule class MyCustomClass < GLib::Object unless defined? MYCUSTOMCLASS_TYPE MYCUSTOMCLASS_TYPE = self.name.split(":").collect {|x| x.empty? ? nil : x}.compact.join("_") type_register(MYCUSTOMCLASS_TYPE) end # Proceed with defining my class, and required methods end end This class is a simple class, that inherits from GLib::Object, but can inherit from anything, as long as somewhere in it's ancestry, GLib::Object is a parent class for it. What the above does is: Converts MyModule::MyCustomClass to MyModule_MyCustomClass (Or MYMODULE_MYCUSTOMCLASS in C terms), and then calls GLib::Object#type_register() with the class name, which is defined by MYCUSTOMCLASS_TYPE. I include a defined? check, incase the file is loaded / required multiple times, or somehow re-loaded, the class doesn't accidentally get re-registered with GLib. Once you have done this, you should be able to associate the MyModule::MyCustomClass::MYCUSTOMCLASS_TYPE (Or just TYPE for short), with libpeas, and have libpeas utilize this. Hope this helps you out. Mario Steele Ruby Developer C# Developer Java Developer On Thu, Jul 21, 2016 at 3:57 PM, Thomas Martitz <ku...@ro...> wrote: > Am 21.07.2016 um 21:48 schrieb cedlemo: > > All the hierarchy of classes, sub-class, dependencies have been done. > > I can observe this for my Peas module (and its classes) as well. > However, I'm taking about a custom class written Ruby (which shall > implement an interface). Without explicit inheritance from GLib::Object > it just inherits Ruby's Object. > > > > > > I didn't know about the interfaces or if they are supported. I am sure > > that Kou will give you a better answer on this advanced topic. > > Thank you anyway. I'll patently wait for Kou or any other knowledgeable > person then. > > Best regards > > > ------------------------------------------------------------------------------ > What NetFlow Analyzer can do for you? Monitors network bandwidth and > traffic > patterns at an interface-level. Reveals which users, apps, and protocols > are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity > planning > reports.http://sdm.link/zohodev2dev > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en > |
From: Thomas M. <ku...@ro...> - 2016-07-21 19:58:01
|
Am 21.07.2016 um 21:48 schrieb cedlemo: > All the hierarchy of classes, sub-class, dependencies have been done. I can observe this for my Peas module (and its classes) as well. However, I'm taking about a custom class written Ruby (which shall implement an interface). Without explicit inheritance from GLib::Object it just inherits Ruby's Object. > > I didn't know about the interfaces or if they are supported. I am sure > that Kou will give you a better answer on this advanced topic. Thank you anyway. I'll patently wait for Kou or any other knowledgeable person then. Best regards |
From: cedlemo <ce...@gm...> - 2016-07-21 19:49:01
|
Thomas, When you use the GObjectInstrospection::Loader, you don't need to subclass GLib::Object. Look at the vte3 loader : https://github.com/ruby-gnome2/ruby-gnome2/blob/master/vte3/lib/vte3.rb which is really simple then if you do irb -r vte3 >Vte::Terminal.ancestors [Vte::Terminal, Gtk::Scrollable, Gtk::Widget, Gtk::Buildable, Atk::Implementor, GLib::Interface, GLib::InitiallyUnowned, GLib::Object, GLib::Instantiatable, Object, Kernel, BasicObject] All the hierarchy of classes, sub-class, dependencies have been done. I didn't know about the interfaces or if they are supported. I am sure that Kou will give you a better answer on this advanced topic. cedlemo On 21/07/2016 21:00, Thomas Martitz wrote: > Am 21.07.2016 um 20:49 schrieb cedlemo: >> Hi Thomas, I don't really understand what you are calling an interface. >> Are you building a Peas ruby module >> based on the GObjectInstrospection::Loader? >> >> I don't understand why you try to create a subclass of GLib::Object >> directly. >> >> If you could explain me this, I should be more helpful. > > PeasActivatable is a GObject interface, see [1] and [2]. I want to > create a ruby class that implements this interface. Finally I want > libpeas (a C library) to interact with instances of that class (have > libpeas call activate, deactivate and update_state methods()). > > In ruby, a module seems to correspond largely to an interface in GObject. > > libpeas provides a typelib, therefore I use > GObjectInstrospection::Loader to load the typelib and import libpeas > bindings into Ruby space. This part seems to work fine, as I'm able to > introspect most (if not all) of libpeas bindings. > > In GObject, interfaces can have "prerequisite type", which means that > implementations of the interface must also be a subclass of that class > type. PeasActivatable specifies G_TYPE_OBJECT as the prerequisite. > Therefore I want to subclass GLib::Object. > > [1] > https://developer.gnome.org/gobject/stable/gtype-non-instantiable-classed.html > [2] https://developer.gnome.org/libpeas/stable/PeasActivatable.html > > Best regards > > ------------------------------------------------------------------------------ > What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic > patterns at an interface-level. Reveals which users, apps, and protocols are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity planning > reports.http://sdm.link/zohodev2dev > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en |
From: Thomas M. <ku...@ro...> - 2016-07-21 19:00:31
|
Am 21.07.2016 um 20:49 schrieb cedlemo: > Hi Thomas, I don't really understand what you are calling an interface. > Are you building a Peas ruby module > based on the GObjectInstrospection::Loader? > > I don't understand why you try to create a subclass of GLib::Object > directly. > > If you could explain me this, I should be more helpful. PeasActivatable is a GObject interface, see [1] and [2]. I want to create a ruby class that implements this interface. Finally I want libpeas (a C library) to interact with instances of that class (have libpeas call activate, deactivate and update_state methods()). In ruby, a module seems to correspond largely to an interface in GObject. libpeas provides a typelib, therefore I use GObjectInstrospection::Loader to load the typelib and import libpeas bindings into Ruby space. This part seems to work fine, as I'm able to introspect most (if not all) of libpeas bindings. In GObject, interfaces can have "prerequisite type", which means that implementations of the interface must also be a subclass of that class type. PeasActivatable specifies G_TYPE_OBJECT as the prerequisite. Therefore I want to subclass GLib::Object. [1] https://developer.gnome.org/gobject/stable/gtype-non-instantiable-classed.html [2] https://developer.gnome.org/libpeas/stable/PeasActivatable.html Best regards |
From: cedlemo <ce...@gm...> - 2016-07-21 18:49:18
|
Hi Thomas, I don't really understand what you are calling an interface. Are you building a Peas ruby module based on the GObjectInstrospection::Loader? I don't understand why you try to create a subclass of GLib::Object directly. If you could explain me this, I should be more helpful. cedlemo On 21/07/2016 18:33, Thomas Martitz wrote: > Hello, > > first of all, thanks for your great projekt. Really useful for ruby > programms! > > Now to my problem: I'm trying to implement an interface but I'm always > getting the following error: > > peas-ruby.rb:45:in `append_features': Not a subclass of > GLib::Instantiatable (TypeError) > from peas-ruby.rb:46:in 'include' > from peas-ruby.rb:46:in '<class:TestPlugin>' > from peas-ruby.rb:41:in '<main>' > > > The code looks like this: > > class TestPlugin < GLib::Object # GLib::Instantiatable doesn't work too > > include Peas::Activtabable # Peas::Activatable.class => Module > > def activate() > > end > > […] > > end > > Doing a TestPlugin.ancestors reveals that GLib::Instantiatable is > actually in the class hierarchy. > > Am I doing interface implementation wrong here? Is it even supported by > ruby-gnome2? > > Btw, I'm using GObjectIntrospection::Loader to load libpeas bindings > through Peas-1.0.typelib. This part seems to work okay, but maybe I'm > missing something here? Are there other interfaces that are known to > work fine? > > Best regards. > > ------------------------------------------------------------------------------ > What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic > patterns at an interface-level. Reveals which users, apps, and protocols are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity planning > reports.http://sdm.link/zohodev2dev > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en |
From: Thomas M. <ku...@ro...> - 2016-07-21 16:33:43
|
Hello, first of all, thanks for your great projekt. Really useful for ruby programms! Now to my problem: I'm trying to implement an interface but I'm always getting the following error: peas-ruby.rb:45:in `append_features': Not a subclass of GLib::Instantiatable (TypeError) from peas-ruby.rb:46:in 'include' from peas-ruby.rb:46:in '<class:TestPlugin>' from peas-ruby.rb:41:in '<main>' The code looks like this: class TestPlugin < GLib::Object # GLib::Instantiatable doesn't work too include Peas::Activtabable # Peas::Activatable.class => Module def activate() end […] end Doing a TestPlugin.ancestors reveals that GLib::Instantiatable is actually in the class hierarchy. Am I doing interface implementation wrong here? Is it even supported by ruby-gnome2? Btw, I'm using GObjectIntrospection::Loader to load libpeas bindings through Peas-1.0.typelib. This part seems to work okay, but maybe I'm missing something here? Are there other interfaces that are known to work fine? Best regards. |
From: Rob T. <rtr...@gm...> - 2016-06-06 17:52:37
|
Hmm, you may be onto something. I've tried a lot of things, but one thing I tried was this: sudo brew uninstall gtk sudo brew install gtk+ I also (separately) tried installing rb-gnome from macports with sudo port install rb-gnome ...and I got a little farther, but now my little test script is failing with: $ ruby ~/test.rb /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/gtk2-3.0.8/gtk2.bundle, 9): Library not loaded: /opt/local/lib/libfreetype.6.dylib (LoadError) Referenced from: /opt/local/lib/libfontconfig.1.dylib Reason: Incompatible library version: libfontconfig.1.dylib requires version 19.0.0 or later, but libfreetype.6.dylib provides version 18.0.0 - /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/gtk2-3.0.8/gtk2.bundle from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2/base.rb:25:in `rescue in <top (required)>' from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2/base.rb:21:in `<top (required)>' from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2.rb:11:in `<top (required)>' from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require' from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require' from /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require' I'm guessing that libfreetype 18.0.0 was installed as part of macports. I'll try updating macports and seeing if I can get a newer version of freetype. On Mon, Jun 6, 2016 at 11:41 AM, <Ra...@la...> wrote: > I looked into this a bit over the weekend. I saw others doing something > similar but they used "brew install gtk+" instead of "brew install gtk". I > wonder if that is somehow related? > > Best Regards, > > Jon Raiford > ra...@la... > Tel: +1 (302) 658-8444 > http://www.labware.com > LabWare LIMS Solutions - Results Count > > > > From: Rob Truxler <rtr...@gm...> > To: rub...@li... > Date: 06/04/2016 11:19 PM > Subject: [ruby-gnome2-devel-en] segmentation fault from require > 'gtk2' > ------------------------------ > > > > Hi. I'm trying to get my dev environment set up so I can run a ruby script > that requires gtk+. I'm running a mac on el capitan with homebrew. > Basically I can't get a simple script to get past the require 'gtk2' line. > Any advice? > > Here are all the details: > > $ brew install gtk > > Warning: gtk+-2.24.30 already installed > > $ sudo gem install gtk2 > > Fetching: gtk2-3.0.8.gem (100%) > > Building native extensions. This could take a while... > > Successfully installed gtk2-3.0.8 > > Parsing documentation for gtk2-3.0.8 > > Installing ri documentation for gtk2-3.0.8 > > Done installing documentation for gtk2 after 0 seconds > > 1 gem installed > > $ ruby -v > > ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin15.0] > > $ cat ~/test.rb > > require 'gtk2' > > $ ruby ~/test.rb > > (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: > assertion 'pool != NULL' failed > > (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_insert: > assertion 'pool != NULL' failed > > (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: > assertion 'pool != NULL' failed > > (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: > assertion 'pool != NULL' failed > > (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_insert: > assertion 'pool != NULL' failed > > (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: > assertion 'pool != NULL' failed > > (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: > assertion 'pool != NULL' failed > > (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_insert: > assertion 'pool != NULL' failed > > (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: > assertion 'pool != NULL' failed > > (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: > assertion 'pool != NULL' failed > > (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_insert: > assertion 'pool != NULL' failed > > (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: > assertion 'pool != NULL' failed > > (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: > assertion 'pool != NULL' failed > > (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_insert: > assertion 'pool != NULL' failed > > (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: > assertion 'pool != NULL' failed > > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/gtk2-3.0.8/gtk2.bundle: > [BUG] Segmentation fault at 0x00000000000000 > > ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin15.0] > > -- Crash Report log information > -------------------------------------------- > > See Crash Report log file under the one of following: > > * ~/Library/Logs/CrashReporter > > * /Library/Logs/CrashReporter > > * ~/Library/Logs/DiagnosticReports > > * /Library/Logs/DiagnosticReports > > for more details. > > -- Control frame information > ----------------------------------------------- > > c:0013 p:-17527923087894 s:0064 e:000063 TOP [FINISH] > > c:0012 p:---- s:0062 e:000061 CFUNC :require > > c:0011 p:0115 s:0058 e:000057 METHOD > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 > > c:0010 p:0020 s:0048 e:000047 BLOCK > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2/base.rb:25 > > c:0009 p:0135 s:0045 e:000044 TOP > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2/base.rb:21 > [FINISH] > > c:0008 p:---- s:0037 e:000036 CFUNC :require > > c:0007 p:0115 s:0033 e:000032 METHOD > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 > > c:0006 p:0007 s:0023 e:000022 TOP > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2.rb:11 > [FINISH] > > c:0005 p:---- s:0021 e:000020 CFUNC :require > > c:0004 p:0073 s:0017 e:000016 BLOCK > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135 > > c:0003 p:0444 s:0014 e:000013 METHOD > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144 > > c:0002 p:0007 s:0004 E:000388 EVAL /Users/rtruxler/test.rb:1 [FINISH] > > c:0001 p:0000 s:0002 E:001268 TOP [FINISH] > > /Users/rtruxler/test.rb:1:in `<main>' > > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in > `require' > > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in > `rescue in require' > > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in > `require' > > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2.rb:11:in > `<top (required)>' > > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in > `require' > > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in > `require' > > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2/base.rb:21:in > `<top (required)>' > > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2/base.rb:25:in > `rescue in <top (required)>' > > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in > `require' > > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in > `require' > > -- C level backtrace information > ------------------------------------------- > > 0 ruby 0x000000010839923a rb_vm_bugreport > + 138 > > 1 ruby 0x000000010824abf6 report_bug + 294 > > 2 ruby 0x000000010824aac4 rb_bug + 180 > > 3 ruby 0x0000000108318fec sigsegv + 156 > > 4 libsystem_platform.dylib 0x00007fff8c7a452a _sigtramp + 26 > > 5 libglib-2.0.0.dylib 0x00000001088a542f g_str_hash + 4 > > 6 ??? 0x00007fff579f5080 0x0 + > 140734663446656 > > -- Other runtime information > ----------------------------------------------- > > * Loaded script: /Users/rtruxler/test.rb > > * Loaded features: > > 0 enumerator.so > > 1 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin15.0/enc/encdb.bundle > > 2 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin15.0/enc/trans/transdb.bundle > > 3 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin15.0/rbconfig.rb > > 4 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/compatibility.rb > > 5 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/defaults.rb > > 6 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/deprecate.rb > > 7 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/errors.rb > > 8 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/version.rb > > 9 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/requirement.rb > > 10 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/platform.rb > > 11 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb > > 12 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/stub_specification.rb > > 13 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/util/stringio.rb > > 14 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/specification.rb > > 15 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/exceptions.rb > > 16 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb > > 17 thread.rb > > 18 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin15.0/thread.bundle > > 19 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/monitor.rb > > 20 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb > > 21 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems.rb > > 22 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/path_support.rb > > 23 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/dependency.rb > > 24 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin15.0/pathname.bundle > > 25 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/pathname.rb > > 26 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/English.rb > > 27 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/glib2-3.0.8/lib/glib2/deprecatable.rb > > 28 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/glib2-3.0.8/glib2.bundle > > 29 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/glib2-3.0.8/lib/glib2/version.rb > > 30 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/glib2-3.0.8/lib/glib2/regex.rb > > 31 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/glib2-3.0.8/lib/glib2.rb > > 32 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/atk-3.0.8/atk.bundle > > 33 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/atk-3.0.8/lib/atk.rb > > 34 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/color.rb > > 35 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/paper.rb > > 36 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/cairo-1.15.2/cairo.bundle > > 37 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/constants.rb > > 38 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/point.rb > > 39 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/colors.rb > > 40 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/papers.rb > > 41 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context/rectangle.rb > > 42 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context/triangle.rb > > 43 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context/circle.rb > > 44 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context/path.rb > > 45 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context/blur.rb > > 46 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context/color.rb > > 47 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context.rb > > 48 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/device.rb > > 49 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/surface.rb > > 50 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/pattern.rb > > 51 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/forwardable.rb > > 52 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/path.rb > > 53 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/region.rb > > 54 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo.rb > > 55 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/pango-3.0.8/pango.bundle > > 56 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/pango-3.0.8/lib/pango.rb > > 57 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/gdk_pixbuf2-3.0.8/gdk_pixbuf2.bundle > > 58 > /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gdk_pixbuf2-3.0.8/lib/gdk_pixbuf2.rb > > [NOTE] > > You may have encountered a bug in the Ruby interpreter or extension > libraries. > > Bug reports are welcome. > > For details: *http://www.ruby-lang.org/bugreport.html* > <http://www.ruby-lang.org/bugreport.html> > > Abort trap: 6 > ------------------------------------------------------------------------------ > What NetFlow Analyzer can do for you? Monitors network bandwidth and > traffic > patterns at an interface-level. Reveals which users, apps, and protocols > are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity > planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en > > > > ------------------------------------------------------------------------------ > What NetFlow Analyzer can do for you? Monitors network bandwidth and > traffic > patterns at an interface-level. Reveals which users, apps, and protocols > are > consuming the most bandwidth. Provides multi-vendor support for NetFlow, > J-Flow, sFlow and other flows. Make informed decisions using capacity > planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en > > |
From: <Ra...@la...> - 2016-06-06 15:56:42
|
I looked into this a bit over the weekend. I saw others doing something similar but they used "brew install gtk+" instead of "brew install gtk". I wonder if that is somehow related? Best Regards, Jon Raiford ra...@la... Tel: +1 (302) 658-8444 http://www.labware.com LabWare LIMS Solutions - Results Count From: Rob Truxler <rtr...@gm...> To: rub...@li... Date: 06/04/2016 11:19 PM Subject: [ruby-gnome2-devel-en] segmentation fault from require 'gtk2' Hi. I'm trying to get my dev environment set up so I can run a ruby script that requires gtk+. I'm running a mac on el capitan with homebrew. Basically I can't get a simple script to get past the require 'gtk2' line. Any advice? Here are all the details: $ brew install gtk Warning: gtk+-2.24.30 already installed $ sudo gem install gtk2 Fetching: gtk2-3.0.8.gem (100%) Building native extensions. This could take a while... Successfully installed gtk2-3.0.8 Parsing documentation for gtk2-3.0.8 Installing ri documentation for gtk2-3.0.8 Done installing documentation for gtk2 after 0 seconds 1 gem installed $ ruby -v ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin15.0] $ cat ~/test.rb require 'gtk2' $ ruby ~/test.rb (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_insert: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_insert: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_insert: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_insert: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_insert: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/gtk2-3.0.8/gtk2.bundle: [BUG] Segmentation fault at 0x00000000000000 ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin15.0] -- Crash Report log information -------------------------------------------- See Crash Report log file under the one of following: * ~/Library/Logs/CrashReporter * /Library/Logs/CrashReporter * ~/Library/Logs/DiagnosticReports * /Library/Logs/DiagnosticReports for more details. -- Control frame information ----------------------------------------------- c:0013 p:-17527923087894 s:0064 e:000063 TOP [FINISH] c:0012 p:---- s:0062 e:000061 CFUNC :require c:0011 p:0115 s:0058 e:000057 METHOD /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 c:0010 p:0020 s:0048 e:000047 BLOCK /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2/base.rb:25 c:0009 p:0135 s:0045 e:000044 TOP /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2/base.rb:21 [FINISH] c:0008 p:---- s:0037 e:000036 CFUNC :require c:0007 p:0115 s:0033 e:000032 METHOD /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 c:0006 p:0007 s:0023 e:000022 TOP /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2.rb:11 [FINISH] c:0005 p:---- s:0021 e:000020 CFUNC :require c:0004 p:0073 s:0017 e:000016 BLOCK /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135 c:0003 p:0444 s:0014 e:000013 METHOD /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144 c:0002 p:0007 s:0004 E:000388 EVAL /Users/rtruxler/test.rb:1 [FINISH] c:0001 p:0000 s:0002 E:001268 TOP [FINISH] /Users/rtruxler/test.rb:1:in `<main>' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2.rb:11:in `<top (required)>' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2/base.rb:21:in `<top (required)>' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2/base.rb:25:in `rescue in <top (required)>' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' -- C level backtrace information ------------------------------------------- 0 ruby 0x000000010839923a rb_vm_bugreport + 138 1 ruby 0x000000010824abf6 report_bug + 294 2 ruby 0x000000010824aac4 rb_bug + 180 3 ruby 0x0000000108318fec sigsegv + 156 4 libsystem_platform.dylib 0x00007fff8c7a452a _sigtramp + 26 5 libglib-2.0.0.dylib 0x00000001088a542f g_str_hash + 4 6 ??? 0x00007fff579f5080 0x0 + 140734663446656 -- Other runtime information ----------------------------------------------- * Loaded script: /Users/rtruxler/test.rb * Loaded features: 0 enumerator.so 1 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin15.0/enc/encdb.bundle 2 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin15.0/enc/trans/transdb.bundle 3 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin15.0/rbconfig.rb 4 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/compatibility.rb 5 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/defaults.rb 6 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/deprecate.rb 7 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/errors.rb 8 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/version.rb 9 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/requirement.rb 10 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/platform.rb 11 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb 12 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/stub_specification.rb 13 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/util/stringio.rb 14 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/specification.rb 15 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/exceptions.rb 16 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb 17 thread.rb 18 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin15.0/thread.bundle 19 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/monitor.rb 20 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb 21 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems.rb 22 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/path_support.rb 23 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/dependency.rb 24 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin15.0/pathname.bundle 25 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/pathname.rb 26 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/English.rb 27 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/glib2-3.0.8/lib/glib2/deprecatable.rb 28 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/glib2-3.0.8/glib2.bundle 29 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/glib2-3.0.8/lib/glib2/version.rb 30 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/glib2-3.0.8/lib/glib2/regex.rb 31 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/glib2-3.0.8/lib/glib2.rb 32 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/atk-3.0.8/atk.bundle 33 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/atk-3.0.8/lib/atk.rb 34 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/color.rb 35 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/paper.rb 36 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/cairo-1.15.2/cairo.bundle 37 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/constants.rb 38 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/point.rb 39 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/colors.rb 40 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/papers.rb 41 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context/rectangle.rb 42 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context/triangle.rb 43 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context/circle.rb 44 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context/path.rb 45 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context/blur.rb 46 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context/color.rb 47 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context.rb 48 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/device.rb 49 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/surface.rb 50 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/pattern.rb 51 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/forwardable.rb 52 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/path.rb 53 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/region.rb 54 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo.rb 55 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/pango-3.0.8/pango.bundle 56 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/pango-3.0.8/lib/pango.rb 57 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/gdk_pixbuf2-3.0.8/gdk_pixbuf2.bundle 58 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gdk_pixbuf2-3.0.8/lib/gdk_pixbuf2.rb [NOTE] You may have encountered a bug in the Ruby interpreter or extension libraries. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html Abort trap: 6 ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ ruby-gnome2-devel-en mailing list rub...@li... https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en |
From: Rob T. <rtr...@gm...> - 2016-06-05 03:19:29
|
Hi. I'm trying to get my dev environment set up so I can run a ruby script that requires gtk+. I'm running a mac on el capitan with homebrew. Basically I can't get a simple script to get past the require 'gtk2' line. Any advice? Here are all the details: $ brew install gtk Warning: gtk+-2.24.30 already installed $ sudo gem install gtk2 Fetching: gtk2-3.0.8.gem (100%) Building native extensions. This could take a while... Successfully installed gtk2-3.0.8 Parsing documentation for gtk2-3.0.8 Installing ri documentation for gtk2-3.0.8 Done installing documentation for gtk2 after 0 seconds 1 gem installed $ ruby -v ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin15.0] $ cat ~/test.rb require 'gtk2' $ ruby ~/test.rb (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_insert: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_insert: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_insert: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_insert: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_insert: assertion 'pool != NULL' failed (process:20331): GLib-GObject-CRITICAL **: g_param_spec_pool_lookup: assertion 'pool != NULL' failed /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/gtk2-3.0.8/gtk2.bundle: [BUG] Segmentation fault at 0x00000000000000 ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin15.0] -- Crash Report log information -------------------------------------------- See Crash Report log file under the one of following: * ~/Library/Logs/CrashReporter * /Library/Logs/CrashReporter * ~/Library/Logs/DiagnosticReports * /Library/Logs/DiagnosticReports for more details. -- Control frame information ----------------------------------------------- c:0013 p:-17527923087894 s:0064 e:000063 TOP [FINISH] c:0012 p:---- s:0062 e:000061 CFUNC :require c:0011 p:0115 s:0058 e:000057 METHOD /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 c:0010 p:0020 s:0048 e:000047 BLOCK /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2/base.rb:25 c:0009 p:0135 s:0045 e:000044 TOP /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2/base.rb:21 [FINISH] c:0008 p:---- s:0037 e:000036 CFUNC :require c:0007 p:0115 s:0033 e:000032 METHOD /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55 c:0006 p:0007 s:0023 e:000022 TOP /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2.rb:11 [FINISH] c:0005 p:---- s:0021 e:000020 CFUNC :require c:0004 p:0073 s:0017 e:000016 BLOCK /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135 c:0003 p:0444 s:0014 e:000013 METHOD /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144 c:0002 p:0007 s:0004 E:000388 EVAL /Users/rtruxler/test.rb:1 [FINISH] c:0001 p:0000 s:0002 E:001268 TOP [FINISH] /Users/rtruxler/test.rb:1:in `<main>' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2.rb:11:in `<top (required)>' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2/base.rb:21:in `<top (required)>' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gtk2-3.0.8/lib/gtk2/base.rb:25:in `rescue in <top (required)>' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' -- C level backtrace information ------------------------------------------- 0 ruby 0x000000010839923a rb_vm_bugreport + 138 1 ruby 0x000000010824abf6 report_bug + 294 2 ruby 0x000000010824aac4 rb_bug + 180 3 ruby 0x0000000108318fec sigsegv + 156 4 libsystem_platform.dylib 0x00007fff8c7a452a _sigtramp + 26 5 libglib-2.0.0.dylib 0x00000001088a542f g_str_hash + 4 6 ??? 0x00007fff579f5080 0x0 + 140734663446656 -- Other runtime information ----------------------------------------------- * Loaded script: /Users/rtruxler/test.rb * Loaded features: 0 enumerator.so 1 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin15.0/enc/encdb.bundle 2 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin15.0/enc/trans/transdb.bundle 3 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin15.0/rbconfig.rb 4 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/compatibility.rb 5 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/defaults.rb 6 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/deprecate.rb 7 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/errors.rb 8 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/version.rb 9 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/requirement.rb 10 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/platform.rb 11 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb 12 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/stub_specification.rb 13 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/util/stringio.rb 14 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/specification.rb 15 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/exceptions.rb 16 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb 17 thread.rb 18 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin15.0/thread.bundle 19 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/monitor.rb 20 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb 21 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems.rb 22 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/path_support.rb 23 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/dependency.rb 24 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin15.0/pathname.bundle 25 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/pathname.rb 26 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/English.rb 27 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/glib2-3.0.8/lib/glib2/deprecatable.rb 28 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/glib2-3.0.8/glib2.bundle 29 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/glib2-3.0.8/lib/glib2/version.rb 30 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/glib2-3.0.8/lib/glib2/regex.rb 31 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/glib2-3.0.8/lib/glib2.rb 32 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/atk-3.0.8/atk.bundle 33 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/atk-3.0.8/lib/atk.rb 34 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/color.rb 35 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/paper.rb 36 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/cairo-1.15.2/cairo.bundle 37 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/constants.rb 38 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/point.rb 39 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/colors.rb 40 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/papers.rb 41 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context/rectangle.rb 42 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context/triangle.rb 43 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context/circle.rb 44 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context/path.rb 45 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context/blur.rb 46 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context/color.rb 47 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/context.rb 48 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/device.rb 49 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/surface.rb 50 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/pattern.rb 51 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/2.1.0/forwardable.rb 52 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/path.rb 53 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo/region.rb 54 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/cairo-1.15.2/lib/cairo.rb 55 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/pango-3.0.8/pango.bundle 56 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/pango-3.0.8/lib/pango.rb 57 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-15/2.1.0-static/gdk_pixbuf2-3.0.8/gdk_pixbuf2.bundle 58 /usr/local/var/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/gdk_pixbuf2-3.0.8/lib/gdk_pixbuf2.rb [NOTE] You may have encountered a bug in the Ruby interpreter or extension libraries. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html Abort trap: 6 |
From: Detlef R. <det...@gm...> - 2016-05-30 15:20:01
|
Hi, for a gtk application I use Test::Unit for tests of the internal functionality of self made widgets. This worked very well for a long time. But now, with adding further tests it fails. I have two tests for the same widget class, each with several assertions. The widget is created in the "setup" method and in the tests only methods of the widget are called. The second test fails with the following message: Error: test_Foobla_view_do_undo__0(TestFooblaView): RuntimeError: ruby wrapper for this GObject* already exists. /home/det/.gem/ruby/2.3.0/gems/gobject-introspection-3.0.9/lib/gobject-introspection/loader.rb:307:in `invoke' /home/det/.gem/ruby/2.3.0/gems/gobject-introspection-3.0.9/lib/gobject-introspection/loader.rb:307:in `block (2 levels) in load_constructor_infos' /home/det/.gem/ruby/2.3.0/gems/gobject-introspection-3.0.9/lib/gobject-introspection/loader.rb:323:in `block in load_constructor_infos' /home/det/.gem/ruby/2.3.0/gems/gdk3-3.0.9/lib/gdk3/cursor.rb:28:in `initialize' /home/det/Schreibtisch/code/Foobla/lib/Foobla/view.rb:28:in `new' /home/det/Schreibtisch/code/Foobla/lib/Foobla/view.rb:28:in `initialize' /home/det/Schreibtisch/code/Foobla/test/test-Foobla-view.rb:5:in `new' /home/det/Schreibtisch/code/Foobla/test/test-Foobla-view.rb:5:in `setup' The failing call in the widgets implementation is: @pointerWriteMark = Gdk::Cursor.new :xterm it is called in the widgets initialize method. Do I have to do some kind of clean up on the Gtk/Gdk level between tests? Other ideas? Thanks detlef |
From: Detlef R. <det...@gm...> - 2016-05-13 03:01:27
|
Hi cedlemo, thank you very much for the solution and your explanation. I had the mistaken idea, that the border arguments in the style would modify the frames decoration, but not the widgets outline. best regards, detlef Am 12.05.2016 um 22:10 schrieb cedlemo: > Hey Detlef Reichl, > > Good news I find out why it does this. > > First the outline that you see is in fact the decoration of the frame. > If you add a label to the frame, it is more obvious. > > > frame = Gtk::Frame.new("frame") > > > FYI it should be better (IMO) to use a Gtk::box instead of > using a frame without label and hiding the decoration > > > The solution first and the explications later: > > Here is the script with a Css that hide the decoration of the frame > > #!/usr/bin/env ruby > require "gtk3" > > provider = Gtk::CssProvider.new > > css = <<-CSS > @define-color frame_border_tabs rgb(70%, 70%, 70%); > @define-color transparent rgba(0, 0, 0, 0.0); > > frame#tabs { > border-style: solid; > border-color: @frame_border_tabs @transparent @frame_border_tabs > @frame_border_tabs; > border-width: 0.2em 0.32em 0.05em 0.1em; > border-radius: 1.2em 0.7em 0.7em 1.2em; > /*padding: 0.25em 0.25em 0.25em 0.25em;*/ > } > > frame border { > border-style: none; > border-color: @transparent @transparent @transparent @transparent; > box-shadow: none; > border-width: 10px; > border-radius: 0px; > margin: 0px; > outline-color: @transparent; > > } > > CSS > > provider.load :data => css > > screen = Gdk::Display.default.default_screen > Gtk::StyleContext.add_provider_for_screen(screen, > provider, > > Gtk::StyleProvider::PRIORITY_USER) > > window = Gtk::Window.new > frame = Gtk::Frame.new("frame") > window << frame > label = Gtk::Label.new 'Content' > frame << label > > frame.name = 'tabs' > frame.style_context.add_provider provider, GLib::MAXUINT > > window.show_all > window.signal_connect "destroy" do > Gtk.main_quit > end > Gtk.main > > The important part of the css is the frame border selector. > > > look here https://developer.gnome.org/gtk3/stable/GtkFrame.html > > they say : > > > CSS nodes > > frame > ├── border > > ├── <labelwidget> > > ╰── <child> > > > GtkFrame has a main CSS node with name frame and a subnode with name > border. The border node is used to render the visible border. The style > class .flat can appear with the main node. > > > For real example here is the arc theme > https://github.com/horst3180/arc-theme > > frame > border, .frame { > margin: 0; > padding: 0; > border-radius: 0; > border: 1px solid #dcdfe3; > } > frame > border.flat, .frame.flat { border-style: none; } > > Here is another example from the Zukitre theme > https://github.com/lassekongo83/zuki-themes > > /********** * Frames * **********/ > frame > border, .frame { > box-shadow: none; > margin: 0; > padding: 0; > border-radius: 0; > border: 1px solid #b0b0b0; > } > frame > border.flat, .frame.flat { > border-style: none; > } > frame > border:backdrop, .frame:backdrop { border-color: #b4b4b4; } > > Those new selectors come with Gtk 3.20. > > I hope this will help you. Regards > > cedlemo > > https://github.com/cedlemo > > > ------------------------------------------------------------------------------ > Mobile security can be enabling, not merely restricting. Employees who > bring their own devices (BYOD) to work are irked by the imposition of MDM > restrictions. Mobile Device Manager Plus allows you to control only the > apps on BYO-devices by containerizing them, leaving personal data untouched! > https://ad.doubleclick.net/ddm/clk/304595813;131938128;j > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en > |
From: cedlemo <ce...@gm...> - 2016-05-12 20:11:11
|
Hey Detlef Reichl, Good news I find out why it does this. First the outline that you see is in fact the decoration of the frame. If you add a label to the frame, it is more obvious. frame = Gtk::Frame.new("frame") FYI it should be better (IMO) to use a Gtk::box instead of using a frame without label and hiding the decoration The solution first and the explications later: Here is the script with a Css that hide the decoration of the frame #!/usr/bin/env ruby require "gtk3" provider = Gtk::CssProvider.new css = <<-CSS @define-color frame_border_tabs rgb(70%, 70%, 70%); @define-color transparent rgba(0, 0, 0, 0.0); frame#tabs { border-style: solid; border-color: @frame_border_tabs @transparent @frame_border_tabs @frame_border_tabs; border-width: 0.2em 0.32em 0.05em 0.1em; border-radius: 1.2em 0.7em 0.7em 1.2em; /*padding: 0.25em 0.25em 0.25em 0.25em;*/ } frame border { border-style: none; border-color: @transparent @transparent @transparent @transparent; box-shadow: none; border-width: 10px; border-radius: 0px; margin: 0px; outline-color: @transparent; } CSS provider.load :data => css screen = Gdk::Display.default.default_screen Gtk::StyleContext.add_provider_for_screen(screen, provider, Gtk::StyleProvider::PRIORITY_USER) window = Gtk::Window.new frame = Gtk::Frame.new("frame") window << frame label = Gtk::Label.new 'Content' frame << label frame.name = 'tabs' frame.style_context.add_provider provider, GLib::MAXUINT window.show_all window.signal_connect "destroy" do Gtk.main_quit end Gtk.main The important part of the css is the frame border selector. look here https://developer.gnome.org/gtk3/stable/GtkFrame.html they say : CSS nodes frame ├── border ├── <labelwidget> ╰── <child> GtkFrame has a main CSS node with name frame and a subnode with name border. The border node is used to render the visible border. The style class .flat can appear with the main node. For real example here is the arc theme https://github.com/horst3180/arc-theme frame > border, .frame { margin: 0; padding: 0; border-radius: 0; border: 1px solid #dcdfe3; } frame > border.flat, .frame.flat { border-style: none; } Here is another example from the Zukitre theme https://github.com/lassekongo83/zuki-themes /********** * Frames * **********/ frame > border, .frame { box-shadow: none; margin: 0; padding: 0; border-radius: 0; border: 1px solid #b0b0b0; } frame > border.flat, .frame.flat { border-style: none; } frame > border:backdrop, .frame:backdrop { border-color: #b4b4b4; } Those new selectors come with Gtk 3.20. I hope this will help you. Regards cedlemo https://github.com/cedlemo |