On Thursday 12 October 2006 01:53, Han-Wen Nienhuys wrote:
> Marcus Macauley schreef:
> > I just upgraded to 2.9.22 (for Linux), and this bug persists.
> >
> > So here it is again (below) with the proper version number.
>
> http://code.google.com/p/lilypond/issues/detail?id=111
>
> Erik,
>
> I believe this may be related to your changes. Can you have a look at
> this? Thanks,
The attached patch fixes this.
The problem is that context::implementation isn't initialised. They don't need
to be, because quote and friends use non-translator listeners. The patch
inserts checks for implementation_ != 0 everywhere.
In addition I removed recording_group_engraver, I hope that's ok.
--
Erik
Index: lily/context.cc
===================================================================
RCS file: /sources/lilypond/lilypond/lily/context.cc,v
retrieving revision 1.89
diff -u -r1.89 context.cc
--- lily/context.cc 11 Oct 2006 23:56:44 -0000 1.89
+++ lily/context.cc 16 Oct 2006 21:13:54 -0000
@@ -509,7 +509,9 @@
Context::remove_context (SCM)
{
/* ugh, the translator group should listen to RemoveContext events by itself */
- implementation ()->disconnect_from_context ();
+ Translator_group *impl = implementation ();
+ if (impl)
+ impl->disconnect_from_context ();
disconnect_from_parent ();
}
Index: lily/translator-group-ctors.cc
===================================================================
RCS file: /sources/lilypond/lilypond/lily/translator-group-ctors.cc,v
retrieving revision 1.6
diff -u -r1.6 translator-group-ctors.cc
--- lily/translator-group-ctors.cc 6 Jan 2006 09:13:24 -0000 1.6
+++ lily/translator-group-ctors.cc 16 Oct 2006 21:13:55 -0000
@@ -10,7 +10,6 @@
#include "score-performer.hh"
#include "engraver-group.hh"
#include "performer-group.hh"
-#include "recording-group-engraver.hh"
#include "warn.hh"
/*
@@ -27,8 +26,6 @@
return new Score_engraver ();
else if (sym == ly_symbol2scm ("Score_performer"))
return new Score_performer ();
- else if (sym == ly_symbol2scm ("Recording_group_engraver"))
- return new Recording_group_engraver ();
programming_error ("Couldn't find type");
scm_flush (scm_current_error_port ());
Index: lily/translator-group.cc
===================================================================
RCS file: /sources/lilypond/lilypond/lily/translator-group.cc,v
retrieving revision 1.158
diff -u -r1.158 translator-group.cc
--- lily/translator-group.cc 22 Sep 2006 07:51:37 -0000 1.158
+++ lily/translator-group.cc 16 Oct 2006 21:13:55 -0000
@@ -202,7 +202,7 @@
Translator_group *tg
= dynamic_cast<Translator_group *> (c->implementation ());
- if (dir == DOWN)
+ if (tg && dir == DOWN)
{
tg->precomputed_translator_foreach (idx);
tg->call_precomputed_self_method (idx);
@@ -212,7 +212,7 @@
s = scm_cdr (s))
precomputed_recurse_over_translators (unsmob_context (scm_car (s)), idx, dir);
- if (dir == UP)
+ if (tg && dir == UP)
{
tg->precomputed_translator_foreach (idx);
tg->call_precomputed_self_method (idx);
@@ -225,7 +225,7 @@
Translator_group *tg
= dynamic_cast<Translator_group *> (c->implementation ());
- if (dir == DOWN)
+ if (tg && dir == DOWN)
{
(tg->*tg_ptr) ();
translator_each (tg->get_simple_trans_list (), ptr);
@@ -235,7 +235,7 @@
s = scm_cdr (s))
recurse_over_translators (unsmob_context (scm_car (s)), ptr, tg_ptr, dir);
- if (dir == UP)
+ if (tg && dir == UP)
{
translator_each (tg->get_simple_trans_list (),
ptr);
Index: ly/declarations-init.ly
===================================================================
RCS file: /sources/lilypond/lilypond/ly/declarations-init.ly,v
retrieving revision 1.104
diff -u -r1.104 declarations-init.ly
--- ly/declarations-init.ly 24 Aug 2006 14:45:10 -0000 1.104
+++ ly/declarations-init.ly 16 Oct 2006 21:13:56 -0000
@@ -97,16 +97,8 @@
#(set-default-paper-size (ly:get-option 'paper-size))
-
partCombineListener = \layout {
\context {
- \Voice
- \consists Note_heads_engraver
- \consists Rest_engraver
- \type "Recording_group_engraver"
- recordEventSequence = #notice-the-events-for-pc
- }
- \context {
\Score
skipTypesetting = ##t
ignoreBarChecks = ##t
_______________________________________________
bug-lilypond mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-lilypond