Jürgen Spitzmüller wrote:
John McCabe-Dansted wrote:
The backtrace is below:

I see. Seems it crashes here:

src/frontends/controllers/frontend_helpers.cpp (239ff):
vector<docstring> const authors = getVectorFromString(author, from_ascii("and "));
        if (authors.empty())
                return author;

        if (authors.size() == 2)
                return bformat(_("%1$s and %2$s"),
                        familyName(authors[0]), familyName(authors[1]));

        if (authors.size() > 2)
                return bformat(_("%1$s et al."), familyName(authors[0]));

        return familyName(authors[0]); // <-- here

I guess It can't crash here unless there's some memory corruption before. Rather, I think it crashes after in familyName() because authors[0] is an empty string:

        // test if we have a LaTeX Space in front
        if (fname[0] == '\\')
                return fname.substr(2);

If I am right this patch should solve the issue. The question is whether an empty author name is acceptable or not?

Abdel.

Index: frontend_helpers.cpp
===================================================================
--- frontend_helpers.cpp        (revision 18982)
+++ frontend_helpers.cpp        (working copy)
@@ -176,6 +176,9 @@
 
 docstring const familyName(docstring const & name)
 {
+       if (name.empty())
+               return docstring();
+
        // Very simple parser
        docstring fname = name;
 

Reply via email to