lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error: can't allocate region - layout block?


From: Thomas Morley
Subject: Re: error: can't allocate region - layout block?
Date: Sun, 24 Apr 2016 12:52:41 +0200

2016-04-22 17:20 GMT+02:00 Carl Sorensen <address@hidden>:
> On 4/22/16 7:11 AM, "address@hidden" <address@hidden> wrote:
>
>>Hi all,
>>
>>I¹m again plagued by a memory error:
>>
>>lilypond(27883,0xa2db5000) malloc: *** mach_vm_map(size=106917888) failed
>>(error code=3)
>>*** error: can't allocate region
>>*** set a breakpoint in malloc_error_break to debug
>
> I can confirm this problem on OSX 10.8.5.
>
> I don't know how to solve it, but I have noticed that there is a
> programming error that occurs earlier in the output, probably due to some
> removed empty staves.  If this were my file, I would try to track down
> that programming error.  I think it may be related.
>
> Fitting music on 79 or 80 pages...
> Drawing systems...
> programming error: could not find this grob's vertical axis group in the
> vertical alignment
> continuing, cross fingers
> programming error: could not find this grob's vertical axis group in the
> vertical alignment
> continuing, cross fingers
>
>
> Note that this error mentions a missing vertical axis group, which is a
> container that holds staves.  Perhaps some grob is trying to be generated
> that is tied to a staff that has been removed.
>
> I have also noticed that the maximum memory used by LilyPond at the time
> the malloc error was thrown was about 2.45 GB.
>
> And I have confirmed that if I leave the layout block in, but comment out
> the RemoveAllEmptyStaves, there is no malloc error.  So the problem is
> clearly with removing the staves.  I believe that if you can track down
> the source of the programming error it will fix your malloc problem.
>
> But I don't have the time to go through your enormous score and track down
> the source of the programming error.  There are some suggestions in the
> documentation:
>
> http://lilypond.org/doc/v2.19/Documentation/usage/troubleshooting
>
>
> Good luck!
>
> Carl



@Carl
The problem occured in a previous version of matteos's code as well.
I boiled it down already, see my bug-report at
http://lilypond.1069038.n5.nabble.com/error-and-bad-output-with-VoltaBrackets-ossia-staffs-RemoveEmptyStaves-repeats-td189504.html

Not triage up to now, though.
And I've no clue how to circumvent it other than changing the whole
structure of matteo's coding.

@matteo
Your code is a nightmare to maintain and for tracking down problems.
I'd do:
(1) split it into parts. You repeatedly set currentBarNumber to 1.
Wouldn't there a new part be resonable?
(2) your Staffs don't compile on it's own, without loads of errors and
warnings, because information like the used time-signature, etc is not
everywhere implemented and available.
I'd use a global-variable for that.
(3) I've the suspicion the memory problem is still caused by the
numerous ossia staffs.
Not always creating new ones, but sending stuff only to the same
ossia-staves brought you some steps further.
But you use always the syntax like in my bug-report (simultaneous-music).
Maybe, but I can't warrant, it would be better to fill those ossias
directly not from the main-staves.
Though, even while using \start/stopStaff some problems needs to be
solved, among them instrumentNames, KeySignatures, Clefs,
TimeSignatures, TupletBrackets displayed where you don't want them.

See the output of the changed bug-reports-coding:

\paper { indent = 20 short-indent = 20 }

\layout {
  \context {
    \Score
    \override VerticalAxisGroup #'remove-first = ##t
  }
  \context {
    \Staff
    \RemoveEmptyStaves
  }
}


mI = {
  c1
  \break
  \repeat volta 2 { d }
  \alternative { { e } { eis } }
  \repeat volta 2 { f }
}

mII = {
  c1 d e eis f
}

ossiaI = {
  \stopStaff
  s1*4
  \startStaff
  fis
  \stopStaff
}

ossiaII = {
  \stopStaff
  s1*4
  \startStaff
  gis
  \stopStaff
}


<<
  \new Staff = "up-ossia"
    \with { instrumentName = "up-ossia " shortInstrumentName = "up-ossia " }
    \ossiaI
  \new Staff
    \with { instrumentName = "up " shortInstrumentName = "up" }
    \mI
  \new Staff
    \with { instrumentName = "down" shortInstrumentName = "down" }
    \mII
  \new Staff = "down-ossia"
    \with { instrumentName = "down-ossia " shortInstrumentName = "down-ossia" }
    \ossiaII
>>

Cheers,
  Harm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]