Menu

#3259 Patch: Don't report a programming error when trying to align grob with an empty extent

Verified
nobody
Defect
2013-03-31
2013-03-18
Anonymous
No

Originally created by: *anonymous

Originally created by: janek.li...@gmail.com
Originally owned by: janek.li...@gmail.com

report a programming error when trying to align on empty parent

To align grobs, we look at their extents (which are basically
grob dimensions in respective axes) and offset them according
to these extents.  If a grob's extent is empty (undefined),
we cannot calculate the offset required to achieve desired
alignment of this grob, so we report a "programming error:
cannot align on self: empty element".

It is acceptable to align a grob which dimension is 0 (for
example its stencil is just a point), but in that case its
extent should be a zero interval, not an undefined value
(i.e. (0 . 0), not #f).

If we want to align a grob on its parent, the required offset
is calculated based on extents of both the grob and the
parent, so the parent's extent shouldn't be empty as well.
This patch makes LilyPond report a programming error if
parent's extent is empty (until now such situations were just
silently ignored).

http://codereview.appspot.com/7533046

Discussion

  • Google Importer

    Google Importer - 2013-03-18

    Originally posted by: janek.li...@gmail.com

    (No comment was entered for this change.)

    Owner: janek.li...@gmail.com

     
  • Google Importer

    Google Importer - 2013-03-18

    Originally posted by: janek.li...@gmail.com

    (No comment was entered for this change.)

    Labels: -Type-Enhancement Type-Defect GSoC-LyricProject

     
  • Google Importer

    Google Importer - 2013-03-18

    Originally posted by: pkx1...@gmail.com

    Patchy the autobot says: passes make, make test and a full make doc.

    Labels: -Patch-new Patch-review

     
  • Google Importer

    Google Importer - 2013-03-18

    Originally posted by: janek.li...@gmail.com

    report a programming error when trying to align on empty self

    http://codereview.appspot.com/7533046

    Labels: -Patch-review Patch-new

     
  • Google Importer

    Google Importer - 2013-03-18

    Originally posted by: janek.li...@gmail.com

    Manually setting to patch-review.  The change is trivial and passes make, and anyway the purpose of this issue is to discuss the desired LilyPond behaviour - no need to test it again, we rather need to discuss what we want.

    Labels: -Patch-new Patch-review

     
  • Google Importer

    Google Importer - 2013-03-19

    Originally posted by: janek.li...@gmail.com

    Setting to patch-new anyway (following David's advice from issue 3254).

    Labels: -Patch-review Patch-new

     
  • Google Importer

    Google Importer - 2013-03-19

    Originally posted by: janek.li...@gmail.com

    (No comment was entered for this change.)

    Blocking: lilypond:3239

     
  • Google Importer

    Google Importer - 2013-03-19

    Originally posted by: pkx1...@gmail.com

    Passes make, make check and full make doc but get programming errors on one reg test

    --snip--

    input/regression/tablature-full-notation.log    

    @@ -2,10 +2,54 @@
    Renaming input to: `/tmp/lilypond-autobuild/input/regression/tablature-full-notation.ly'
    Interpreting music...[8]
    Preprocessing graphical objects...
    +programming error: cannot align on self: empty element
    +continuing, cross fingers
    +programming error: cannot align on self: empty element
    +continuing, cross fingers
    +programming error: cannot align on self: empty element
    +continuing, cross fingers
    +programming error: cannot align on self: empty element
    +continuing, cross fingers

    etc..

    --snip--

    Labels: -Patch-new Patch-needs_work

     
  • Google Importer

    Google Importer - 2013-03-19

    Originally posted by: janek.li...@gmail.com

    Yes, these are expected.  That's the point of this patch: report problematic situations that were previously unreported.

    Thanks for testing.

    Labels: -Patch-needs_work Patch-review

     
  • Google Importer

    Google Importer - 2013-03-20

    Originally posted by: janek.li...@gmail.com

    I'm moving this manually to countdown, because:
    - it's blocking issue 3239 from moving forward, which in turn blocks my further work in alignment area,
    - the change is small, self-contained, non-destructive and well-explained.

    Labels: -Patch-review Patch-countdown

     
  • Google Importer

    Google Importer - 2013-03-23

    Originally posted by: pkx1...@gmail.com

    Patch counted down - please push (bny make sure that David's comments have been addressed as I am not qualified to say otherwise and there weren't other objections to moving this patch up)

    Labels: -Patch-countdown Patch-push

     
  • Google Importer

    Google Importer - 2013-03-24

    Originally posted by: janek.li...@gmail.com

    Don't report a programming error

    http://codereview.appspot.com/7533046

    Labels: -Patch-push Patch-new

     
  • Google Importer

    Google Importer - 2013-03-24

    Originally posted by: pkx1...@gmail.com

    Patchy the autobot says: passes make, make test and a full make doc.

    Labels: -Patch-new Patch-review

     
  • Google Importer

    Google Importer - 2013-03-24

    Originally posted by: janek.li...@gmail.com

    reword and move comment according to Trevor

    http://codereview.appspot.com/7533046

    Labels: -Patch-review Patch-new

     
  • Google Importer

    Google Importer - 2013-03-24

    Originally posted by: janek.li...@gmail.com

    add a waning when stencil isn't empty.\

    http://codereview.appspot.com/7533046

     
  • Google Importer

    Google Importer - 2013-03-24

    Originally posted by: pkx1...@gmail.com

    Patchy the autobot says: passes make, make test and a full make doc.

    Labels: -Patch-new Patch-review

     
  • Google Importer

    Google Importer - 2013-03-24

    Originally posted by: janek.li...@gmail.com

    (No comment was entered for this change.)

    Summary: Patch: Don't report a programming error when trying to align grob with an empty extent

     
  • Google Importer

    Google Importer - 2013-03-24

    Originally posted by: janek.li...@gmail.com

    I'm moving this manually to countdown, because it's blocking issue 3239 from moving forward, which in turn blocks my further work in alignment area.  The patch was thoroughly discussed and it seems that we're very close to a final decision.

    Labels: -Patch-review Patch-countdown

     
  • Google Importer

    Google Importer - 2013-03-26

    Originally posted by: pkx1...@gmail.com

    Patch counted down - please push

    Labels: -Patch-countdown Patch-push

     
  • Google Importer

    Google Importer - 2013-03-26

    Originally posted by: janek.li...@gmail.com

    pushed as [r1656075e24330067ff1dfa4d8253e5f3e5783014]

    Labels: -Patch-push Fixed_2_17_15
    Status: Fixed

     
  • Google Importer

    Google Importer - 2013-03-31

    Originally posted by: fedel...@gmail.com

    (No comment was entered for this change.)

    Status: Verified

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.