Parsing crashing with `munmap_chunk(): invalid pointer`
When trying to parse the file drummer3/session1/47_rock_120_beat_4-4.mid
from the GMD dataset, drumparse crashes with the following error:
user@hostname:~$ ./qparselib/build/drumparse -midi "groove/drummer3/session1/47_rock_120_beat_4-4.mid" -schema "grammar.wta" -genre "rock" -ts 4/4 -tempo 120 -max -v0
option input: MIDI file import
option midi : groove/drummer3/session1/47_rock_120_beat_4-4.mid
Option schema : grammar.wta
options: setOptionArgs: 20
options: setOptionArgs genre : rock
options: setOptionArgs: 19
options: setOptionArgs ts : 4/4
options: setOptionArgs: 17
options: setOptionArgs tempo : 120
options: setOptionArgs: 32
option help verbosity=0
options: no schema file type
[ info] verbosity level = 0
munmap_chunk(): invalid pointer
Abandon (core dumped)
More complete logs with -v5
user@hostname:~$ ./qparselib/build/drumparse -midi "groove/drummer3/session1/47_rock_120_beat_4-4.mid" -schema "grammar.wta" -genre "rock" -ts 4/4 -tempo 120 -max -v5
option input: MIDI file import
option midi : drummer3/session1/47_rock_120_beat_4-4.mid
Option schema : grammar.wta
options: setOptionArgs: 20
options: setOptionArgs genre : rock
options: setOptionArgs: 19
options: setOptionArgs ts : 4/4
options: setOptionArgs: 17
options: setOptionArgs tempo : 120
options: setOptionArgs: 32
option help verbosity=5
options: no schema file type
[ info] verbosity level = 5
[ info] input file: groove/drummer3/session1/47_rock_120_beat_4-4.mid
[ info] schema file: grammar.wta (??? weight model option)
[debug] parsing::OPT_RUN_DUR = false
[debug] parsing::OPT_RUN_UNIT = true
[debug] parsing::OPT_RUN_STRICT = false
[debug] Weight::CST_ALPHA = 1
[debug] Weight::CST_SIGMA2 = 0.5
[debug] Weight::COEF_OFFSET_DIST_LEFT = 1
[debug] Weight::COEF_OFFSET_DIST_RIGHT = 1
[ info] parser multibar for drum with Key_SIDrum
[ info] compute best tree sequence for grammar.wta and input in groove/drummer3/session1/47_rock_120_beat_4-4.mid
[warning] null voicing in new ScoringEnv
[ info] Debug mode: ON
[ info] Enumeration ordering: best to worst
[ info] Import input from groove/drummer3/session1/47_rock_120_beat_4-4.mid
[ info] read input segment from MIDI file groove/drummer3/session1/47_rock_120_beat_4-4.mid, mode DRUM
[ info] Input Env: read input segment from MIDI file groove/drummer3/session1/47_rock_120_beat_4-4.mid track 0, mode DRUM
[ info] MIDIfile: 1 tracks, hasJoinedTracks=1
[ info] MIDIfile: ticks per Quarter Note=480
[ info] MIDIfile: total time = 1.48438sec = 1425ticks = 2.96875qn
[ info] cast InputSegment into InputSegmentDrum (6 points)
[ info] segment : rbegin=0, rend=1.48438, 6 events (6 in bounds, 0 to 6)
[debug] segment ORIGINAL: rbegin=0, rend=1.48438, 6 events (6 in bounds, 0 to 6)
segment : rbegin = 0sec rend = 1.48438sec 6 events
point[0]: 0.151042 ON key=38 vel=127 link=2 pending rdur=0.171875s
point[1]: 0.251042 OFF key=38 vel=64 pending
point[2]: 0.322917 ON key=38 vel=104 link=4 backlinks=0 rdur=0.158333s
point[3]: 0.422917 OFF key=38 vel=64 pending
point[4]: 0.48125 ON key=38 vel=127 backlinks=2
point[5]: 0.58125 OFF key=38 vel=64 pending
[ info] imported 1 tempo change and 1 TS change from MIDI file groove/drummer3/session1/47_rock_120_beat_4-4.mid
[ info] first tempo in MIDI file=2 (120 bpm) and first TS=4/4
[ info] Input Env: new drum voicing created (genre rock)
[warning] Parsing Env: init fail without WTA
[ info] import schema from grammar.wta, weight domain: Tropical
[ info] found weight type Tropical in grammar.wta
[ info] SWTA import: importing schema from grammar.wta
[ info] SWTA import: 30 transitions succesfully parsed from grammar.wta
[warning] SWTAFileIn: could not read TS in grammar.wta
[ info] SWTAFileIn (after casting and cleaning):
7 states
30 transitions
55 total symbols
[ info] Time Signature from command line option: 4/4
[ info] Parsing Env: set time signature to 4/4
[ info] Time Signature: 4/4
[ info] number of beat per bar=4 (computed from TS)
[ info] 4 beats per bar
[ info] initial bar duration = 2s (1 bars)
[ info] initial tempo = 120bpm (2s per bar)
[ info] 1-best computation
[ info] parsing Drum input segment [0-1.48438].rdur=1.48438
[ info] input segment is set as open
[ info] Drum system: Agostini
[ info] input segment is set as open
[ info] ALPHA = 1
[warning] file : empty prefix
[ info] start parsing
[debug] KeySIDrum: NEW BAR < -1 mtu[0, +∞) rtu[0, 1.48438) 0,_ > first=0 interright=6
[error] Input segment: link not set for Point[4]:0.48125 ON key=38 vel=127 backlinks=2 voice:0, cannot compute rduration
[error] Distance: Jam[2, 3], main point 4 with null duration
[error] Input segment: link not set for Point[4]:0.48125 ON key=38 vel=127 backlinks=2 voice:0, cannot compute rduration
[error] Distance: Jam[1, 4], main point 4 with null duration
[error] Input segment: link not set for Point[4]:0.48125 ON key=38 vel=127 backlinks=2 voice:0, cannot compute rduration
[error] Distance: Jam[1, 5], main point 4 with null duration
[error] Input segment: link not set for Point[4]:0.48125 ON key=38 vel=127 backlinks=2 voice:0, cannot compute rduration
[error] Distance: Jam[1, 4], main point 4 with null duration
[error] Input segment: link not set for Point[4]:0.48125 ON key=38 vel=127 backlinks=2 voice:0, cannot compute rduration
[error] Distance: Jam[1, 5], main point 4 with null duration
[error] Input segment: link not set for Point[4]:0.48125 ON key=38 vel=127 backlinks=2 voice:0, cannot compute rduration
[error] Distance: Jam[1, 4], main point 4 with null duration
[error] Input segment: link not set for Point[4]:0.48125 ON key=38 vel=127 backlinks=2 voice:0, cannot compute rduration
[error] Distance: Jam[1, 5], main point 4 with null duration
[ info] time to parse : 10.773ms
[ info] 1-best tree =
|(1) 2(2(<0>, <1-5>), ⏑)
𝄂 weight = 5.56265=<4.45, 1.11265>
[ info] Build the symbolic score model {}
[ info] Construct a symbolic score Drum (Agostini) model from the 1-best parse tree
[debug] top run of weight 5.56265=<4.45, 1.11265>
[debug] TableImporter: read part drum run=B2 tr=33: B2(0 , -2 ) : 0=<0, 0> : 5.56265=<4.45, 1.11265> filter= B2 (0/2) sunit:0 scont:0 [ ]_0 6pts weight=5.56265=<4.45, 1.11265>
[debug] TableImporter[0]: read measure 0 weight=5.56265=<4.45, 1.11265>
munmap_chunk(): invalid pointer
Abandon (core dumped)