moinejf/abc2svg

crash file named 'note durations'

Closed this issue · 1 comments

bwl21 commented

after updating to 1.15.0-15-g 2844008 I have a crash with the following abc. it was not there with 1.15.0-9-g eee5e5e

F:1006_Note-Durations
X:1006
T:Note Durations
C:Bernhard Weichel
R:{rhythm}
M:4/4
L:1/1
Q:1/4=120
K:C
%%score T1 T2  T3
V:T1 clef=treble-8 name="Rythm" snm="S"
V:T2 clef=treble-8  name="Alt" snm="A" 
V:T3 clef=treble-8  name="Rests" snm="A" 
[V:T1] c | [L:1/16]  c16 | (cccc) (cccc) (cccc) (cccc) | (cccc) (cccc) (cccc) (cccc) | (cccc) (cccc) (cccc) (cccc) | (cccc) (cccc) (cccc)  
P:Tuplets
[V:T1] c | [L:1/4] cc2c4 c4-c4c
[V:T2]  [I:transpose -5] d | [L:1/1]d1  | d3/4 z/4 | d/2 d3/8 d1/4 d3/16 d/8 d/16 d3/2 
| (3d/8d/8d/8 (3d/4d/4d/4 (3 d/2 d/2 d/2 (3ddd d1/4
[V:T3] e [L:1/1] | z1  | z3/4 z/2 z3/8 z1/4 z3/16 z/8 z/16  z/32 z/64  (3z/8z/8z/8 (3 z/4z/4z/4 (3:3:2 z/2 z/2 z/2 (3zzz z1/4
%

it reports

Cannot read property 'type' of undefined
*** Abort ***
TypeError: Cannot read property 'type' of undefined
    at draw_tuplet (/private/tmp/toto.js:4537:19)
    at draw_sym_near (/private/tmp/toto.js:5322:5)
    at output_music (/private/tmp/toto.js:12047:4)
    at generate (/private/tmp/toto.js:18175:2)
    at end_tune (/private/tmp/toto.js:7135:3)
    at Abc.tosvg (/private/tmp/toto.js:7189:5)
    at do_file (/private/tmp/toto.js:20416:7)
    at abc_cmd (/private/tmp/toto.js:20446:3)
    at Object. (/private/tmp/toto.js:20649:2)
    at Module._compile (module.js:570:32)

Another version

F:1006_Note Durations
X:1006
T:Note Durations
C:Bernhard Weichel
R:{rhythm}
M:4/4
L:1/1
Q:1/4=120
K:C
%%%%hn.print {"t":"alle Stimmen",         "v":[1,2,3,4], "s": [[1,2],[3,4]], "f":[1,3], "j":[1]}
% %%%hn.print {"t":"sopran, alt", "v":[1,2],     "s":[[1,2]],       "f":[1],   "j":[1]}
%%%%hn.print {"t":"tenor, bass", "v":[3, 4],     "s":[[1, 2], [3,4]],       "f":[3  ],   "j":[1, 3]}
%%score T1 T2  T3
V:T1 clef=treble-8 name="Rythm" snm="S"
V:T2 clef=treble-8  name="Alt" snm="A" 
V:T3 clef=treble-8  name="Rests" snm="A" 
[V:T1] [L:1/16]  c16 | (cccc) (cccc) (cccc) (cccc) | (cccc) (cccc) (cccc) (cccc) | (cccc) (cccc) (cccc) (cccc) | (cccc) (cccc) (cccc) (z3/4) 
P:Tuplets
[V:T1] [L:1/4] cc2c4 c4-c4c
[V:T2] [I:transpose -5] [L:1/1]d1  | d3/4 d/2 d3/8 d1/4 d3/16 d/8 d/16 d/32 d/64 d3/2 
| (3d/8d/8d/8 (3d/4d/4d/4 (3 d/2 d/2 d/2 (3ddd d1/4
[V:T3] [L:1/1]z1  | z3/4 z/2 z3/8 z1/4 z3/16 z/8 z/16 z/32 z/64 z3/2 
| (3z/8z/8z/8 (3z/4z/4z/4 (3 z/2 z/2 z/2 (3zzz z1/4
%
Cannot read property 'type' of null
*** Abort ***
TypeError: Cannot read property 'type' of null
    at draw_tuplet (/private/tmp/toto.js:4537:19)
    at draw_sym_near (/private/tmp/toto.js:5322:5)
    at output_music (/private/tmp/toto.js:12047:4)
    at generate (/private/tmp/toto.js:18175:2)
    at end_tune (/private/tmp/toto.js:7135:3)
    at Abc.tosvg (/private/tmp/toto.js:7189:5)
    at do_file (/private/tmp/toto.js:20416:7)
    at abc_cmd (/private/tmp/toto.js:20446:3)
    at Object. (/private/tmp/toto.js:20649:2)
    at Module._compile (module.js:570:32)
``´
bwl21 commented

Works fine with 216d084 . Thanks.