guile-gtk-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Avoiding scm_protect_object


From: gregory benison
Subject: Re: Avoiding scm_protect_object
Date: Tue, 31 Oct 2006 18:02:53 -0800


I just checked in an implementation of scm_glib_gc_protect_object, and
its unprotect counterpart, into the guile-gnome repository. It seems to
fix the GC problems that were first found by Gregory.


Yes, this implementation seems to work very well- I tried it in the
same context that prompted my original post and it runs fine past the
point where the old guile-gnome would crash (stack trace below).

It's good to see this in the main branch- thanks!

#0  scm_glib_gc_unprotect_object (obj=0xb7f168c8) at gc.c:66
#1  0x008e7605 in free_closure (data=0x0, closure=0x9e8fe40) at gclosure.c:107
#2  0x0024781c in IA__g_closure_invalidate (closure=0x9e8fe40) at gclosure.c:123
#3  0x00247949 in IA__g_closure_unref (closure=0x9e8fe40) at gclosure.c:341
#4  0x002587df in IA__g_signal_handlers_destroy (instance=0x9e92fa0)
at gsignal.c:628
#5  0x002497ad in g_object_real_dispose (object=0x9e92fa0) at gobject.c:523
#6  0x002499ee in IA__g_object_unref (_object=0x9e92fa0) at gobject.c:558
#7  0x008ee803 in scm_gtype_instance_free (smob=0xb7c3e090) at gtype.c:468
#8  0x00172ec5 in scm_i_sweep_card (p=0xb7c3e090,
free_list=0xbff0d1d0, seg=0x8c1ed58) at gc-card.c:234
#9  0x00171d1d in scm_i_sweep_some_cards (seg=0x8c1ed58) at gc-segment.c:164
#10 0x00172076 in scm_i_sweep_some_segments (fl=0x1e33b4) at gc-segment.c:334
#11 0x00171269 in scm_gc_for_newcell (freelist=0x1e33b4,
free_cells=0x8c02080) at gc.c:485
#12 0x0015c9f3 in scm_dynwind_rewind_handler (proc=0x177a88
<lock_cache_mutex>, data=0xb7e16828, flags=SCM_F_WIND_EXPLICITLY)
   at ../libguile/inline.h:151
#13 0x0015cc84 in scm_internal_dynamic_wind (before=0x177a88
<lock_cache_mutex>, inner=0x177ac8 <call_memoize_method>,
   after=0x177aa8 <unlock_cache_mutex>, inner_data=0xb7506fe0,
guard_data=0xb7e16828) at dynwind.c:124
#14 0x00177b8b in scm_memoize_method (x=0xb7a2faf0, args=0xb7506ff0)
at goops.c:2181
#15 0x0016a3f0 in ceval (x=0xb7a2faf0, env=0xb7504030) at eval.c:3891
#16 0x0016be9f in ceval (x=0xb7dd8d68, env=0xb7504030) at
../libguile/inline.h:250
#17 0x0016b1aa in ceval (x=0xb7b3a4a0, env=0xb7504750) at
../libguile/inline.h:250
#18 0x0016a025 in ceval (x=0xb7e787b8, env=0xb7504b78) at
../libguile/inline.h:250
#19 0x0016b1aa in ceval (x=0xb7b37500, env=0xb7504b78) at
../libguile/inline.h:250
#20 0x0016be9f in ceval (x=0xb7aa6f08, env=0xb7504c40) at
../libguile/inline.h:250
---Type <return> to continue, or q <return> to quit---
#21 0x0016599d in scm_apply (proc=0xb7a9a118, arg1=0x404,
args=0xb7504c80) at ../libguile/inline.h:250
#22 0x008e751f in scm_gclosure_marshal (closure=0x8f0d460,
return_value=0x0, n_param_values=1, param_values=0xbff0d828,
   invocation_hint=0xbff0d710, marshal_data=0x0) at gclosure.c:77
#23 0x00247dc9 in IA__g_closure_invoke (closure=0x8f0d460,
return_value=0x0, n_param_values=1, param_values=0xbff0d828,
   invocation_hint=0xbff0d710) at gclosure.c:437
#24 0x0025a9f6 in signal_emit_unlocked_R (node=0x8d42498, detail=0,
instance=0x8f0a930, emission_return=0x0,
   instance_and_params=0xbff0d828) at gsignal.c:2488
#25 0x0025b98a in IA__g_signal_emit_valist (instance=0x8f0a930,
signal_id=277, detail=0, var_args=0xbff0d9b4 "A")
   at gsignal.c:2247
#26 0x0025bbd8 in IA__g_signal_emit (instance=0x8f0a930,
signal_id=277, detail=0) at gsignal.c:2291
#27 0x00f403b7 in IA__gtk_adjustment_value_changed
(adjustment=0x8f0a930) at gtkadjustment.c:392
#28 0x00f404c4 in IA__gtk_adjustment_set_value (adjustment=0x8f0a930,
value=120.26863954950662) at gtkadjustment.c:375
#29 0x00457f2a in marker_set_pos_method (self=0x9165168,
x=8.0005686463158288, y=120.26863954950662) at ../../src/marker.c:290
#30 0x0045a4e0 in ornament_motion_event_handler (self=0x9165168,
x=8.0005686463158288, y=120.26863954950662)
   at ../../src/ornament.c:221




======================
Gregory Benison
Oregon State University
(541)-737-1876
gbenison at gmail dot com
======================




reply via email to

[Prev in Thread] Current Thread [Next in Thread]