# Need help on: Linux Gnome2 Glade Cairo callback problem

**URL:** <https://www.ruby-forum.com/t/need-help-on-linux-gnome2-glade-cairo-callback-problem/71873>\
**Category:** Ruby\
**Created:** [October 12, 2006, 3:11am UTC](https://www.ruby-forum.com/t/need-help-on-linux-gnome2-glade-cairo-callback-problem/71873 "2006-10-12T03:11:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![miked](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@miked](https://www.ruby-forum.com/u/miked)\
**Post date:** [October 12, 2006, 3:11am UTC](https://www.ruby-forum.com/t/need-help-on-linux-gnome2-glade-cairo-callback-problem/71873/1 "2006-10-12T03:11:38Z")

</div>

Hi,  
I have a Glade project main app window with a toolbar and 4  
'drawingarea’s, into which I draw some test images using Cairo.  
After anywhere between 50 and 100 drawingarea updates I get the  
following message when clicking on a toolbar button.

cairo\_test\_2.rb:147: warning: GRClosure invoking callback: already  
destroyed

Before the 50-100 drawingarea updates, the callback works fine.  
Could anyone possibly tell me, or offer an opinion as to why the  
callback is getting destroyed?  
All I am doing is updating the drawing areas and clicking on a toolbar  
button.

I use Ubuntu Linux, Gnome2, Glade2 and Cairo of course.

Thanks, Mike

---

<div class="post-metadata">

**Author:** ![miked](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@miked](https://www.ruby-forum.com/u/miked)\
**Post date:** [October 12, 2006, 3:56pm UTC](https://www.ruby-forum.com/t/need-help-on-linux-gnome2-glade-cairo-callback-problem/71873/2 "2006-10-12T15:56:43Z")

</div>

Hi,

In [452da287$removed\_email\_address@domain.invalid](mailto:452da287$removed_email_address@domain.invalid)  
“need help on: Linux Gnome2 Glade Cairo callback problem” on Thu, 12  
Oct 2006 10:10:05 +0900,  
Mike D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have a Glade project main app window with a toolbar and 4  
> 'drawingarea’s, into which I draw some test images using Cairo.  
> After anywhere between 50 and 100 drawingarea updates I get the  
> following message when clicking on a toolbar button.
> 
> cairo\_test\_2.rb:147: warning: GRClosure invoking callback: already destroyed

I fixed this bug in CVS.

The following patch may solve this bug.

— libglade2.rb 8 Jul 2006 16:45:15 -0000 1.13  
+++ libglade2.rb 12 Oct 2006 13:50:17 -0000 1.14  
@@ -40,6 +40,11 @@  
end

```
 if signal_proc

```

- 

```
 @sources ||= {}

```

- 

```
 @sources[source.object_id] = source

```

- 

```
 source.signal_connect("destroy") do |object|

```

- 

```
   @sources.delete(object.object_id)

```

- 

```
 end
 case signal_proc.arity
 when 0
   sig_conn_proc.call(signal) {signal_proc.call}

```

Thanks,

---

<div class="post-metadata">

**Author:** ![miked](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@miked](https://www.ruby-forum.com/u/miked)\
**Post date:** [October 18, 2006, 10:39am UTC](https://www.ruby-forum.com/t/need-help-on-linux-gnome2-glade-cairo-callback-problem/71873/3 "2006-10-18T10:39:45Z")

</div>

Kouhei S. wrote:

> > 
> 
> ## Thanks,
> 
> kou

Thanks Kou, your patch fixed the problem perfectly. Just out of  
interest, where can I get libglade2.rb 1.14? I don’t understand the CVS  
thing, where is it?.  
Thanks again, Mike

---

<div class="post-metadata">

**Author:** ![miked](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@miked](https://www.ruby-forum.com/u/miked)\
**Post date:** [October 18, 2006, 10:40am UTC](https://www.ruby-forum.com/t/need-help-on-linux-gnome2-glade-cairo-callback-problem/71873/4 "2006-10-18T10:40:01Z")

</div>

Kouhei S. wrote:

> > thing, where is it?.  
> > kou

Thank again Kou

Cheers, Mike

---

<div class="post-metadata">

**Author:** ![miked](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@miked](https://www.ruby-forum.com/u/miked)\
**Post date:** [October 18, 2006, 10:39am UTC](https://www.ruby-forum.com/t/need-help-on-linux-gnome2-glade-cairo-callback-problem/71873/5 "2006-10-18T10:39:46Z")

</div>

Hi,

2006/10/13, Mike D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> Thanks Kou, your patch fixed the problem perfectly.

It’s a good news. 🙂

> Just out of  
> interest, where can I get libglade2.rb 1.14? I don’t understand the CVS  
> thing, where is it?.

See [Ruby-GNOME 2 download | SourceForge.net](http://sourceforge.net/cvs/?group_id=53614).

In this case, you will type the following command:  
% cvs -z3  
-d:pserver:removed\_email\_address@domain.invalid:/cvsroot/ruby-gnome2  
co -P ruby-gnome2/libglade

Thanks,
