Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abcm2ps crash in set_stems at music.:4400 ... with example input file. Running git clone/pull from today. #119

Open
marshallmidden opened this issue Oct 5, 2024 · 0 comments

Comments

@marshallmidden
Copy link

sigh Provided: macos lldb output of interest. The arguments of abcm2ps. The input file. And how I changed things to fix/get around it. (And something else, which I have forgotten ...)

  • frame #0: 0x00000001004a6148 abcm2ps`output_music [inlined] set_stems at music.c:4400:13 [opt]
  • (SYMBOL *) s2 = NULL

PROGRAM='/Users/m4/Desktop/saved-m4-stuff/src/abcm2ps/abcm2ps'
PROGRAM_ARGS="-M -b 1 ${INPUT} -i -N 2 -j 1"

Input:
%abc
X:1
%%staves [ (1 2) ]
%%combinevoices 1
L:1/4
K:C
V:1
[L:1/4][M:2/4]G/4=e/4=e/4=e/4[L:1/16](4:4:4=e=e=e=e |]
V:2
[L:1/4][M:2/4]z/4B/4B/4B/4[L:1/16](4:4:4BBBB |]

git diff:

@@ -4396,6 +4397,7 @@ static void set_stems(void)
if (s->sflags & S_FEATHERED_BEAM)
nflags = ++s->nflags;
for (s2 = s->next; /s2/; s2 = s2->next) {

  •                           if (s2 == NULL) break;
                              if (s2->abc_type == ABC_T_NOTE) {
                                      if (s->sflags & S_FEATHERED_BEAM)
                                              s2->nflags++;
    

@@ -4404,14 +4406,17 @@ static void set_stems(void)
}
}
/* if (s2) */

  •                   if (s2)
                          if (s2->nflags > nflags)
                              nflags = s2->nflags;
              } else if ((s->sflags & (S_BEAM_ST | S_BEAM_END)) == S_BEAM_END) {
    
  •                   for (s2 = s->prev; /*s2*/; s2 = s2->prev) {
    

+// for (s2 = s->prev; /s2/; s2 = s2->prev) {

  •                   for (s2 = s->prev; s2; s2 = s2->prev) {
                              if (s2->sflags & S_BEAM_ST)
                                      break;
                      }
    

/* if (s2) */

  •                   if (s2)
                          if (s2->nflags > nflags)
                              nflags = s2->nflags;
              }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant