This constructor passes an un-initialised pos to insertStringAsLines. I 
presume it should be initialised to 0?

This causes an assert failure down in Pragraph::pimpl::insertChar().

// This constructor is used for reading old InsetInfo
InsetNote::InsetNote(Buffer const * buf, string const & contents,
             bool collapsed)
    : InsetCollapsable(collapsed)
{
    init();

    Paragraph * par = inset.paragraph();
    LyXFont font(LyXFont::ALL_INHERIT, buf->params.language);

    // Since XForms doesn't support RTL, we can assume that old notes
    // in RTL documents are written in English.
    if (font.language()->RightToLeft())
        font.setLanguage(default_language);

    lyx::pos_type pos;
    buf->insertStringAsLines(par, pos, font, strip(contents, '\n'));
}


Reply via email to