* guile-gnome2 - Segmentation fault
@ 2010-06-29 21:33 David Pirotte
2010-07-01 10:58 ` Andy Wingo
0 siblings, 1 reply; 10+ messages in thread
From: David Pirotte @ 2010-06-29 21:33 UTC (permalink / raw)
To: guile-user
Hello,
debian [testing/unstable]
all guile-gnome2 2.16.1-4 installed
I'll try to produce a better backtrace [some .deb package have no -dbg corresponding package
and the -dev do not always include debugging symbols]
But in order to help me helping developpers to get rid og this bug [which did not desappear with
the guile-gnome0 -> guile-gnome2 'porting' [in progress but some bits working already], I am
sending what i could come up with so far.
Thanks,
David
;; --
Program received signal SIGSEGV, Segmentation fault.
slab_allocator_free_chunk (chunk_size=<value optimized out>, mem=0x928e708)
at /build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gslice.c:1103
1103 /build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gslice.c: Aucun fichier ou dossier de ce type.
in /build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gslice.c
(gdb) backtrace
#0 slab_allocator_free_chunk (chunk_size=<value optimized out>,
mem=0x928e708)
at /build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gslice.c:1103
#1 0xb737f032 in magazine_cache_trim (ix=<value optimized out>,
magazine_chunks=<value optimized out>, count=51)
at /build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gslice.c:626
#2 magazine_cache_push_magazine (ix=<value optimized out>,
magazine_chunks=<value optimized out>, count=51)
at /build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gslice.c:657
#3 0xb737f62d in thread_memory_magazine2_unload (mem_size=12,
mem_chain=0x91c0530, next_offset=4)
at /build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gslice.c:756
#4 IA__g_slice_free_chain_with_offset (mem_size=12, mem_chain=0x91c0530,
next_offset=4)
at /build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gslice.c:940
#5 0xb735e2c1 in IA__g_list_free (list=0x91c0530)
at /build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/glist.c:180
#6 0xb6b865bb in _gdk_window_process_updates_recurse (window=0x8e3f738,
expose_region=0x8d7c040)
at /build/buildd-gtk+2.0_2.20.1-1-i386-Ixfflh/gtk+2.0-2.20.1/gdk/gdkwindow.c:5165
#7 0xb6baf4c4 in _gdk_windowing_window_process_updates_recurse (
window=0x8e3f738, region=0x8d7c040)
at /build/buildd-gtk+2.0_2.20.1-1-i386-Ixfflh/gtk+2.0-2.20.1/gdk/x11/gdkwindow-x11.c:5566
#8 0xb6b82e73 in gdk_window_process_updates_internal (window=0x8e3f738)
at /build/buildd-gtk+2.0_2.20.1-1-i386-Ixfflh/gtk+2.0-2.20.1/gdk/gdkwindow.c:5340
#9 0xb6b84e8f in IA__gdk_window_process_all_updates ()
at /build/buildd-gtk+2.0_2.20.1-1-i386-Ixfflh/gtk+2.0-2.20.1/gdk/gdkwindow.c:5448
#10 0xb6b84f0b in gdk_window_update_idle (data=0x0)
at /build/buildd-gtk+2.0_2.20.1-1-i386-Ixfflh/gtk+2.0-2.20.1/gdk/gdkwindow.c:5074
#11 0xb6b612e8 in gdk_threads_dispatch (data=0x8d7b630)
at /build/buildd-gtk+2.0_2.20.1-1-i386-Ixfflh/gtk+2.0-2.20.1/gdk/gdk.c:512
#12 0xb735e371 in g_idle_dispatch (source=0x96afa90, callback=0x928e7e8,
user_data=0x8d7b630)
at /build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gmain.c:4065
#13 0xb73602f5 in g_main_dispatch (context=0x8b023c0)
at /build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gmain.c:1960
#14 IA__g_main_context_dispatch (context=0x8b023c0)
at /build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gmain.c:2513
#15 0xb7363fd8 in g_main_context_iterate (context=0x8b023c0,
block=<value optimized out>, dispatch=1, self=0x8a75bb0)
at /build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gmain.c:2591
#16 0xb7364517 in IA__g_main_loop_run (loop=0x9168ed8)
at /build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gmain.c:2799
#17 0xb726f84d in ?? ()
from /usr/lib/guile-gnome-2/libgw-guile-gnome-glib.so.0
#18 0xb77f0cfb in scm_without_guile () from /usr/lib/libguile.so.17
#19 0xb726f67d in _wrap_g_main_loop_run ()
from /usr/lib/guile-gnome-2/libgw-guile-gnome-glib.so.0
#20 0xb717f54f in ffi_call_SYSV () at ../src/x86/sysv.S:61
#21 0xb717f38e in ffi_call (cif=0x8ac7290,
fn=0xb726f550 <_wrap_g_main_loop_run>, rvalue=0xbfec1054,
avalue=0xb76893e8) at ../src/x86/ffi.c:326
#22 0xb7188877 in ?? () from /usr/lib/libgwrap-guile-runtime.so.2
#23 0xb77cf1b7 in ?? () from /usr/lib/libguile.so.17
#24 0xb778c627 in ?? () from /usr/lib/libguile.so.17
#25 0xb778d416 in ?? () from /usr/lib/libguile.so.17
#26 0xb778d1c7 in ?? () from /usr/lib/libguile.so.17
#27 0xb778de96 in ?? () from /usr/lib/libguile.so.17
#28 0xb778d416 in ?? () from /usr/lib/libguile.so.17
#29 0xb7793fad in scm_call_0 () from /usr/lib/libguile.so.17
#30 0xb77f577e in ?? () from /usr/lib/libguile.so.17
#31 0xb77bfe67 in scm_fill_input () from /usr/lib/libguile.so.17
#32 0xb77c923b in ?? () from /usr/lib/libguile.so.17
#33 0xb77cb7e1 in scm_read () from /usr/lib/libguile.so.17
#34 0xb778c846 in ?? () from /usr/lib/libguile.so.17
#35 0xb778d1c7 in ?? () from /usr/lib/libguile.so.17
#36 0xb778bf85 in ?? () from /usr/lib/libguile.so.17
#37 0xb778cc59 in ?? () from /usr/lib/libguile.so.17
#38 0xb778bf85 in ?? () from /usr/lib/libguile.so.17
#39 0xb778ec5d in scm_apply () from /usr/lib/libguile.so.17
#40 0xb7793fad in scm_call_0 () from /usr/lib/libguile.so.17
#41 0xb777df0d in ?? () from /usr/lib/libguile.so.17
#42 0xb77820dd in scm_internal_dynamic_wind () from /usr/lib/libguile.so.17
#43 0xb777dec4 in scm_with_traps () from /usr/lib/libguile.so.17
#44 0xb778c6fb in ?? () from /usr/lib/libguile.so.17
#45 0xb7793fad in scm_call_0 () from /usr/lib/libguile.so.17
#46 0xb77820dd in scm_internal_dynamic_wind () from /usr/lib/libguile.so.17
#47 0xb777895f in scm_call_with_unblocked_asyncs ()
from /usr/lib/libguile.so.17
#48 0xb778c6fb in ?? () from /usr/lib/libguile.so.17
#49 0xb7793fad in scm_call_0 () from /usr/lib/libguile.so.17
#50 0xb77f2c30 in scm_body_thunk () from /usr/lib/libguile.so.17
#51 0xb77f3073 in scm_c_catch () from /usr/lib/libguile.so.17
#52 0xb77f31f1 in scm_catch_with_pre_unwind_handler ()
from /usr/lib/libguile.so.17
#53 0xb77a6abf in scm_gsubr_apply () from /usr/lib/libguile.so.17
#54 0xb778ea1d in scm_apply () from /usr/lib/libguile.so.17
#55 0xb778bed2 in ?? () from /usr/lib/libguile.so.17
#56 0xb778d1c7 in ?? () from /usr/lib/libguile.so.17
#57 0xb7793fad in scm_call_0 () from /usr/lib/libguile.so.17
#58 0xb77820dd in scm_internal_dynamic_wind () from /usr/lib/libguile.so.17
#59 0xb7778a28 in scm_call_with_blocked_asyncs () from /usr/lib/libguile.so.17
#60 0xb778c6fb in ?? () from /usr/lib/libguile.so.17
#61 0xb778d1c7 in ?? () from /usr/lib/libguile.so.17
#62 0xb778d1c7 in ?? () from /usr/lib/libguile.so.17
#63 0xb7793fad in scm_call_0 () from /usr/lib/libguile.so.17
#64 0xb7782155 in scm_dynamic_wind () from /usr/lib/libguile.so.17
#65 0xb778c32c in ?? () from /usr/lib/libguile.so.17
#66 0xb7793fad in scm_call_0 () from /usr/lib/libguile.so.17
#67 0xb7782155 in scm_dynamic_wind () from /usr/lib/libguile.so.17
#68 0xb778c32c in ?? () from /usr/lib/libguile.so.17
#69 0xb7793fad in scm_call_0 () from /usr/lib/libguile.so.17
#70 0xb77f2c30 in scm_body_thunk () from /usr/lib/libguile.so.17
#71 0xb77f3073 in scm_c_catch () from /usr/lib/libguile.so.17
#72 0xb77f31f1 in scm_catch_with_pre_unwind_handler ()
from /usr/lib/libguile.so.17
#73 0xb77a6abf in scm_gsubr_apply () from /usr/lib/libguile.so.17
#74 0xb778ea1d in scm_apply () from /usr/lib/libguile.so.17
#75 0xb778bed2 in ?? () from /usr/lib/libguile.so.17
#76 0xb778d0b3 in ?? () from /usr/lib/libguile.so.17
#77 0xb779464a in scm_primitive_eval_x () from /usr/lib/libguile.so.17
#78 0xb77946a5 in scm_eval_x () from /usr/lib/libguile.so.17
#79 0xb77cdd41 in scm_shell () from /usr/lib/libguile.so.17
#80 0xb77ab366 in ?? () from /usr/lib/libguile.so.17
#81 0xb777c082 in ?? () from /usr/lib/libguile.so.17
#82 0xb77f3073 in scm_c_catch () from /usr/lib/libguile.so.17
#83 0xb777c637 in scm_i_with_continuation_barrier ()
from /usr/lib/libguile.so.17
#84 0xb777c713 in scm_c_with_continuation_barrier ()
from /usr/lib/libguile.so.17
#85 0xb77f1d89 in scm_i_with_guile_and_parent () from /usr/lib/libguile.so.17
#86 0xb77f1dde in scm_with_guile () from /usr/lib/libguile.so.17
#87 0xb77ab2ff in scm_boot_guile () from /usr/lib/libguile.so.17
#88 0x08048562 in ?? ()
#89 0xb755bc76 in __libc_start_main (main=0x8048530, argc=5,
ubp_av=0xbfec2b34, init=0x80485a0, fini=0x8048590,
rtld_fini=0xb78580c0 <_dl_fini>, stack_end=0xbfec2b2c) at libc-start.c:228
#90 0x08048491 in ?? ()
(gdb)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: guile-gnome2 - Segmentation fault
2010-06-29 21:33 guile-gnome2 - Segmentation fault David Pirotte
@ 2010-07-01 10:58 ` Andy Wingo
2010-07-02 16:32 ` David Pirotte
2010-07-06 6:15 ` David Pirotte
0 siblings, 2 replies; 10+ messages in thread
From: Andy Wingo @ 2010-07-01 10:58 UTC (permalink / raw)
To: David Pirotte; +Cc: guile-user
On Tue 29 Jun 2010 22:33, David Pirotte <david@altosw.be> writes:
> I'll try to produce a better backtrace [some .deb package have no -dbg corresponding package
> and the -dev do not always include debugging symbols]
>
> But in order to help me helping developpers to get rid og this bug [which did not desappear with
> the guile-gnome0 -> guile-gnome2 'porting' [in progress but some bits working already], I am
> sending what i could come up with so far.
Thanks for the report. Unfortunately the backtrace is not
sufficient. Something is being freed with g_free which should be freed
via a specific deallocator. Can you check to see that the following
patches are applied to the debian package:
0ca1de9d89ed7b2899e49f273f27f810540a6508
3d11c93b290992b2c4d9eeef57c2a7a54f808783
Thanks,
Andy
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: guile-gnome2 - Segmentation fault
2010-07-01 10:58 ` Andy Wingo
@ 2010-07-02 16:32 ` David Pirotte
2010-07-03 17:25 ` Andy Wingo
2010-07-06 6:15 ` David Pirotte
1 sibling, 1 reply; 10+ messages in thread
From: David Pirotte @ 2010-07-02 16:32 UTC (permalink / raw)
To: Andy Wingo; +Cc: guile-user
Hi Andy,
I don't know, on the debian patch tracking system page for guile-gnome-platform,
patches are listed by names. I don't see these [MD5sum?] numbers you mentioned,
could you may be have a quick look @
http://patch-tracker.debian.org/package/guile-gnome-platform/2.16.1-4
on my box, apt-get source ... the debian/patches directory mention
fixes/glib-test-stack-depth.diff -p1
fixes/gtk-2.18-build.diff -p1
fixes/link-with-guile-cairo.diff -p1
Many thanks,
David
ps I tried to find out where guile-gnome patch names and numbers are,
including here, https://bugzilla.gnome.org/browse.cgi?product=guile-gnome
but didn't succeed, where is that maintained?
;; --
Le Thu, 01 Jul 2010 11:58:04 +0100,
Andy Wingo <wingo@pobox.com> a écrit :
> On Tue 29 Jun 2010 22:33, David Pirotte <david@altosw.be> writes:
>
> > I'll try to produce a better backtrace [some .deb package have no -dbg
> > corresponding package and the -dev do not always include debugging symbols]
> >
> > But in order to help me helping developpers to get rid og this bug [which did
> > not desappear with the guile-gnome0 -> guile-gnome2 'porting' [in progress but
> > some bits working already], I am sending what i could come up with so far.
>
> Thanks for the report. Unfortunately the backtrace is not
> sufficient. Something is being freed with g_free which should be freed
> via a specific deallocator. Can you check to see that the following
> patches are applied to the debian package:
>
> 0ca1de9d89ed7b2899e49f273f27f810540a6508
> 3d11c93b290992b2c4d9eeef57c2a7a54f808783
>
> Thanks,
>
> Andy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: guile-gnome2 - Segmentation fault
2010-07-02 16:32 ` David Pirotte
@ 2010-07-03 17:25 ` Andy Wingo
2010-07-03 19:24 ` David Pirotte
2010-07-05 0:54 ` David Pirotte
0 siblings, 2 replies; 10+ messages in thread
From: Andy Wingo @ 2010-07-03 17:25 UTC (permalink / raw)
To: David Pirotte; +Cc: guile-user
Hi,
I had said:
>> Can you check to see that the following patches are applied to the
>> debian package:
>>
>> 0ca1de9d89ed7b2899e49f273f27f810540a6508
>> 3d11c93b290992b2c4d9eeef57c2a7a54f808783
These are git commits.
You replied:
On Fri 02 Jul 2010 17:32, David Pirotte <david@altosw.be> writes:
> I don't know, on the debian patch tracking system page for guile-gnome-platform,
> patches are listed by names. I don't see these [MD5sum?] numbers you mentioned,
Chdir into gtk/ in your guile-gnome platform checkout, and do "gitk
REVNAME", and see if that patch is in debian.
Regards,
Andy
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: guile-gnome2 - Segmentation fault
2010-07-03 17:25 ` Andy Wingo
@ 2010-07-03 19:24 ` David Pirotte
2010-07-05 0:54 ` David Pirotte
1 sibling, 0 replies; 10+ messages in thread
From: David Pirotte @ 2010-07-03 19:24 UTC (permalink / raw)
To: Andy Wingo; +Cc: guile-user
Hi Andy,
I am sorry I am not very helpful with these source code management techniques, git
was not even installed on my machine! [still use cvs for my own work :-(] But I am
very happy to learn!
I installed git, did a checkout and compared source code, and NO, the 2 patches you
mentioned are not in the debian latest guile-gnome-platform:
I'll try to apply them to the latest debian guile-gnome-platform source
tree, but debuild and ./debian/rules binary give me troubles any time I
touch any source [help from debian knowledgeable schemers on this list well
come]
From the git checkout:
scripts/configure-packages guile-gnome-platform
./autogen.sh --prefix=... && make
and get an error [below]. if I remember well, it is because I am using a version of gtk > 2.18.
and a patch is available somewhere:
how to get and apply it?
Many thanks,
David
;; --
...
make[5]: Entering directory `/usr/local/src/guile-gnome/guile-gnome-platform/gtk/gnome/gw'
/bin/sh ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../glib/gnome/gobject -I../../../glib/gnome/gobject -I. -I. -Wall -Werror -g -I/usr/include/guile-cairo -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -std=gnu99 -g -O2 -MT libgw_guile_gnome_gtk_la-guile-gtk-tree-model.lo -MD -MP -MF .deps/libgw_guile_gnome_gtk_la-guile-gtk-tree-model.Tpo -c -o libgw_guile_gnome_gtk_la-guile-gtk-tree-model.lo `test -f 'guile-gtk-tree-model.c' || echo './'`guile-gtk-tree-model.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../glib/gnome/gobject -I../../../glib/gnome/gobject -I. -I. -Wall -Werror -g -I/usr/include/guile-cairo -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -std=gnu99 -g -O2 -MT libgw_guile_gnome_gtk_la-guile-gtk-tree-model.lo -MD -MP -MF .deps/libgw_guile_gnome_gtk_la-guile-gtk-tree-model.Tpo -c guile-gtk-tree-model.c -fPIC -DPIC -o .libs/libgw_guile_gnome_gtk_la-guile-gtk-tree-model.o
In file included from guile-gtk-tree-model.c:33:
gtk-support.h:120: error: conflicting types for 'gtk_widget_get_allocation'
/usr/include/gtk-2.0/gtk/gtkwidget.h:995: note: previous declaration of 'gtk_widget_get_allocation' was here
make[5]: *** [libgw_guile_gnome_gtk_la-guile-gtk-tree-model.lo] Error 1
make[5]: Leaving directory `/usr/local/src/guile-gnome/guile-gnome-platform/gtk/gnome/gw'
make[4]: *** [all] Error 2
...
Le Sat, 03 Jul 2010 18:25:48 +0100,
Andy Wingo <wingo@pobox.com> a écrit :
> Hi,
>
> I had said:
>
> >> Can you check to see that the following patches are applied to the
> >> debian package:
> >>
> >> 0ca1de9d89ed7b2899e49f273f27f810540a6508
> >> 3d11c93b290992b2c4d9eeef57c2a7a54f808783
>
> These are git commits.
>
> You replied:
>
> On Fri 02 Jul 2010 17:32, David Pirotte <david@altosw.be> writes:
>
> > I don't know, on the debian patch tracking system page for guile-gnome-platform,
> > patches are listed by names. I don't see these [MD5sum?] numbers you mentioned,
>
> Chdir into gtk/ in your guile-gnome platform checkout, and do "gitk
> REVNAME", and see if that patch is in debian.
>
> Regards,
>
> Andy
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: guile-gnome2 - Segmentation fault
2010-07-03 17:25 ` Andy Wingo
2010-07-03 19:24 ` David Pirotte
@ 2010-07-05 0:54 ` David Pirotte
1 sibling, 0 replies; 10+ messages in thread
From: David Pirotte @ 2010-07-05 0:54 UTC (permalink / raw)
To: Andy Wingo; +Cc: guile-user
[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]
Hi Andy,
I patched the debian source/debuild/dpkg -i with the 2 patches you mentioned and
that were not in the debian ... but it still crash. this time the backtrace is
larger, would it gives us more info?
I'll try to make a short example which 'mimics' what my app mainly do and try to
make it crashing as well, if that 'works' I'll send it ...
I will patch the git checkout for gtk > 2.18 and install from source in order to be
able to do react in a 'quicker way' to suggestions: I am thinking that I should, with
your help maybe, insert 'printf' 'everywhere until we can discover the source of my
problem, what do toy think?
Cheers,
David
;; --
Le Sat, 03 Jul 2010 18:25:48 +0100,
Andy Wingo <wingo@pobox.com> a écrit :
> Hi,
>
> I had said:
>
> >> Can you check to see that the following patches are applied to the
> >> debian package:
> >>
> >> 0ca1de9d89ed7b2899e49f273f27f810540a6508
> >> 3d11c93b290992b2c4d9eeef57c2a7a54f808783
>
> These are git commits.
>
> You replied:
>
> On Fri 02 Jul 2010 17:32, David Pirotte <david@altosw.be> writes:
>
> > I don't know, on the debian patch tracking system page for guile-gnome-platform,
> > patches are listed by names. I don't see these [MD5sum?] numbers you mentioned,
>
> Chdir into gtk/ in your guile-gnome platform checkout, and do "gitk
> REVNAME", and see if that patch is in debian.
>
> Regards,
>
> Andy
[-- Attachment #2: backtrace.txt.gz --]
[-- Type: application/x-gzip, Size: 3764 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: guile-gnome2 - Segmentation fault
2010-07-01 10:58 ` Andy Wingo
2010-07-02 16:32 ` David Pirotte
@ 2010-07-06 6:15 ` David Pirotte
2010-07-06 15:37 ` Patrick Bernaud
1 sibling, 1 reply; 10+ messages in thread
From: David Pirotte @ 2010-07-06 6:15 UTC (permalink / raw)
To: Andy Wingo; +Cc: guile-user
[-- Attachment #1: Type: text/plain, Size: 1515 bytes --]
Hi Andy,
guile-gnome users,
Launching the following little application example and clicking the 'Start' button
systematically provoke a segmentation fault on guile-gnome-2 [and guile-gnome-0]
Does it crashes for you [any guile-gnome user willing to try?] too?
Thanks,
David
ps: while building this small example, I thought it was due to the calls
...
(gtku/status-pop statusbar "")
(gtku/status-push statusbar (get-value model iter 0) "")
...
in my (connect selection 'changed ...) code, but then I commented and it
still crashed.
;; --
Le Thu, 01 Jul 2010 11:58:04 +0100,
Andy Wingo <wingo@pobox.com> a écrit :
> On Tue 29 Jun 2010 22:33, David Pirotte <david@altosw.be> writes:
>
> > I'll try to produce a better backtrace [some .deb package have no -dbg
> > corresponding package and the -dev do not always include debugging symbols]
> >
> > But in order to help me helping developpers to get rid og this bug [which did
> > not desappear with the guile-gnome0 -> guile-gnome2 'porting' [in progress but
> > some bits working already], I am sending what i could come up with so far.
>
> Thanks for the report. Unfortunately the backtrace is not
> sufficient. Something is being freed with g_free which should be freed
> via a specific deallocator. Can you check to see that the following
> patches are applied to the debian package:
>
> 0ca1de9d89ed7b2899e49f273f27f810540a6508
> 3d11c93b290992b2c4d9eeef57c2a7a54f808783
>
> Thanks,
> Andy
[-- Attachment #2: gslice-auto-crash-attempt.scm --]
[-- Type: text/x-scheme, Size: 10823 bytes --]
#! /bin/sh
# -*- scheme -*-
hn=`hostname`
if [[ "$hn" == "tabu" ]]
then exec guile-gnome-0 -s $0 "$@"
else exec guile-gnome-2 -s $0 "$@"
fi
!#
;; guile-gnome
;; Copyright (C) 2003,2004 Free Software Foundation, Inc.
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 2 of
;; the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact:
;;
;; Free Software Foundation Voice: +1-617-542-5942
;; 59 Temple Place - Suite 330 Fax: +1-617-542-2652
;; Boston, MA 02111-1307, USA gnu@gnu.org
(read-set! keywords 'prefix)
(use-modules (ice-9 receive)
(oop goops)
(gnome gobject)
(gnome gtk)
(gnome gtk gdk-event))
(define *model* #f)
(define *selection* #f)
(define (pack-tv-column tv column renderer pos)
(pack-start column renderer #t)
(add-attribute column renderer "text" pos)
(append-column tv column))
(define (add-columns treeview)
(let* ((renderer1 (make <gtk-cell-renderer-text>))
(column1 (make <gtk-tree-view-column>
:title "Column 1"
:sizing 'fixed
:fixed-width 65
;:clickable #f
;:resizable #f
;:reorderable #f
:alignment .5
))
(renderer2 (make <gtk-cell-renderer-text>))
(column2 (make <gtk-tree-view-column>
:title "Column 2"
:sizing 'fixed
:fixed-width 65
;:clickable #f
;:resizable #f
;:reorderable #f
:alignment .5
))
(renderer3 (make <gtk-cell-renderer-text>))
(column3 (make <gtk-tree-view-column>
:title "Column 3"
:expand #t
:alignment .5
))
;; ROW BACKGROUND COLOUR
(renderer4 (make <gtk-cell-renderer-text>
:xalign 1))
(column4 (make <gtk-tree-view-column>
:visible #f
))
;; ROW FOREGROUND COLOUR
(renderer5 (make <gtk-cell-renderer-text>
:xalign 1))
(column5 (make <gtk-tree-view-column>
:visible #f
)))
(pack-tv-column treeview column1 renderer1 0)
(pack-tv-column treeview column2 renderer2 1)
(pack-tv-column treeview column3 renderer3 2)
(pack-tv-column treeview column4 renderer4 3)
(pack-tv-column treeview column5 renderer5 4)
;; background colour
(add-attribute column1 renderer1 "cell-background" 3)
(add-attribute column2 renderer2 "cell-background" 3)
(add-attribute column3 renderer3 "cell-background" 3)
;; foreground colour
(add-attribute column1 renderer1 "foreground" 4)
(add-attribute column2 renderer2 "foreground" 4)
(add-attribute column3 renderer3 "foreground" 4)
(set-search-column treeview 2)
))
(define (ocs/add-model treeview)
(let* ((column-types (list <gchararray>
<gchararray>
<gchararray>
<gchararray>
<gchararray>))
(model (gtk-list-store-new column-types)))
(set-model treeview model)
(values model
(get-selection treeview))
))
(define (setup-treeview treeview)
(add-columns treeview)
(receive (model selection)
(ocs/add-model treeview)
(set-mode selection 'single)
(values model selection)))
(define (populate-model model)
(for-each (lambda (row)
(let ((iter (gtk-list-store-append model)))
(set-value model iter 0 (car row))
(set-value model iter 1 (cadr row))
(set-value model iter 2 (caddr row))))
'(("r1c1" "r1c2" "r1c3")
("r2c1" "r2c2" "r2c3")
("r3c1" "r3c2" "r3c3"))
))
(define (make-simple-popup-menu entries)
(let ((menu (make <gtk-menu>)))
(for-each (lambda (entry)
(if (pair? entry)
(let* ((label (car entry))
(callback (cdr entry))
(menu-item (gtk-menu-item-new-with-label label)))
(connect menu-item
'activate
(lambda (widget)
(callback)))
(gtk-menu-shell-append menu menu-item)
(show menu-item))
(let ((menu-item (gtk-separator-menu-item-new)))
(gtk-menu-shell-append menu menu-item)
(show menu-item))))
entries)
menu))
(define (gtku/status-push status-bar message source)
(let ((context-id (gtk-statusbar-get-context-id status-bar source)))
(gtk-statusbar-push status-bar context-id message)))
(define (gtku/status-pop status-bar source)
(let ((context-id (gtk-statusbar-get-context-id status-bar source)))
(gtk-statusbar-pop status-bar context-id)))
(define (make-popup-menu)
(make-simple-popup-menu `(("popup option 1" . ,(lambda () (display "popup option 1\n")))
("popup option 2" . ,(lambda () (display "popup option 2\n")))
separator
("popup option 3" . ,(lambda () (display "popup option 3\n"))))
))
(define (test-suite-1 treeview model selection popup-menu)
(let ((i 0)
(nb-rows -1)
(bgcolours '("Black" "grey20" "grey40"))
(fgcolours '("white" "wheat" "royalblue")))
(while (< i 1000)
(let* ((sibling (get-iter model 2))
;; (iter (gtk-list-store-append model))
(iter (insert-after model sibling))
)
(set-value model iter 0 (symbol->string (gensym "gs-")))
(set-value model iter 1 (symbol->string (gensym "gs-")))
(set-value model iter 2 (symbol->string (gensym "gs-")))
(set-value model iter 3 (list-ref bgcolours (modulo i 3)))
(set-value model iter 4 (list-ref fgcolours (modulo i 3)))
)
(select-path selection (list (modulo i 100)))
(set! i (1+ i)))
(select-path selection (list 0))
(set! i 0)
(while (< i 500)
(let ((iter (get-iter model (list i))))
(set-value model iter 3 "grey20")
(set-value model iter 4 "Royalnavy1")
(remove model iter))
(set! i (1+ i)))
(set! nb-rows (gtk-tree-model-iter-n-children model #f))
;; (gtk-menu-popup popup-menu #f #f #f 3 0)
(select-path selection (list 2))
(set! i 0)
(while (< i nb-rows)
(gtk-tree-view-scroll-to-cell treeview (list i) #f #t 0.3)
(set! i (1+ i)))
))
(define (test-suite-2 treeview model selection first next)
(let ((nb-rows (gtk-tree-model-iter-n-children model #f))
(i 0))
(emit first 'clicked)
(while (< i nb-rows)
;; (select-path selection (list i))
;; (gtk-tree-view-scroll-to-cell treeview (list i) #f #t 0.3)
;; (usleep 500)
(emit next 'clicked)
(set! i (1+ i)))
))
(define (start-test treeview model selection popup-menu first next)
(let ((i 0))
(gtk-list-store-clear model)
(test-suite-1 treeview model selection popup-menu)
(while (< i 10)
(test-suite-2 treeview model selection first next)
(set! i (1+ i))
)))
(define (animate)
(let* ((window (make <gtk-window>
:type 'toplevel
:title "Get path at pos test"
))
(vbox (make <gtk-vbox>
:homogeneous #f
:spacing 2))
(hbox (make <gtk-hbox>
:homogeneous #f
:spacing 2))
(scrollw (make <gtk-scrolled-window>
:hscrollbar-policy 'never
:vscrollbar-policy 'automatic))
(treeview (make <gtk-tree-view>))
(firstrow (make <gtk-button>
:label "first row")) ;; (gtk-stock-id 'close)
(nextrow (make <gtk-button>
:label "next row")) ;; (gtk-stock-id 'close)
(test-1 (make <gtk-button>
:label "Test suite"))
(test-2 (make <gtk-button>
:label "Start ..."))
(statusbar (make <gtk-statusbar>))
(popup-menu (make-popup-menu)))
(set-default-size window 400 150)
(receive (model selection)
(setup-treeview treeview)
(populate-model model)
(add window vbox)
(add scrollw treeview)
(pack-start vbox scrollw #t #t 0)
(pack-start vbox hbox #f #f 0)
(pack-start hbox firstrow #f #f 0)
(pack-start hbox nextrow #f #f 0)
(pack-start hbox test-1 #f #f 0)
(pack-start hbox test-2 #t #t 0)
(pack-start vbox statusbar #f #f 0)
(connect window
'delete-event
(lambda (widget event)
(destroy widget)
(gtk-main-quit)
#f))
(connect selection
'changed
(lambda (selection)
(receive (model iter)
(get-selected selection)
(if iter
(let* ((path (get-path model iter))
(row (car path)))
;(gtku/status-pop statusbar "")
;(gtku/status-push statusbar (get-value model iter 0) "")
#t
)))
#f))
(connect treeview
'button-press-event
(lambda (w ev)
(case (gdk-event:type ev)
((button-press)
(let* ((button (gdk-event-button:button ev))
(time (gdk-event-button:time ev))
(x-pos (inexact->exact (gdk-event-button:x ev)))
(y-pos (inexact->exact (gdk-event-button:y ev)))
(path-values;; (get-path-at-pos w x-pos y-pos)
(values (list 1) #t 10 10)
))
(case button
((3)
(receive (indices bool x y)
path-values
(let* ((row (car indices))
(iter (get-iter model row)))
(gtk-menu-popup popup-menu
#f ;; parent-menu-shell or #f
#f ;; parent-menu-item or #f
#f ;; user supplied func to position the menu or #f
;; #f - no more user supplied data to pass to func
button
time
)))))))
((2button-press)
(simple-format #t "ignoring 2button-press events...~%"))
((3button-press)
(simple-format #t "ignoring 3button-press events...~%"))
)
#f
))
(connect firstrow
'clicked
(lambda (but)
(select-path selection (list 0))
(gtk-tree-view-scroll-to-cell treeview (list 0) #f #t 0.3)))
(connect nextrow
'clicked
(lambda (but)
(receive (model iter)
(get-selected selection)
(if iter
(let* ((path (get-path model iter))
(row (car path))
(new-path (list (1+ row))))
(select-path selection new-path)
(gtk-tree-view-scroll-to-cell treeview new-path #f #t 0.3))))
))
(connect test-1
'clicked
(lambda (but)
(start-test treeview model selection popup-menu firstrow nextrow)))
(connect test-2
'clicked
(lambda (but)
(let ((i 0))
(while (< i 10)
(emit test-1 'clicked)))))
)
(show-all window)
(gtk-main)))
(animate)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: guile-gnome2 - Segmentation fault
2010-07-06 6:15 ` David Pirotte
@ 2010-07-06 15:37 ` Patrick Bernaud
2010-07-07 2:53 ` David Pirotte
2010-07-08 19:57 ` Andy Wingo
0 siblings, 2 replies; 10+ messages in thread
From: Patrick Bernaud @ 2010-07-06 15:37 UTC (permalink / raw)
To: David Pirotte; +Cc: guile-user
Hi David,
David Pirotte writes:
> [...]
> Does it crashes for you [any guile-gnome user willing to try?] too?
Yes it does for me too.
In versions of gtk >= 2.11, tree iterators (GtkTreeIter) are allocated
through the GSlice memory allocator
(http://library.gnome.org/devel/glib/stable/glib-Memory-Slices.html)
while current guile-gnome is allocating them through the more general
memory-handling g_malloc() and friends.
Freeing one item allocated with g_malloc() (what guile-gnome does)
with GSlice func (what GTK does) has the consequences you
experimented.
GtkTextIter is also concerned by the problem and maybe other types
too.
Until guile-gnome is updated, set the environment variable G_SLICE to
'always-malloc'
(http://library.gnome.org/devel/glib/stable/glib-running.html#G_SLICE)
and it should be ok.
Regards,
Patrick
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: guile-gnome2 - Segmentation fault
2010-07-06 15:37 ` Patrick Bernaud
@ 2010-07-07 2:53 ` David Pirotte
2010-07-08 19:57 ` Andy Wingo
1 sibling, 0 replies; 10+ messages in thread
From: David Pirotte @ 2010-07-07 2:53 UTC (permalink / raw)
To: Patrick Bernaud; +Cc: guile-user
Hi Patrick,
[This is good news Andy !!]
Fantastic, thank you so much for bringing this info to my knowledge, it solves a
problem that i have had for quite a long time: I can't believe it yet! I wish I'd
know about that right from the beginning [it's always like that :-)]
I think it should be added to the doc, with a special well visible note, so
that it will be raised by google for future guile-gnome 'users': I googled a
lot the last few years [but then I am obviously not good @ it :-)] and never
found this link!!
Many thanks again,
Are you also developing with guile-gnome?
Cheers,
David
;; --
Le Tue, 6 Jul 2010 17:37:57 +0200,
Patrick Bernaud <patrickb@chez.com> a écrit :
> Hi David,
> David Pirotte writes:
> > [...]
> > Does it crashes for you [any guile-gnome user willing to try?] too?
> Yes it does for me too.
> In versions of gtk >= 2.11, tree iterators (GtkTreeIter) are allocated
> through the GSlice memory allocator
> (http://library.gnome.org/devel/glib/stable/glib-Memory-Slices.html)
> while current guile-gnome is allocating them through the more general
> memory-handling g_malloc() and friends.
> Freeing one item allocated with g_malloc() (what guile-gnome does)
> with GSlice func (what GTK does) has the consequences you
> experimented.
> GtkTextIter is also concerned by the problem and maybe other types
> too.
> Until guile-gnome is updated, set the environment variable G_SLICE to
> 'always-malloc'
> (http://library.gnome.org/devel/glib/stable/glib-running.html#G_SLICE)
> and it should be ok.
> Regards,
> Patrick
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: guile-gnome2 - Segmentation fault
2010-07-06 15:37 ` Patrick Bernaud
2010-07-07 2:53 ` David Pirotte
@ 2010-07-08 19:57 ` Andy Wingo
1 sibling, 0 replies; 10+ messages in thread
From: Andy Wingo @ 2010-07-08 19:57 UTC (permalink / raw)
To: Patrick Bernaud; +Cc: guile-user, David Pirotte
On Tue 06 Jul 2010 16:37, Patrick Bernaud <patrickb@chez.com> writes:
> Hi David,
>
> David Pirotte writes:
> > [...]
> > Does it crashes for you [any guile-gnome user willing to try?] too?
>
> Yes it does for me too.
>
> In versions of gtk >= 2.11, tree iterators (GtkTreeIter) are allocated
> through the GSlice memory allocator
> (http://library.gnome.org/devel/glib/stable/glib-Memory-Slices.html)
> while current guile-gnome is allocating them through the more general
> memory-handling g_malloc() and friends.
>
> Freeing one item allocated with g_malloc() (what guile-gnome does)
> with GSlice func (what GTK does) has the consequences you
> experimented.
>
> GtkTextIter is also concerned by the problem and maybe other types
> too.
>
> Until guile-gnome is updated, set the environment variable G_SLICE to
> 'always-malloc'
> (http://library.gnome.org/devel/glib/stable/glib-running.html#G_SLICE)
> and it should be ok.
Aaaaaah, I see now. Thank you for the analysis. Will fix soon.
Andy
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-07-08 19:57 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-29 21:33 guile-gnome2 - Segmentation fault David Pirotte
2010-07-01 10:58 ` Andy Wingo
2010-07-02 16:32 ` David Pirotte
2010-07-03 17:25 ` Andy Wingo
2010-07-03 19:24 ` David Pirotte
2010-07-05 0:54 ` David Pirotte
2010-07-06 6:15 ` David Pirotte
2010-07-06 15:37 ` Patrick Bernaud
2010-07-07 2:53 ` David Pirotte
2010-07-08 19:57 ` Andy Wingo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).