I was also getting occasional seg. faults with 21.1.4. I would add a little more to the code and they would go away. Since I was able to finish that project I didn’t worry about it and it certainly worth the trouble to try too create a MWE. I also use Emacs but I just alt-tab to another shell to compile. (Also alt-tab to look at the results.)
Paul > On Aug 28, 2020, at 2:39 PM, Kevin Barry <[email protected]> wrote: > > Hi David, > > That certainly is strange behaviour. A segmentation fault occurs when > a program tries to access a segment of memory that it isn't allowed > to. It's usually the result of memory bugs in the program. If it's a > bug in emacs, which looks possible, then I am not sure what you will > be able to do. Generally speaking, if a program segfaults then that is > always a bug in that program, but it's often the result of invalid > input, so sometimes you can at least narrow down the behaviour that is > triggering it. You could try starting emacs with the "-q" option so > that it doesn't load your init file. Then try running the shell > command from within emacs to see if it still segfaults (ctrl_C ctrl_L > won't work with no init loaded). If it doesn't that might tell you > something. Also check if you have multiple versions of LilyPond > installed - maybe emacs is running a different one? I'm sorry I can't > be of more help. > > Kevin > > On Fri, 28 Aug 2020 at 20:04, David Sumbler <[email protected]> wrote: >> >> I am running Ubuntu 18.04, Lilypond 2.21.4, emacs 25.2.2 >> >> Ever since I started my current Lilypond project, I have been >> getting occasional segmentation faults when compiling. Until today I >> thought it was something to do with errors or inconsistencies in my >> Lilypond code, and I have been able to make changes which appeared to >> solve the problem. >> >> However, today I discovered something very odd. >> >> I edit my files in emacs, and I compile the main file by using Ctrl_C >> Ctrl_L in emacs, which issues the command 'lilypond <filename>'. Since >> earlier today, whenever I do this, the compile fails with a >> segmentation fault. Sometimes commenting out one or more instruments >> in the score allows the incomplete score to compile, but there seems to >> be no rhyme or reason as to which combinations of instruments allow >> compilation to take place successfully. >> >> As a result, I have spent several hours today trying to work out why >> this crash has started occurring again. >> >> But now I find that if I issue the command 'lilypond <filename>' >> directly from a GNOME terminal, the file compiles faultlessly. Yet >> even if I issue 'lilypond <filename>' as a shell command within emacs >> (rather than using Ctrl_C Ctrl_L) I again get a segmentation fault >> reported. >> >> I have tried rebooting the computer and then running emacs without >> starting any other programs at the same time, but I still get the same >> result. >> >> As I don't really understand what "segmentation fault" actually >> implies, can anybody suggest why this apparently inconsistent behaviour >> might be occurring? >> >> David >> >> >> >
