Menu

#5651 Core dump: /lily/page-breaking.cc, Line 1052

Duplicate
nobody
Defect
2020-02-23
2020-01-04
No

On 27/12/2019 19:19, lilypond@de-wolff.org wrote:

Code below works fine when run under windows in lilypond 2.18.2
However when running in 2.19.83, or in 2.21.0 (version end November) an
assertion is thrown:

File:
/home/jaap/gub/target/mingw/src/lilypond-git.sv.gnu.org--lilypond.git-master
/lily/page-breaking.cc, Line 1052
Expression: my_index == 0

 \version "2.18.2"

\header {
title = "Title"
}

\relative fis' { 
\pageBreak
r1 \break
r4 r4 r2
r2 r4 c4 \break
r1 \pageBreak
r1 
}

Discussion

  • Anonymous

    Anonymous - 2020-01-04

    I reproduced this on my own Linux System (Ubuntu 18.04) using current master.

    I created

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

    I have also attached a back trace of the core that was dumped running the above ly example.

    Then I went through and compiled some earlier 2.19 builds and it seems that, at least up to 2.19.12-1, this file did not core dump and I got a successful PDF compile.

    However I am not able to compile any builds between and including 2.19.13 and 2.19.37, and then 2.19.38-1 produces the same assertion.

     
    • Thomas Morley

      Thomas Morley - 2020-01-04

      Occurs between 2.19.20 and 2.19.21.
      I'll try further bisecting later

       
      • David Kastrup

        David Kastrup - 2020-01-04

        "Thomas Morley" thomas-morley@users.sourceforge.net writes:

        Occurs between 2.19.20 and 2.19.21.

        Red herring.

        commit a4cc910a3401d25bb94ff0ecb4dc18f681c71004
        Author: David Kastrup dak@gnu.org
        Date: Tue May 12 19:01:57 2015 +0200

        Issue 2787: Sanitize usage of -DDEBUG, -DNDEBUG and assert
        
        The compiler option -DNDEBUG is no longer being used: -DNDEBUG disables
        the assert function, and assert is essentially stating that the program
        cannot useful continue if the assertion is not met.  -DNDEBUG is
        basically an option for compiling an application to a limited amount of
        ROM when aborting with a diagnostic is not preferable to crashing.
        
        This is not the case for LilyPond.  So expensive debugging options now
        are enabled with -DDEBUG instead.  There is a new configure option
        --enable-checking defaulting to "off" for this now.
        
        At the current point of time, setting --disable-optimising also has the
        effect of enabling the checks: this will be retained until Patchy has
        been adapted to using --enable-checking.
        

        is 2.19.21 so if you actually want to find out what problem might be
        there, you need to configure using --disable-optimising (for example)
        for versions older than that.

        --
        David Kastrup

         
        • Thomas Morley

          Thomas Morley - 2020-01-04

          I just tried from:

          git checkout release/2.19.20-1
          [...]
          ../configure --disable-optimising
          make

          returning:

          [...]
          In file included from /home/hermann/lilypond-git/lily/include/smobs.hh:329:0,
          from /home/hermann/lilypond-git/lily/include/scm-hash.hh:23,
          from /home/hermann/lilypond-git/lily/scm-hash.cc:20:
          /home/hermann/lilypond-git/lily/include/smobs.tcc: In instantiation of 'static void Smob_base<super>::init() [with Super = Scheme_hash_table]':
          /home/hermann/lilypond-git/lily/include/smobs.tcc:113:10: required from 'Scm_init Smob_base<scheme_hash_table>::scm_init_'
          /home/hermann/lilypond-git/lily/include/smobs.hh:163:35: required from 'static scm_t_bits Smob_base<super>::smob_tag() [with Super = Scheme_hash_table; scm_t_bits = long unsigned int]'
          /home/hermann/lilypond-git/lily/include/smobs.tcc:60:3: required from 'static scm_unused_struct Smob_base<super>::register_ptr(Super</super>) [with Super = Scheme_hash_table; SCM = scm_unused_struct*]'
          /home/hermann/lilypond-git/lily/include/smobs.hh:272:44: required from 'scm_unused_struct Smob<super>::unprotected_smobify_self() [with Super = Scheme_hash_table; SCM = scm_unused_struct*]'
          /home/hermann/lilypond-git/lily/include/smobs.hh:281:44: required from 'void Smob<super>::smobify_self() [with Super = Scheme_hash_table]'
          /home/hermann/lilypond-git/lily/scm-hash.cc:48:17: required from here
          /home/hermann/lilypond-git/lily/include/smobs.tcc:151:37: error: invalid conversion from 'int' to 'const char</super></super>
          ' [-fpermissive]
          SCM subr = scm_c_define_gsubr (Super::type_p_name_, 1, 0, 0,
          ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          (scm_t_subr) smob_p);
          ~~~~~~~~~~~~~~~~~~~~
          In file included from /usr/local/include/libguile.h:52:0,
          from /home/hermann/lilypond-git/lily/include/lily-guile.hh:27,
          from /home/hermann/lilypond-git/lily/include/smobs.hh:23,
          from /home/hermann/lilypond-git/lily/include/scm-hash.hh:23,
          from /home/hermann/lilypond-git/lily/scm-hash.cc:20:
          /usr/local/include/libguile/gsubr.h:47:13: note: initializing argument 1 of 'scm_unused_struct scm_c_define_gsubr(const char, int, int, int, scm_unused_struct ()())'
          SCM_API SCM scm_c_define_gsubr (const char name,
          ^~~~~~~~~~~~~~~~~~
          In file included from /home/hermann/lilypond-git/lily/include/smobs.hh:329:0,
          from /home/hermann/lilypond-git/lily/include/scm-hash.hh:23,
          from /home/hermann/lilypond-git/lily/scm-hash.cc:20:
          /home/hermann/lilypond-git/lily/include/smobs.tcc:155:37: error: invalid initialization of reference of type 'const string& {aka const std::__cxx11::basic_string<char>&}' from expression of type 'const int'
          ly_add_function_documentation (subr, Super::type_p_name_, "(SCM x)",
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          fundoc);
          ~~~~~~~
          In file included from /home/hermann/lilypond-git/lily/include/lily-guile.hh:39:0,
          from /home/hermann/lilypond-git/lily/include/smobs.hh:23,
          from /home/hermann/lilypond-git/lily/include/scm-hash.hh:23,
          from /home/hermann/lilypond-git/lily/scm-hash.cc:20:
          /home/hermann/lilypond-git/lily/include/lily-guile-macros.hh:164:6: note: in passing argument 2 of 'void ly_add_function_documentation(SCM, const string&, const string&, const string&)'
          void ly_add_function_documentation (SCM proc, const string &fname, const string &varlist, const string &doc);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          In file included from /home/hermann/lilypond-git/lily/include/smobs.hh:329:0,
          from /home/hermann/lilypond-git/lily/include/scm-hash.hh:23,
          from /home/hermann/lilypond-git/lily/scm-hash.cc:20:
          /home/hermann/lilypond-git/lily/include/smobs.tcc:157:20: error: invalid conversion from 'int' to 'const char</char>
          ' [-fpermissive]
          scm_c_export (Super::type_p_name_, NULL);
          ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
          In file included from /usr/local/include/libguile.h:65:0,
          from /home/hermann/lilypond-git/lily/include/lily-guile.hh:27,
          from /home/hermann/lilypond-git/lily/include/smobs.hh:23,
          from /home/hermann/lilypond-git/lily/include/scm-hash.hh:23,
          from /home/hermann/lilypond-git/lily/scm-hash.cc:20:
          /usr/local/include/libguile/modules.h:90:14: note: initializing argument 1 of 'void scm_c_export(const char, ...)'
          SCM_API void scm_c_export (const char
          name, ...);
          ^~~~~~~~~~~~
          /home/hermann/lilypond-git/stepmake/stepmake/c++-rules.make:4: recipe for target 'out/scm-hash.o' failed
          make[1]: *** [out/scm-hash.o] Error 1
          make[1]: Leaving directory '/home/hermann/lilypond-git/build/lily'
          /home/hermann/lilypond-git/stepmake/stepmake/generic-targets.make:6: recipe for target 'all' failed
          make: *** [all] Error 2</super></scheme_hash_table></super>

          Is this expected are did I something wrong?

           
          • David Kastrup

            David Kastrup - 2020-01-04

            "Thomas Morley" thomas-morley@users.sourceforge.net writes:

            I just tried from:

            git checkout release/2.19.20-1
            [...]
            ../configure --disable-optimising
            make

            returning:

            [...]
            In file included from /home/hermann/lilypond-git/lily/include/smobs.hh:329:0,
            from /home/hermann/lilypond-git/lily/include/scm-hash.hh:23,
            from /home/hermann/lilypond-git/lily/scm-hash.cc:20:
            /home/hermann/lilypond-git/lily/include/smobs.tcc: In instantiation of 'static void Smob_base<super>::init() [with Super = Scheme_hash_table]':
            /home/hermann/lilypond-git/lily/include/smobs.tcc:113:10: required from 'Scm_init Smob_base<scheme_hash_table>::scm_init_'
            /home/hermann/lilypond-git/lily/include/smobs.hh:163:35: required from 'static scm_t_bits Smob_base<super>::smob_tag() [with Super = Scheme_hash_table; scm_t_bits = long unsigned int]'
            /home/hermann/lilypond-git/lily/include/smobs.tcc:60:3: required from 'static scm_unused_struct Smob_base<super>::register_ptr(Super</super>) [with Super = Scheme_hash_table; SCM = scm_unused_struct*]'
            /home/hermann/lilypond-git/lily/include/smobs.hh:272:44: required from 'scm_unused_struct Smob<super>::unprotected_smobify_self() [with Super = Scheme_hash_table; SCM = scm_unused_struct*]'
            /home/hermann/lilypond-git/lily/include/smobs.hh:281:44: required from 'void Smob<super>::smobify_self() [with Super = Scheme_hash_table]'
            /home/hermann/lilypond-git/lily/scm-hash.cc:48:17: required from here
            /home/hermann/lilypond-git/lily/include/smobs.tcc:151:37: error: invalid conversion from 'int' to 'const char</super></super>
            ' [-fpermissive]
            SCM subr = scm_c_define_gsubr (Super::type_p_name_, 1, 0, 0,
            ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            (scm_t_subr) smob_p);
            ~~~~~~~~~~~~~~~~~~~~
            In file included from /usr/local/include/libguile.h:52:0,
            from /home/hermann/lilypond-git/lily/include/lily-guile.hh:27,
            from /home/hermann/lilypond-git/lily/include/smobs.hh:23,
            from /home/hermann/lilypond-git/lily/include/scm-hash.hh:23,
            from /home/hermann/lilypond-git/lily/scm-hash.cc:20:
            /usr/local/include/libguile/gsubr.h:47:13: note: initializing argument 1 of 'scm_unused_struct scm_c_define_gsubr(const char, int, int, int, scm_unused_struct ()())'
            SCM_API SCM scm_c_define_gsubr (const char name,
            ^~~~~~~~~~~~~~~~~~
            In file included from /home/hermann/lilypond-git/lily/include/smobs.hh:329:0,
            from /home/hermann/lilypond-git/lily/include/scm-hash.hh:23,
            from /home/hermann/lilypond-git/lily/scm-hash.cc:20:
            /home/hermann/lilypond-git/lily/include/smobs.tcc:155:37: error: invalid initialization of reference of type 'const string& {aka const std::__cxx11::basic_string<char>&}' from expression of type 'const int'
            ly_add_function_documentation (subr, Super::type_p_name_, "(SCM x)",
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            fundoc);
            ~~~~~~~
            In file included from /home/hermann/lilypond-git/lily/include/lily-guile.hh:39:0,
            from /home/hermann/lilypond-git/lily/include/smobs.hh:23,
            from /home/hermann/lilypond-git/lily/include/scm-hash.hh:23,
            from /home/hermann/lilypond-git/lily/scm-hash.cc:20:
            /home/hermann/lilypond-git/lily/include/lily-guile-macros.hh:164:6: note: in passing argument 2 of 'void ly_add_function_documentation(SCM, const string&, const string&, const string&)'
            void ly_add_function_documentation (SCM proc, const string &fname, const string &varlist, const string &doc);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            In file included from /home/hermann/lilypond-git/lily/include/smobs.hh:329:0,
            from /home/hermann/lilypond-git/lily/include/scm-hash.hh:23,
            from /home/hermann/lilypond-git/lily/scm-hash.cc:20:
            /home/hermann/lilypond-git/lily/include/smobs.tcc:157:20: error: invalid conversion from 'int' to 'const char</char>
            ' [-fpermissive]
            scm_c_export (Super::type_p_name_, NULL);
            ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
            In file included from /usr/local/include/libguile.h:65:0,
            from /home/hermann/lilypond-git/lily/include/lily-guile.hh:27,
            from /home/hermann/lilypond-git/lily/include/smobs.hh:23,
            from /home/hermann/lilypond-git/lily/include/scm-hash.hh:23,
            from /home/hermann/lilypond-git/lily/scm-hash.cc:20:
            /usr/local/include/libguile/modules.h:90:14: note: initializing argument 1 of 'void scm_c_export(const char, ...)'
            SCM_API void scm_c_export (const char
            name, ...);
            ^~~~~~~~~~~~
            /home/hermann/lilypond-git/stepmake/stepmake/c++-rules.make:4: recipe for target 'out/scm-hash.o' failed
            make[1]: *** [out/scm-hash.o] Error 1
            make[1]: Leaving directory '/home/hermann/lilypond-git/build/lily'
            /home/hermann/lilypond-git/stepmake/stepmake/generic-targets.make:6: recipe for target 'all' failed
            make: *** [all] Error 2</super></scheme_hash_table></super>

            Is this expected are did I something wrong?

            Those lines have been subject to a few changes, partly triggered by
            changes in standard and/or compiler.

            Possibly the following is needed?

            commit 67cd07e55d5ec908c246ae543e480d367b61d6b3
            Author: David Kastrup dak@gnu.org
            Date: Fri Jun 3 14:21:55 2016 +0200

            Issue 4878: Make type_p_name_ always char pointer
            
            This avoids the pitfalls cured by issue 4783 without the
            associated inconvenience when no predicate is desired.
            

            And possibly this before it?

            commit c6758d6d12e33779fc81218693d5650682d8a1ca
            Author: David Kastrup dak@gnu.org
            Date: Thu Mar 3 00:32:33 2016 +0100

            Remove Smob::type_p_name_ default
            
            This was the single most problematic thing across C++ compilers and standards.
            Foregoing it means a hassle, but using it turned out to be worse.
            

            --
            David Kastrup

             
  • Thomas Morley

    Thomas Morley - 2020-02-23
    • status: New --> Duplicate
     
MongoDB Logo MongoDB