Fatal bug in strftime?

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

Fatal bug in strftime?

ptoye
Fatal bug in strftime? When I try to use the %e format to get rid of leading zeros in the date, lilypond crashes out.

\header {
  title = "title"
  composer = "no-one"
  tagline = \markup {
    Engraved
    \simple #(strftime "%e/%m/%Y" (localtime (current-time)))
    with \with-url #"http://lilypond.org/"
    \line { LilyPond \simple #(lilypond-version) (http://lilypond.org/) }
  }
}

The log files says

Starting lilypond-windows.exe 2.16.2 [Bridge.ly]...
Processing `c:/users/peter_2/appdata/local/temp/frescobaldi-owqqgx/tmpadmcng/Bridge.ly'
Parsing...FATAL: memory error in realloc
Exited with return code 3.
 
Regards,

Peter
[hidden email]
www.ptoye.com
_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Fatal bug in strftime?

Federico Bruni

2013/5/11 Peter Toye <[hidden email]>
When I try to use the %e format to get rid of leading zeros in the date, lilypond crashes out.

\header {
  title = "title"
  composer = "no-one"
  tagline = \markup {
    Engraved
    \simple #(strftime "%e/%m/%Y" (localtime (current-time)))
    with \with-url #"http://lilypond.org/"
    \line { LilyPond \simple #(lilypond-version) (http://lilypond.org/) }
  }
}

I cannot reproduce the crash on linux.
Some Windows user should check

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Fatal bug in strftime?

anders@andis59.se
On 2013-05-11 11:27, Federico Bruni wrote:

>
> 2013/5/11 Peter Toye <[hidden email] <mailto:[hidden email]>>
>
>     When I try to use the %e format to get rid of leading zeros in the
>     date, lilypond crashes out.
>
>     \header {
>        title = "title"
>        composer = "no-one"
>        tagline = \markup {
>          Engraved
>          \simple #(strftime "%e/%m/%Y" (localtime (current-time)))
>          with \with-url #"http://lilypond.org/"
>          \line { LilyPond \simple #(lilypond-version)
>     (http://lilypond.org/) }
>        }
>     }
>
>
> I cannot reproduce the crash on linux.
> Some Windows user should check
>

I can confirm that on Windows 7 32-bit and Lilypond 2.17.13 it crashes!

FATAL: memory error in realloc
C:/lilypond/usr/share/lilypond/current/scm/lily.scm
Exited with return code 3.

// Anders
--
English isn't my first language.
So any error or strangeness is due to the translation.
Please correct my English so that I may become better.

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Fatal bug in strftime?

Eluze
In reply to this post by Federico Bruni
Federico Bruni-5 wrote
2013/5/11 Peter Toye <[hidden email]>

> When I try to use the %e format to get rid of leading zeros in the date,
> lilypond crashes out.
using a short example it does (crash) on windows 7 64 in all versions since 2.12.3!

Eluze
Reply | Threaded
Open this post in threaded view
|

Re: Fatal bug in strftime?

David Kastrup
In reply to this post by anders@andis59.se
"[hidden email]" <[hidden email]> writes:

> On 2013-05-11 11:27, Federico Bruni wrote:
>>
>> 2013/5/11 Peter Toye <[hidden email] <mailto:[hidden email]>>
>>
>>     When I try to use the %e format to get rid of leading zeros in the
>>     date, lilypond crashes out.
>>
>>     \header {
>>        title = "title"
>>        composer = "no-one"
>>        tagline = \markup {
>>          Engraved
>>          \simple #(strftime "%e/%m/%Y" (localtime (current-time)))
>>          with \with-url #"http://lilypond.org/"
>>          \line { LilyPond \simple #(lilypond-version)
>>     (http://lilypond.org/) }
>>        }
>>     }
>>
>>
>> I cannot reproduce the crash on linux.
>> Some Windows user should check
>>
>
> I can confirm that on Windows 7 32-bit and Lilypond 2.17.13 it crashes!
>
> FATAL: memory error in realloc
> C:/lilypond/usr/share/lilypond/current/scm/lily.scm
> Exited with return code 3.

Well, strftime is not defined by LilyPond.  If anybody is interested in
getting that bug approached, one should test it in GUILE-1.8.8 (from its
command prompt, most likely) and GUILE-2.0.9.

I have my doubts the GUILE team can be interested in releasing anything
past GUILE-1.8.8, but if the bug can be shown to be present in 2.0.9,
chances are that a proper report will result in a fixed version by the
time LilyPond migrates to GUILE-2.0.

--
David Kastrup


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Fatal bug in strftime?

Andrew Bernard
In reply to this post by ptoye
FWIW, the strftime procedure with this format works fine under Arch Linux, and lilypond 2.17.14. Also, typing the scheme expression directly in the REPL for guile 1.8.8, it works just fine. So, since the Windows users on the list can confirm it, and the Linux users cannot, it may be worth noting this when submitting a defect to the guile project.

Andrew


On 11/05/13 6:58 PM, Peter Toye wrote:
Fatal bug in strftime? When I try to use the %e format to get rid of leading zeros in the date, lilypond crashes out.




_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Fatal bug in strftime?

ptoye
In reply to this post by ptoye
David,

I'm sorry, but this doesn't help much. I know nothing about GUILE
and have no contact with them.

I agree that this may not be a Lilypond bug, and that you
have better things to do than debug someone else's code
(don't we all?) - but how does one flag this sort of thing
up.

Best regards,

Peter
mailto:[hidden email]
www.ptoye.com

-------------------------
> Message: 5
> Date: Sat, 11 May 2013 13:18:55 +0200
> From: David Kastrup <[hidden email]>
> To: [hidden email]
> Subject: Re: Fatal bug in strftime?
> Message-ID: <[hidden email]>
> Content-Type: text/plain

> "[hidden email]" <[hidden email]> writes:

>> On 2013-05-11 11:27, Federico Bruni wrote:
>>>
>>> 2013/5/11 Peter Toye <[hidden email] <mailto:[hidden email]>>
>>>
>>>     When I try to use the %e format to get rid of leading zeros in the
>>>     date, lilypond crashes out.
>>>
>>>     \header {
>>>        title = "title"
>>>        composer = "no-one"
>>>        tagline = \markup {
>>>          Engraved
>>>          \simple #(strftime "%e/%m/%Y" (localtime (current-time)))
>>>          with \with-url #"http://lilypond.org/"
>>>          \line { LilyPond \simple #(lilypond-version)
>>>     (http://lilypond.org/) }
>>>        }
>>>     }
>>>
>>>
>>> I cannot reproduce the crash on linux.
>>> Some Windows user should check
>>>
>>
>> I can confirm that on Windows 7 32-bit and Lilypond 2.17.13 it crashes!
>>
>> FATAL: memory error in realloc
>> C:/lilypond/usr/share/lilypond/current/scm/lily.scm
>> Exited with return code 3.

> Well, strftime is not defined by LilyPond.  If anybody is interested in
> getting that bug approached, one should test it in GUILE-1.8.8 (from its
> command prompt, most likely) and GUILE-2.0.9.

> I have my doubts the GUILE team can be interested in releasing anything
> past GUILE-1.8.8, but if the bug can be shown to be present in 2.0.9,
> chances are that a proper report will result in a fixed version by the
> time LilyPond migrates to GUILE-2.0.

> --
> David Kastrup




> ------------------------------

> Message: 6
> Date: Sat, 11 May 2013 13:20:38 +0200
> From: David Kastrup <[hidden email]>
> To: [hidden email]
> Subject: Re: many users don't know about \shape
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=utf-8

> Janek Warcho? <[hidden email]> writes:

>> Sure, we're working on it with Urs (progressing slowly).  It'd be nice
>> for LilyPond Report, but frankly i think we should rather create a
>> multi-author blog - it would be easier to keep it active.

> A "multi-author blog" sounds pretty much the same as a journal except
> that it won't accept non-member contributions.


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Fatal bug in strftime?

Phil Holmes
----- Original Message -----
From: "Peter Toye" <[hidden email]>
To: <[hidden email]>
Cc: <[hidden email]>
Sent: Sunday, May 12, 2013 2:38 PM
Subject: Re: Fatal bug in strftime?


> David,
>
> I'm sorry, but this doesn't help much. I know nothing about GUILE
> and have no contact with them.
>
> I agree that this may not be a Lilypond bug, and that you
> have better things to do than debug someone else's code
> (don't we all?) - but how does one flag this sort of thing
> up.
>
> Best regards,
>
> Peter

The first step would be to report it as a bug:

http://lilypond.org/website/bug-reports.html

--
Phil Holmes

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Fatal bug in strftime?

ptoye
Re: Fatal bug in strftime? Phil,

I've done this now.

Thanks for the link - I'm new to Lilypond and didn't know the bug reporting protocol.

Best regards,

Peter
[hidden email]
www.ptoye.com

-------------------------
Sunday, May 12, 2013, 4:22:55 PM, you wrote:

> ----- Original Message ----- 
> From: "Peter Toye" <
[hidden email]>
> To: <
[hidden email]>
> Cc: <
[hidden email]>
> Sent: Sunday, May 12, 2013 2:38 PM
> Subject: Re: Fatal bug in strftime?


> The first step would be to report it as a bug:

> http://lilypond.org/website/bug-reports.html

> --
> Phil Holmes
_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Fatal bug in strftime?

David Nalesnik
Hi Peter,

> When I try to use the %e format to get rid of leading zeros in the date, lilypond crashes out.

As a workaround, you could just use %d and check for a leading zero, replacing it with a space.  Something like this:

\header {
  title = "title"
  composer = "no-one"
  tagline = \markup {
    Engraved
    \simple #(let ((date (strftime "%d/%m/%Y" (localtime (current-time)))))
                (if (string-prefix? "0" date)
                    (string-append " " (string-drop date 1))
                    date))
    with \with-url #"http://lilypond.org/"
    \line { LilyPond \simple #(lilypond-version) (http://lilypond.org/) }
  }
}

{ c d e f }


Modifications would have to be made if you want the day in other than the leading position.

Anyway, hope this helps.

-David

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Fatal bug in strftime?

ptoye
Re: Fatal bug in strftime? David,

Thanks. Hardly worth the effort! I think I'll just try to ignore my allergy to leading zeroes in dates. Or not do any engraving 1-9 of the month.

I'm no LISP expert, apart from knowing that it stands for Lots of Irritating Surplus Parentheses.

Best regards,

Peter
[hidden email]
www.ptoye.com

-------------------------
Monday, May 13, 2013, 2:39:51 PM, you wrote:


Hi Peter,

> When I try to use the %e format to get rid of leading zeros in the date, lilypond crashes out.

As a workaround, you could just use %d and check for a leading zero, replacing it with a space.  Something like this:

\header {
  title = "title"
  composer = "no-one"
  tagline = \markup {
    Engraved
    \simple #(let ((date (strftime "%d/%m/%Y" (localtime (current-time)))))
                (if (string-prefix? "0" date)
                    (string-append " " (string-drop date 1))
                    date))
    with \with-url #"
http://lilypond.org/"
    \line { LilyPond \simple #(lilypond-version) (
http://lilypond.org/) }
  }
}

{ c d e f }


Modifications would have to be made if you want the day in other than the leading position.

Anyway, hope this helps.

-David

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Fatal bug in strftime?

David Nalesnik
Peter,


On Wed, May 22, 2013 at 11:07 AM, Peter Toye <[hidden email]> wrote:
David,

Thanks. Hardly worth the effort! I think I'll just try to ignore my allergy to leading zeroes in dates. Or not do any engraving 1-9 of the month.

But the work is done--all you need to do is copy and paste what I've given you.  If you're working with a template, add it to that.

-David

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Fatal bug in strftime?

ptoye
Re: Fatal bug in strftime? David,

Not quite sure what you mean about a template. I use Frescobaldi for input at the moment, and that doesn't seem to have a way of changing the standard header format, so I have to delete it and include my personal favourite (which can be in a \include file). 

Or do you mean a Lilypond template? I can't find any reference to such a thing in the documentation, apart from an informal use of the word to refer to a snippet which sets up a stave system. As opposed to a (e.g. MS word) template file which contains layout and preference features.

Best regards,

Peter
[hidden email]
www.ptoye.com

-------------------------
Wednesday, May 22, 2013, 5:17:32 PM, you wrote:


Peter,


On Wed, May 22, 2013 at 11:07 AM, Peter Toye <
[hidden email]> wrote:
David,

Thanks. Hardly worth the effort! I think I'll just try to ignore my allergy to leading zeroes in dates. Or not do any engraving 1-9 of the month.

But the work is done--all you need to do is copy and paste what I've given you.  If you're working with a template, add it to that.

-David

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Fatal bug in strftime?

David Nalesnik

Peter,

On Mon, May 27, 2013 at 5:23 AM, Peter Toye <[hidden email]> wrote:
David,

Not quite sure what you mean about a template. I use Frescobaldi for input at the moment, and that doesn't seem to have a way of changing the standard header format, so I have to delete it and include my personal favourite (which can be in a \include file). 

Or do you mean a Lilypond template? I can't find any reference to such a thing in the documentation, apart from an informal use of the word to refer to a snippet which sets up a stave system. As opposed to a (e.g. MS word) template file which contains layout and preference features.


I was using "template" in the sense of a model for a file (or part of a file) that you save somewhere and reuse--nothing formal..

--David



_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Fatal bug in strftime?

ptoye
Re: Fatal bug in strftime? David,

Thanks. I sort of thought so, but being a newbie to Lilypond & Frescobaldi I might have missed something.

Is there any way in Frescobaldi of changing the default header? The documentation's a bit sparse.

Best regards,

Peter
[hidden email]
www.ptoye.com

-------------------------
Monday, May 27, 2013, 1:39:36 PM, you wrote:




Peter,

On Mon, May 27, 2013 at 5:23 AM, Peter Toye <
[hidden email]> wrote:
David,

Not quite sure what you mean about a template. I use Frescobaldi for input at the moment, and that doesn't seem to have a way of changing the standard header format, so I have to delete it and include my personal favourite (which can be in a \include file). 

Or do you mean a Lilypond template? I can't find any reference to such a thing in the documentation, apart from an informal use of the word to refer to a snippet which sets up a stave system. As opposed to a (e.g. MS word) template file which contains layout and preference features.


I was using "template" in the sense of a model for a file (or part of a file) that you save somewhere and reuse--nothing formal..

--David

_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: Fatal bug in strftime?

David Nalesnik
Peter,


On Mon, May 27, 2013 at 10:15 AM, Peter Toye <[hidden email]> wrote:
David,

Thanks. I sort of thought so, but being a newbie to Lilypond & Frescobaldi I might have missed something.

Is there any way in Frescobaldi of changing the default header? The documentation's a bit sparse.


I imagine there is, but I will defer to someone else on this question as I use JEdit/LilyPondTool almost exclusively.

--David 


_______________________________________________
lilypond-user mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-user