Comment #20 on issue 818 by n.puttock: Bus error when adding
Instrument_name_engraver to StaffGroup and outputting MIDI.
http://code.google.com/p/lilypond/issues/detail?id=818
OK, a few more notes:
Translators of the wrong type (i.e., performers for an Engraver_group,
engravers for a Performer_group) must be filtered out if they're added to a
context via \with. This happens in
Translator_group::create_child_translator () here:
204 if (dynamic_cast<Engraver_group *> (g))
205 g->simple_trans_list_ = filter_performers (trans_list);
206 else if (dynamic_cast<Performer_group *> (g))
207 g->simple_trans_list_ = filter_engravers (trans_list);
Both filter_engravers () and filter_performers () use dynamic_cast to check
whether a translator in `trans_list' is of the type which should be
removed. In the case of the optimized builds which segfault, the casting
fails.
Simply adding debug output to display the filtered list of translators at
the end of filter_engravers () causes the dynamic_cast to work.
Why would optimizing cause RTTI failure?
_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-lilypond