need help on: Linux Gnome2 Glade Cairo callback problem

M

Mike Durham

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
 
K

Kouhei Sutou

Hi,

In <[email protected]>
"need help on: Linux Gnome2 Glade Cairo callback problem" on Thu, 12 Oct 2006 10:10:05 +0900,
Mike Durham said:
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,
 
M

Mike Durham

Kouhei said:
Hi,

In <[email protected]>
"need help on: Linux Gnome2 Glade Cairo callback problem" on Thu, 12 Oct 2006 10:10:05 +0900,
Mike Durham said:
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,

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top