# "warning: GRClosure invoking callback: already destroyed"

**URL:** <https://www.ruby-forum.com/t/warning-grclosure-invoking-callback-already-destroyed/60684>\
**Category:** Ruby-Gnome 2\
**Created:** [May 16, 2006, 7:39pm UTC](https://www.ruby-forum.com/t/warning-grclosure-invoking-callback-already-destroyed/60684 "2006-05-16T19:39:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpedrosa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ecae2f/32.png) [@jpedrosa](https://www.ruby-forum.com/u/jpedrosa)\
**Post date:** [May 16, 2006, 7:39pm UTC](https://www.ruby-forum.com/t/warning-grclosure-invoking-callback-already-destroyed/60684/1 "2006-05-16T19:39:10Z")

</div>

Hi,

I just updated Ruby-GNOME2 to the latest CVS version, which includes  
the fixes to GRClosure, but now I get the warning  
“warning: GRClosure invoking callback: already destroyed”  
on some menuitem options, and the code does not get invoked.

I think this is getting kind of complex…  
I know I don’t program in a conventional way, but before the GRClosure  
changes I was able to use Ruby-GNOME2 with my custom library…

I am reverting back my Ruby-GNOME2 to the version of CVS  
when I removed the GRClosure fixes, because it works for me, even  
though it might come with the memory leaks.

Meanwhile, here is a description of some of what my library does:

1. it abstracts away the repetitive code of common GUI programs;
2. it uses Gtk.main and Gtk.main\_quit to create custom dialog windows;
3. it uses Ruby Proc/blocks/closures for code all the time;
4. it uses very dynamic code, with plugins/modules that can be launched  
from anywhere on the path;

And now with the latest Ruby-GNOME2 from CVS I can’t use the MenuItems  
with it, because GRClosure has problems with it. The problem is:

1. I don’t know how far the problems go;
2. my library uses other libraries of mine to form the base for my  
programs;
3. I don’t intend to open source all of this yet, because I’m hard at  
work  
creating more programs/functionality, and I don’t have time to make all  
of this open source yet;

If ever Joel Spolsky was right, it was about the “Leaky Abstractions”.  
🙂  
hehe

Thanks guys. I don’t have the time to create examples right now. I will  
revert  
to a good version of Ruby-GNOME2 for me for now…

Cheers,  
Joao

---

<div class="post-metadata">

**Author:** ![jpedrosa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ecae2f/32.png) [@jpedrosa](https://www.ruby-forum.com/u/jpedrosa)\
**Post date:** [May 17, 2006, 4:03pm UTC](https://www.ruby-forum.com/t/warning-grclosure-invoking-callback-already-destroyed/60684/2 "2006-05-17T16:03:04Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“[ruby-gnome2-devel-en] “warning: GRClosure invoking callback: already  
destroyed”” on Tue, 16 May 2006 13:35:08 -0300,  
“Joao P.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I just updated Ruby-GNOME2 to the latest CVS version, which includes  
> the fixes to GRClosure, but now I get the warning  
> “warning: GRClosure invoking callback: already destroyed”  
> on some menuitem options, and the code does not get invoked.

I fixed the problem(\*) which is caused in your  
en\_menu.rb. Could you try again? If you cause same problem  
in other script, please tell me the script name.

(\*) I modified Ruby/GTK2.

## Thanks,

kou

* * *

Using Tomcat but need to do more? Need to support web services,  
security?  
Get stuff done quickly with pre-integrated technology to make your job  
easier  
Download IBM WebSphere Application Server v.1.0.1 based on Apache  
Geronimo  
[http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642](http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642)

---

<div class="post-metadata">

**Author:** ![jpedrosa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ecae2f/32.png) [@jpedrosa](https://www.ruby-forum.com/u/jpedrosa)\
**Post date:** [May 17, 2006, 4:22pm UTC](https://www.ruby-forum.com/t/warning-grclosure-invoking-callback-already-destroyed/60684/3 "2006-05-17T16:22:54Z")

</div>

Hi,

On 5/17/06, Kouhei S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > “warning: GRClosure invoking callback: already destroyed”  
> > on some menuitem options, and the code does not get invoked.
> 
> I fixed the problem(\*) which is caused in your  
> en\_menu.rb. Could you try again? If you cause same problem  
> in other script, please tell me the script name.
> 
> (\*) I modified Ruby/GTK2.

I saw your try (10 minutes ago) and I just tested it, but the problem I  
saw  
is still there.  
It’s in the Database Administrator menu; specifically, it’s in the menu  
“Ferramentas”  
(tools in English).

I will translate the Database Administrator to English to make it easier  
for

you to understand it, as it’s now in Portuguese. I will prepare an  
example  
using  
it and I will send it to you.

Thanks,  
Joao

---

<div class="post-metadata">

**Author:** ![jpedrosa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ecae2f/32.png) [@jpedrosa](https://www.ruby-forum.com/u/jpedrosa)\
**Post date:** [May 17, 2006, 4:41pm UTC](https://www.ruby-forum.com/t/warning-grclosure-invoking-callback-already-destroyed/60684/4 "2006-05-17T16:41:24Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“Re: [ruby-gnome2-devel-en] “warning: GRClosure invoking callback:  
already destroyed”” on Wed, 17 May 2006 11:13:01 -0300,  
“Joao P.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I saw your try (10 minutes ago) and I just tested it, but the problem I saw is  
> still there.  
> It’s in the Database Administrator menu; specifically, it’s in the menu  
> “Ferramentas”  
> (tools in English).

I thought the menu problem was fixed my previous  
commit.  
The script is db\_admin/lib/db\_admin/db\_admin.rb, isn’t it? I  
can’t reproduce the problem. Could you tell me your  
instructions and confirm that updated sources are  
re-compiled correctly again?

> I will translate the Database Administrator to English to make it easier for  
> you to understand it, as it’s now in Portuguese. I will prepare an example  
> using  
> it and I will send it to you.

Thanks, but I will not need that. I will only need  
sample script which is reproduce a problem easily. 🙂

## Thanks,

kou

* * *

Using Tomcat but need to do more? Need to support web services,  
security?  
Get stuff done quickly with pre-integrated technology to make your job  
easier  
Download IBM WebSphere Application Server v.1.0.1 based on Apache  
Geronimo  
[http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642](http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642)

---

<div class="post-metadata">

**Author:** ![jpedrosa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ecae2f/32.png) [@jpedrosa](https://www.ruby-forum.com/u/jpedrosa)\
**Post date:** [May 17, 2006, 5:18pm UTC](https://www.ruby-forum.com/t/warning-grclosure-invoking-callback-already-destroyed/60684/5 "2006-05-17T17:18:45Z")

</div>

Hi,

On 5/17/06, Kouhei S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> includes
> 
> > I saw your try (10 minutes ago) and I just tested it, but the problem I  
> > instructions and confirm that updated sources are  
> > re-compiled correctly again?

The problem is that I first open a database before I try to  
use the options on the “Ferramentas” (tools) menu – this may  
be a difference between your tests and mine.

I just downloaded and am recompiling the Ruby-GNOME2 again,  
just to make sure.

> I will translate the Database Administrator to English to make it easier  
> for
> 
> > you to understand it, as it’s now in Portuguese. I will prepare an  
> > example  
> > using  
> > it and I will send it to you.
> 
> Thanks, but I will not need that. I will only need  
> sample script which is reproduce a problem easily. 🙂

You need to at least open a database, I think. I have translated  
a little bit of it (2 scripts, the main db\_admin.rb and the one  
that opens the database connection. It may be important to use the  
program a little bit for the error to show up.

I can’t believe it. I’m testing the Database Administrator again  
and it does not have the problem… but as I kept testing, I found  
other problem:  
\*\*\* glibc detected \*\*\* free(): invalid pointer: 0x08f37157 \*\*\*

And it seems that the Ruby Editor has some problem as well,  
because I kept clicking on the menu options of it and it crashed…  
Ruby Editor as well:  
\*\*\* glibc detected \*\*\* free(): invalid pointer: 0x08948197 \*\*\*

But it’s kind of random… That is, I have to use the programs quite  
a bit before the crashes occur. I will try to call the garbage  
collector…  
GC.start didn’t tell me anything on Ruby Editor…

I just tested again the Database Administrator and now I got another  
error:  
GLib-GObject-ERROR \*\*: file gsignal.c: line 569 (handler\_unref\_R):  
assertion  
failed: (hlist-\>tail\_after == handler)

The problem with the error “glibc detected \*\*\* free(): invalid pointer:  
0x08948197”  
is that it makes the preferences of my apps go blank, so it’s pretty  
painful, even  
though it might take a while to reach it.

What now? I think things improved, but it’s still unstable. I will  
procede  
with the example and I will send to you instructions with the update  
library.

Thanks.  
Joao

---

<div class="post-metadata">

**Author:** ![jpedrosa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ecae2f/32.png) [@jpedrosa](https://www.ruby-forum.com/u/jpedrosa)\
**Post date:** [May 17, 2006, 5:15pm UTC](https://www.ruby-forum.com/t/warning-grclosure-invoking-callback-already-destroyed/60684/6 "2006-05-17T17:15:37Z")

</div>

Hi Joao,

On Wed, 17 May 2006 11:13:01 -0300  
“Joao P.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,

> it and I will send it to you.  
> I always appreciate your helps and you’re patient.

Now, CVS version is not stable because we changes some important things  
(mainly memory management).

So we need to test it more and more.  
But it’s actually improved. Keep to check it and report us as you can.

–  
.:% Masao M.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

* * *

Using Tomcat but need to do more? Need to support web services,  
security?  
Get stuff done quickly with pre-integrated technology to make your job  
easier  
Download IBM WebSphere Application Server v.1.0.1 based on Apache  
Geronimo  
[http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642](http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642)

---

<div class="post-metadata">

**Author:** ![jpedrosa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ecae2f/32.png) [@jpedrosa](https://www.ruby-forum.com/u/jpedrosa)\
**Post date:** [May 17, 2006, 5:57pm UTC](https://www.ruby-forum.com/t/warning-grclosure-invoking-callback-already-destroyed/60684/7 "2006-05-17T17:57:01Z")

</div>

Hi,

On 5/17/06, Masao M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > is still there.  
> > it and I will send it to you.
> 
> I always appreciate your helps and you’re patient.
> 
> Now, CVS version is not stable because we changes some important things  
> (mainly memory management).
> 
> So we need to test it more and more.  
> But it’s actually improved. Keep to check it and report us as you can.

Thanks Masao 🙂

We have a long history already. hehe. 🙂

Cheers,  
Joao

---

<div class="post-metadata">

**Author:** ![jpedrosa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ecae2f/32.png) [@jpedrosa](https://www.ruby-forum.com/u/jpedrosa)\
**Post date:** [May 18, 2006, 2:27pm UTC](https://www.ruby-forum.com/t/warning-grclosure-invoking-callback-already-destroyed/60684/8 "2006-05-18T14:27:40Z")

</div>

Hi,

In [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
“Re: [ruby-gnome2-devel-en] “warning: GRClosure invoking callback:  
already destroyed”” on Wed, 17 May 2006 12:17:26 -0300,  
“Joao P.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> The problem is that I first open a database before I try to  
> use the options on the “Ferramentas” (tools) menu – this may  
> be a difference between your tests and mine.

Ah, I see. I did wrong test.

> I just downloaded and am recompiling the Ruby-GNOME2 again,  
> just to make sure.

Thanks.

> You need to at least open a database, I think. I have translated  
> a little bit of it (2 scripts, the main db\_admin.rb and the one  
> that opens the database connection. It may be important to use the  
> program a little bit for the error to show up.

You’re right. Could you give me the scripts?

> I can’t believe it. I’m testing the Database Administrator again  
> and it does not have the problem… but as I kept testing, I found  
> other problem:  
> \*\*\* glibc detected \*\*\* free(): invalid pointer: 0x08f37157 \*\*\*

It seems that this is different problem.

> I just tested again the Database Administrator and now I got another  
> error:  
> GLib-GObject-ERROR \*\*: file gsignal.c: line 569 (handler\_unref\_R): assertion  
> failed: (hlist-\>tail\_after == handler)

And this is another problem.

Hmm…

## Thanks,

kou

* * *

Using Tomcat but need to do more? Need to support web services,  
security?  
Get stuff done quickly with pre-integrated technology to make your job  
easier  
Download IBM WebSphere Application Server v.1.0.1 based on Apache  
Geronimo  
[http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642](http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642)
