Menu

#5234 Segfault when music is empty and only MIDI file is generated

Accepted
nobody
None
Crash
2020-02-10
2017-11-08
No

The following code generates a segfault using 2.19.80 (Ubuntu 16.04, 64-bit):

\version "2.19.80"
\score {
  \new StaffGroup {}
  \midi {}
}
$ lilypond debug.ly
GNU LilyPond 2.19.80
Processing `debug.ly'
Parsing...
Interpreting music...
warning: no music found in score
MIDI output to `debug.midi'...Segmentation fault (core dumped) 
2 Attachments

Discussion

  • Federico Bruni

    Federico Bruni - 2020-02-10
    • summary: Segfault with midi and \new StaffGroup --> Segfault when music is empty and only MIDI file is generated
     
  • Federico Bruni

    Federico Bruni - 2020-02-10

    It's not only with StaffGroup, but also with Staff or Voice.
    If \layout is present, the 'no music' warning is printed but the complation completes without crashing.
    If only \midi is enabled, there's a crash.

    \version "2.19.84"
    
    \score {
      \new Staff {}
      %\new Voice { }
      %\layout {}
      \midi {}
    }
    
     
  • Federico Bruni

    Federico Bruni - 2020-02-10

    Issue [#5246] is related

     

    Related

    Issues: #5246