Rune Zedeler <rz <at> daimi.au.dk> writes: > at top of your program, then StaffGroups may contain StaffGroups - and > hence you can do arbitrary nesting of StaffGroups. But it is a very > dangerous thing to do - because it contains a cycle. For instance, the > following score > > \score { \new Voice { c1 } } > > segfauls. The problem is that lilypond needs to "figure out" that it > must insert a staff between the score and the voice. And in order to do > so, it looks through the hierarchy of contexts - and it gets stuck in > the cycle. > But if you explicitly write > > \score { \new Staff \new Voice { c1 } } > > Then you don't run into the problem.
A while ago there was some discussion that we might not want to have lilypond supply default contexts, because it hides the operation of the system. It was decided that the convenience of having lilypond put in the missing contexts was worth the hidden structure. Perhaps there could be a \strict or \explicit mode that would not supply default contexts. If you used the first example in \explicit mode, you'd get an error message that said "no Staff context for Voice", and it would force you to use the second example, thereby avoiding the segfault. Carl _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel