lewdlime / abcm2ps

abcm2ps is a command line program which converts ABC to music sheet in PostScript or SVG format. It is an extension of abc2ps which may handle many voices per staff. abcm2ps is Copyright © 2014-2016 Jean-Francois Moine.
http://moinejf.free.fr/
GNU General Public License v3.0
84 stars 31 forks source link

Segmentation fault, if clef change in polyharmoniqe music is between slurs #35

Closed MaxPerl closed 6 years ago

MaxPerl commented 6 years ago

Hello, First of all, thank you very very much for this wonderful piece of software. I get a segmentation fault error, if the clef change is between slurs. See the following example of the beginning of a Brahms song:

X: 1
T: Wie bist Du, meine Königin
M: 3/8
L: 1/8
V:1
V:2 merge
V:3
K: Db
V:1
(dcB)| (gfe) | (agf) | (=abc) |
V:2
x3 | BA>c | !<(!e/A/c>d!<)! | !>(!c>BA/G/!>)! |
V:1
d2z | d'c'b | b>ae/f/ | g>fc/d/ |
V:2
F2x | d3    | x3        | x3        |
V:1
(efg | a2 =g) | [Aea]2 z | (f2 g) |
V:2
!<(!c2 c | (edB) !<)! | x3 | !<(!_c2 B |
V:1
(a2 f | g2 d) | =c2 z | d'2 a |
V:2
A3  !<)! | G2 G  | G2 z | [df]3 |
V:1
f2 z | (d'af)    | (gfe)          | (dcB) | (gfe) |
V:2
d2 z | [df]2 d | [Gc]2 [Gc] |F2 z     | BA>c
%
%
V:3 bass
[L: 1/16] z (D,,A,,D,F,A,) | z (E,,A,,C,G,A,) | z (G,,D,G,[A,,E,]A,) |
V:3
(D,,A,,D,F,A,D | [K: treble] F) (F,CDFA | c4) B2 & (EGEGDG) | A4 G2 & (CECEB,E) |

If I change the last line as follows, everything works fine: (D,,A,,D,F,A,D | F) [K: treble] (F,CDFA | c4) B2 & (EGEGDG) | A4 G2 & (CECEB,E) |

Thanks in advance, Max

moinejf commented 6 years ago

Hi Max, Thanks for the report. The bug should be fixed by the commit e052415. BTW, V:2 merge is not standard. You should use %%score.

MaxPerl commented 6 years ago

Dear Jean-François Moine, Thank you very much for your rapid help. I cloned this repository, and now everything works just fine now. (I tested it before with the last version from http://abcplus.sourceforge.net/, where the most recent commits obviously are not included at the moment...) Your work is really impressive, Again thank you very much! Best wishes, Max