lilypond-devel
[Top][All Lists]
Advanced

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

ARGH! Segmentation fault


From: jmp115
Subject: ARGH! Segmentation fault
Date: 26 Apr 2005 14:44:35 +0100

Hi,

I'm currently trying to write a new feature to automatically decide how to engrave choral scores. Basically it takes a list of parts and generates staves with various combinations of those parts (e.g. a Soprano and Alto staff, as well as separate Soprano and Alto staves). It then steps through each part and works out, at each moment, which combination gives the most readable output (c.f. make-part-combine-music generation of split-list).

A Choral_group_iterator (based on Part_combine_iterator) creates these staves in a ChoirStaff context and sends ChoralGroupCostEvent events to a Choral_group_engraver. This creates a dummy Item (a ChoralGroupCost) which is acked by a Choral_group_spanner_engraver (based on Hara_kiri_group_engraver).

The Choral_group_spanner_engraver works like Hara_kiri_group_engraver and creates a ChoralVerticalGroup spanner which kills itself if the costs it receives convince it to.

Everything up to and including the iterator works fine. When I test the rest, make fails. It makes the lilypond bin OK, but fails when doing lilypond generate-documention.

A GDB backtrace on a test run gives:

----------------------- Program received signal SIGSEGV, Segmentation fault. 0x4021357d in scm_mark_subr_table () from /usr/lib/libguile.so.12 (gdb) bt #0 0x4021357d in scm_mark_subr_table () from /usr/lib/libguile.so.12 #1 0x401ebd86 in scm_igc () from /usr/lib/libguile.so.12 #2 0x401ecd6b in scm_gc_sweep () from /usr/lib/libguile.so.12 #3 0x401eceba in scm_must_realloc () from /usr/lib/libguile.so.12 #4 0x4021333e in scm_c_make_subr () from /usr/lib/libguile.so.12 #5 0x401f7fa3 in scm_init_goops () from /usr/lib/libguile.so.12 #6 0x401f8215 in scm_c_define_gsubr () from /usr/lib/libguile.so.12 #7 0x08199c7e in Volta_bracket_interface_print_init_functions() () at volta-bracket.cc:32 #8 0x080cf7ce in ly_init_ly_module(void*) () at lily-guile.cc:196 #9 0x401e9ccc in scm_c_with_fluids () from /usr/lib/libguile.so.12 #10 0x401e9d99 in scm_c_with_fluid () from /usr/lib/libguile.so.12 #11 0x40201587 in scm_c_call_with_current_module () from /usr/lib/libguile.so.12 #12 0x40201701 in scm_c_define_module () from /usr/lib/libguile.so.12 #13 0x080cf876 in ly_c_init_guile() () at lily-guile.cc:216 #14 0x080e5a58 in main_with_guile () at main.cc:356 #15 0x401fbfbf in scm_init_guile () from /usr/lib/libguile.so.12 #16 0x401fbf7e in scm_init_guile () from /usr/lib/libguile.so.12 #17 0x401fbc50 in scm_boot_guile () from /usr/lib/libguile.so.12 #18 0x080e6904 in main (argc=2, argv=0xbffff7f4) at main.cc:529 #19 0x403d2d06 in __libc_start_main () from /lib/libc.so.6 ----------------------------------------------

If I comment out the MAKE_SCHEME_CALLBACK lines in my choral-group-spanner.cc then I don't get this error (though make still fails as scheme cannot find my callbacks!). The error also disappears if I keep these lines in choral-group-spanner.cc but remove them from hara-kiri-group-spanner.cc.

Is there a limit to the number of scm_init_funcs_ (when it exceeds around 500 it seems to fail)? Is there some other problem (see also the attached files)?

Mark

Attachment: choral-group-spanner.cc
Description: choral-group-spanner.cc

Attachment: axis-group-engraver.cc
Description: axis-group-engraver.cc


reply via email to

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