Re: ly:page-turn-breaking core dumps

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: ly:page-turn-breaking core dumps

Pierre-Luc Gauthier
Hi there,

Is there anyone on this list who would be willing to help this bug
along? I will gladly pay for this feature to be working again might
any of you be interested. I have 9 full orchestra+chorus projects to
render by… well its already in rehearsal :) and most of them displays
the bug.

tl,dr;
LilyPond core dumps it seems in the ly:page-turn-breaking algorithm.

Following is my post on the lilypond-bug mailing list from this February first.

Le sam. 1 févr. 2020 à 09:46, Pierre-Luc Gauthier
<[hidden email]> a écrit :

> So, this problem comes up once in awhile but, I do not know why, its
> now recurrent on multiple projects now.
> All my orchestral projects compile about 96 PDF all using the
> ly:page-turn-breaking algorithm that I love so very very much. But
> sometimes, it fails with the error bellow. By sometimes I mean, it
> *always* breaks until I do significant music changes that, I suppose,
> changes the page layout until the problem is avoided by chance.
>
> Here is the interesting tail of the output :
>
> Calculating page and line breaks (8 possible page breaks)...lilypond:
> /tmp/packerbuild-1000/lilypond-git/lilypond-git/src/lilypond/lily/page-turn-page-breaking.cc:218:
> void Page_turn_page_breaking::calc_subproblem(vsize): Assertion
> `!std::isinf (best.demerits_) && start < end - 1' failed.
> ./publish.sh: line 11: 63598 Aborted                 (core dumped)
> lilypond -dno-point-and-click -ddelete-intermediate-files
> -dembed-source-code --pdf -o ./upload/ ./parts-book-template.ily
>
> I'm sure there is a way to create a MWE but I've never manage to do
> so. It's sort of a "once in a specific while" kind of problem.
>
> How can I help this bug along?


Le sam. 1 févr. 2020 à 09:54, Thomas Morley <[hidden email]> a écrit :
> This may be related to https://sourceforge.net/p/testlilyissues/issues/4943/


Pierre-Luc Gauthier <[hidden email]> writes:
> g++ --verbose
> returns :
> Target: x86_64-pc-linux-gnu


> Le sam. 1 févr. 2020 à 11:05, David Kastrup <[hidden email]> a écrit :
> > 64bit.  Should not be affected by the bug Harm mentioned.


Le sam. 1 févr. 2020 à 12:59, Pierre-Luc Gauthier
<[hidden email]> a écrit :
> Should I provide anything more helpful to help advance an eventual issue ?


The problem being very hard to reproduce and I have this very quirky
system of compiling parts so, I suppose I will have to provide a whole
project that displays the problem to the person interested in this
issue?

Thanks in advance.
--
Pierre-Luc Gauthier

Reply | Threaded
Open this post in threaded view
|

Re: ly:page-turn-breaking core dumps

David Kastrup
Pierre-Luc Gauthier <[hidden email]> writes:

> Hi there,
>
> Is there anyone on this list who would be willing to help this bug
> along? I will gladly pay for this feature to be working again might
> any of you be interested. I have 9 full orchestra+chorus projects to
> render by… well its already in rehearsal :) and most of them displays
> the bug.
>
> tl,dr;
> LilyPond core dumps it seems in the ly:page-turn-breaking algorithm.

You can always compile using

-DNDEBUG

and thus disable assertions.  And then cross all the fingers you have
that LilyPond does something that is less harmful than aborting.

It's conceivable that this could be turned into a programming error,
namely something that should not occur but does not keep LilyPond from
taking a reasonable course of action.

--
David Kastrup

Reply | Threaded
Open this post in threaded view
|

Re: ly:page-turn-breaking core dumps

Pierre-Luc Gauthier
Hi David,

Thanks for your answer.

Le lun. 24 févr. 2020 à 17:25, David Kastrup <[hidden email]> a écrit :
> -DNDEBUG

Sadly, I'm not a programmer although I compile LilyPond weekly. I
tried adding the -DNDEBUG flag in many places to no avail. I'm using
Arch Linux and compiling using packer pointing to my local lilypond
repository.

-_-'
Where is supposed to go the -DNDEBUG flag…
After the make command?
In the configure file ?
… So elementary yet I haven't been able to compile with that option.

I have learned though that it's a gcc flag. I have not found where gcc
gets called in the build process.
--
Pierre-Luc Gauthier

Reply | Threaded
Open this post in threaded view
|

Re: ly:page-turn-breaking core dumps

Han-Wen Nienhuys-3
In reply to this post by Pierre-Luc Gauthier
On Mon, Feb 24, 2020 at 11:19 PM Pierre-Luc Gauthier
<[hidden email]> wrote:
> Is there anyone on this list who would be willing to help this bug
> along? I will gladly pay for this feature to be working again might
> any of you be interested. I have 9 full orchestra+chorus projects to
> render by… well its already in rehearsal :) and most of them displays
> the bug.
>
> tl,dr;
> LilyPond core dumps it seems in the ly:page-turn-breaking algorithm.

I can have a look. I need one file that reproduces the problem
(doesn't need to be the entire thing). I suspect it's a part rather
than the full score? You can send it by private mail.

As a workaround, you could use a different page breaking strategy, of course.

--
Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen

Reply | Threaded
Open this post in threaded view
|

Re: ly:page-turn-breaking core dumps

David Kastrup
In reply to this post by Pierre-Luc Gauthier
Pierre-Luc Gauthier <[hidden email]> writes:

> Hi David,
>
> Thanks for your answer.
>
> Le lun. 24 févr. 2020 à 17:25, David Kastrup <[hidden email]> a écrit :
>> -DNDEBUG
>
> Sadly, I'm not a programmer although I compile LilyPond weekly. I
> tried adding the -DNDEBUG flag in many places to no avail. I'm using
> Arch Linux and compiling using packer pointing to my local lilypond
> repository.
>
> -_-'
> Where is supposed to go the -DNDEBUG flag…
> After the make command?
> In the configure file ?
> … So elementary yet I haven't been able to compile with that option.
>
> I have learned though that it's a gcc flag. I have not found where gcc
> gets called in the build process.

./configure CXXFLAGS=-DNDEBUG

--
David Kastrup

Reply | Threaded
Open this post in threaded view
|

Re: ly:page-turn-breaking core dumps

Pierre-Luc Gauthier
Le mar. 25 févr. 2020 à 04:54, David Kastrup <[hidden email]> a écrit :
> ./configure CXXFLAGS=-DNDEBUG

Thanks David.
It compiles fine.

Now engraving hangs at the same place but a bit differently :

Calculating page and line breaks (8 possible page
breaks)...[1][2][3][4][5][6][7][8]
Drawing systems...
programming error: did not find a valid page breaking configuration
continuing, cross fingers
./publish.sh: line 11:  8721 Segmentation fault      (core dumped)
lilypond -dno-point-and-click -ddelete-intermediate-files
-dembed-source-code --pdf -o ./upload/ ./parts-book-template.ily


Le mar. 25 févr. 2020 à 03:14, Han-Wen Nienhuys <[hidden email]> a écrit :
> I can have a look.

Great !

> I need one file that reproduces the problem
> (doesn't need to be the entire thing).

Well, my system is more than a file. Anywho, I will provide a working
bug… it sadly wont be minimal though.

> I suspect it's a part rather
> than the full score?

Yes indeed, I do not use the page-turn-breaking for conductor scores :-)

> You can send it by private mail.

I'll prepare and send asap.

> As a workaround, you could use a different page breaking strategy, of course.

Yes, for sure.

--
Pierre-Luc Gauthier

Reply | Threaded
Open this post in threaded view
|

Re: ly:page-turn-breaking core dumps

David Kastrup
Pierre-Luc Gauthier <[hidden email]> writes:

> Le mar. 25 févr. 2020 à 04:54, David Kastrup <[hidden email]> a écrit :
>> ./configure CXXFLAGS=-DNDEBUG
>
> Thanks David.
> It compiles fine.
>
> Now engraving hangs at the same place but a bit differently :
>
> Calculating page and line breaks (8 possible page
> breaks)...[1][2][3][4][5][6][7][8]
> Drawing systems...
> programming error: did not find a valid page breaking configuration
> continuing, cross fingers
> ./publish.sh: line 11:  8721 Segmentation fault      (core dumped)
> lilypond -dno-point-and-click -ddelete-intermediate-files
> -dembed-source-code --pdf -o ./upload/ ./parts-book-template.ily

Well, it was worth a try.  Some failed assertions leave LilyPond in a
state where it can conceivably continue with useful results.  Looks like
this assertion wasn't of that kind.

--
David Kastrup
My replies have a tendency to cause friction.  To help mitigating
damage, feel free to forward problematic posts to me adding a subject
like "timeout 1d" (for a suggested timeout of 1 day) or "offensive".

Reply | Threaded
Open this post in threaded view
|

Re: ly:page-turn-breaking core dumps

Han-Wen Nienhuys-3
In reply to this post by Pierre-Luc Gauthier
On Tue, Feb 25, 2020 at 11:56 PM Pierre-Luc Gauthier
<[hidden email]> wrote:

> Well, my system is more than a file. Anywho, I will provide a working
> bug… it sadly wont be minimal though.

> > You can send it by private mail.
>
> I'll prepare and send asap.

I had a short look, but I'll need more time, which I have on Friday.

The problem happens on the first page of the bass part, where we have
to fit the titles with the music.

Maybe you can experiment with removing some titles?

--
Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen

Reply | Threaded
Open this post in threaded view
|

Re: ly:page-turn-breaking core dumps

Han-Wen Nienhuys-3
On Wed, Feb 26, 2020 at 10:02 AM Han-Wen Nienhuys <[hidden email]> wrote:

>
> On Tue, Feb 25, 2020 at 11:56 PM Pierre-Luc Gauthier
> <[hidden email]> wrote:
>
> > Well, my system is more than a file. Anywho, I will provide a working
> > bug… it sadly wont be minimal though.
>
> > > You can send it by private mail.
> >
> > I'll prepare and send asap.
>
> I had a short look, but I'll need more time, which I have on Friday.
>
> The problem happens on the first page of the bass part, where we have
> to fit the titles with the music.
>
> Maybe you can experiment with removing some titles?

I have reduced to a tiny example.

https://sourceforge.net/p/testlilyissues/issues/5801/

 However, I think there may be something wrong with your score: the
bass plays continuously, so there will never be a pause that is
suitable for turning. With the default, the part fits on 2 pages,
though.


--
Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen

Reply | Threaded
Open this post in threaded view
|

Re: ly:page-turn-breaking core dumps

Han-Wen Nienhuys-3
On Fri, Feb 28, 2020 at 4:17 PM Han-Wen Nienhuys <[hidden email]> wrote:

>
> On Wed, Feb 26, 2020 at 10:02 AM Han-Wen Nienhuys <[hidden email]> wrote:
> >
> > On Tue, Feb 25, 2020 at 11:56 PM Pierre-Luc Gauthier
> > <[hidden email]> wrote:
> >
> > > Well, my system is more than a file. Anywho, I will provide a working
> > > bug… it sadly wont be minimal though.
> >
> > > > You can send it by private mail.
> > >
> > > I'll prepare and send asap.
> >
> > I had a short look, but I'll need more time, which I have on Friday.
> >
> > The problem happens on the first page of the bass part, where we have
> > to fit the titles with the music.
> >
> > Maybe you can experiment with removing some titles?
>
> I have reduced to a tiny example.
>
> https://sourceforge.net/p/testlilyissues/issues/5801/
>
>  However, I think there may be something wrong with your score: the
> bass plays continuously, so there will never be a pause that is
> suitable for turning. With the default, the part fits on 2 pages,
> though.

You can make the crash go away by removing the \bar "||" at the start
of the score

diff --git a/music/structure.ily b/music/structure.ily
index 2b16ca6..cc8decc 100644
--- a/music/structure.ily
+++ b/music/structure.ily
@@ -113,7 +113,6 @@ structure = {
   #(myMarkTextTime (markup "")
      #{\markup {\intro}#})
   %\mark \default
-  \bar "||"
   \showMesureNumber
   s1*5 |



>
>
> --
> Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen



--
Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen

Reply | Threaded
Open this post in threaded view
|

Re: ly:page-turn-breaking core dumps

Pierre-Luc Gauthier
Hello Han-Wen,

> On Fri, Feb 28, 2020 at 4:17 PM Han-Wen Nienhuys <[hidden email]> wrote:
> > I have reduced to a tiny example.

Great ! Very much tinier indeed.

> > On Wed, Feb 26, 2020 at 10:02 AM Han-Wen Nienhuys <[hidden email]> wrote:
> > > The problem happens on the first page of the bass part, where we have
> > > to fit the titles with the music.
> > > Maybe you can experiment with removing some titles?

Well, wouldn't that be brute forcing a workaround that would work on
this song and not in some others that do display the same issue? I
like titles.

Le ven. 28 févr. 2020 à 10:24, Han-Wen Nienhuys <[hidden email]> a écrit :
> You can make the crash go away by removing the \bar "||" at the start
> of the score

Same as above.
I know the problem can be avoided by e.g. writing some more music,
changing the Staff size, or any other random modification. Heck,
removing the "Page_turn_engraver" indeed solves the issue ! I'm
wondering though what the underlying issue could be.

> On Fri, Feb 28, 2020 at 4:17 PM Han-Wen Nienhuys <[hidden email]> wrote:
> >  However, I think there may be something wrong with your score: the
> > bass plays continuously, so there will never be a pause that is
> > suitable for turning. With the default, the part fits on 2 pages,
> > though.

The bass does plays continuously, but that is not a problem on other
songs I have that do use the Page-turn-engraver. Still, a segmentation
fault seems a little hard a punishment.

I will follow #5801.

Thank you for adding (reporting) the issue.
--
Pierre-Luc Gauthier

Reply | Threaded
Open this post in threaded view
|

Re: ly:page-turn-breaking core dumps

Han-Wen Nienhuys-3
On Fri, Feb 28, 2020 at 8:03 PM Pierre-Luc Gauthier
<[hidden email]> wrote:

> > You can make the crash go away by removing the \bar "||" at the start
> > of the score
>
> Same as above.
> I know the problem can be avoided by e.g. writing some more music,
> changing the Staff size, or any other random modification. Heck,
> removing the "Page_turn_engraver" indeed solves the issue ! I'm
> wondering though what the underlying issue could be.

This is not about a random addition.  \bar "||" is normally never at
the start of a piece. The Page_turn_engraver interprets \bar "||"
especially, allowing a page turn. This triggers a problem in the page
breaking code, because the start of the score is treated separately.

--
Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen

Reply | Threaded
Open this post in threaded view
|

Re: ly:page-turn-breaking core dumps

Pierre-Luc Gauthier
Le ven. 28 févr. 2020 à 14:16, Han-Wen Nienhuys <[hidden email]> a écrit :
> \bar "||" is normally never at
> the start of a piece.

-_-'
Oops, I haven't even realized I had a "||" bar on bar 1.
I guess it creeped up there from copy paste or structure changes…

> The Page_turn_engraver interprets \bar "||"
> especially, allowing a page turn. This triggers a problem in the page
> breaking code, because the start of the score is treated separately.

I see. Very interesting !
I did looked around lily/page-turn-page-breaking.cc but did not get a
grip on how it actually works.

--
Pierre-Luc Gauthier

Reply | Threaded
Open this post in threaded view
|

Re: ly:page-turn-breaking core dumps

Han-Wen Nienhuys-3
On Fri, Feb 28, 2020 at 8:46 PM Pierre-Luc Gauthier
<[hidden email]> wrote:
> > The Page_turn_engraver interprets \bar "||"
> > especially, allowing a page turn. This triggers a problem in the page
> > breaking code, because the start of the score is treated separately.
>
> I see. Very interesting !
> I did looked around lily/page-turn-page-breaking.cc but did not get a
> grip on how it actually works.

I looked around for a couple of hours and I also don't understand how
it works :-)


--
Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen

Reply | Threaded
Open this post in threaded view
|

Re: ly:page-turn-breaking core dumps

Pierre-Luc Gauthier
Hi there,

Sorry for necro-following-through so late in the issue.
Thank you Han-Wen, for the very prompt response and resolution.

*Every song* that displayed the issue indeed had a \bar "||" at the
very beginning. I know, I know, but since 99.9% of the time it did not
matter at all I never suspected it had any relation to page breaking
(turning).

Thanks also to David and Thomas for your hints and replies.

Le ven. 28 févr. 2020 à 18:15, Han-Wen Nienhuys <[hidden email]> a écrit :

>
> On Fri, Feb 28, 2020 at 8:46 PM Pierre-Luc Gauthier
> <[hidden email]> wrote:
> > > The Page_turn_engraver interprets \bar "||"
> > > especially, allowing a page turn. This triggers a problem in the page
> > > breaking code, because the start of the score is treated separately.
> >
> > I see. Very interesting !
> > I did looked around lily/page-turn-page-breaking.cc but did not get a
> > grip on how it actually works.
>
> I looked around for a couple of hours and I also don't understand how
> it works :-)
>
>
> --
> Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen



--
Pierre-Luc Gauthier

Reply | Threaded
Open this post in threaded view
|

Re: ly:page-turn-breaking core dumps

Valentin Villenave-3
On 4/17/20, Pierre-Luc Gauthier <[hidden email]> wrote:
> Sorry for necro-following-through so late in the issue.

If I may chime in, since it may appear from your name that you speak
French, do feel free to subscribe to our French-speaking mailing list,
where other contributors can help you investigate such questions (and
where you, in turn, may help answering questions from other
LilyPonders):
https://lists.gnu.org/mailman/listinfo/lilypond-user-fr

Cheers,
V.

Reply | Threaded
Open this post in threaded view
|

Re: ly:page-turn-breaking core dumps

Pierre-Luc Gauthier
Voilà qui est fait Valentin. :-)
C'est juste que -user et -devel sont déjà beaucoup pour ma très humble
capacité de suivi.

Le dim. 19 avr. 2020 à 10:47, Valentin Villenave
<[hidden email]> a écrit :

>
> On 4/17/20, Pierre-Luc Gauthier <[hidden email]> wrote:
> > Sorry for necro-following-through so late in the issue.
>
> If I may chime in, since it may appear from your name that you speak
> French, do feel free to subscribe to our French-speaking mailing list,
> where other contributors can help you investigate such questions (and
> where you, in turn, may help answering questions from other
> LilyPonders):
> https://lists.gnu.org/mailman/listinfo/lilypond-user-fr
>
> Cheers,
> V.



--
Pierre-Luc Gauthier