Forum: Ruby-Gnome 2 "warning: GRClosure invoking callback: already destroyed"

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Joao P. (Guest)
on 2006-05-16 21:39
(Received via mailing list)
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
Kouhei S. (Guest)
on 2006-05-17 18:03
(Received via mailing list)
Hi,

In <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> 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...
Joao P. (Guest)
on 2006-05-17 18:22
(Received via mailing list)
Hi,

On 5/17/06, Kouhei S. <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
Kouhei S. (Guest)
on 2006-05-17 18:41
(Received via mailing list)
Hi,


In <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> 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...
Masao M. (Guest)
on 2006-05-17 19:15
(Received via mailing list)
Hi Joao,

On Wed, 17 May 2006 11:13:01 -0300
"Joao P." <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>


-------------------------------------------------------
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...
Joao P. (Guest)
on 2006-05-17 19:18
(Received via mailing list)
Hi,

On 5/17/06, Kouhei S. <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
Joao P. (Guest)
on 2006-05-17 19:57
(Received via mailing list)
Hi,

On 5/17/06, Masao M. <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
Kouhei S. (Guest)
on 2006-05-18 16:27
(Received via mailing list)
Hi,

In <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> 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...
This topic is locked and can not be replied to.