I've tried master~2014-09-30_23.32.31, master_dbg~2014-10-13_05.16.52 and master_dbg~2014-10-14_00.05.30 and they all crash the same with the following errors. soffice.bin: /home/buildslave/source/libo-core/vcl/source/font/PhysicalFontFamily.cxx:297: void PhysicalFontFamily::UpdateCloneFontList(PhysicalFontCollection&, bool, bool) const: Assertion `pClonedFace->GetFamilyName().replaceAll("-", "").trim() == GetFamilyName().replaceAll("-", "").trim()' failed. Application Error
This is a regression as the last build i downloaded in july worked fine. :)
it'll be an issue with a specific pair of fonts, and we'd need to know what those font names are. if you run it under gdb and then print GetFamilyName() and print pClonedFace->GetFamilyName() when it crashes that should hopefully work.
Ran it under gdb and exited to the console, so executing print GetFamilyName() and print pClonedFace->GetFamilyName() simply resulted in "bash: syntax error near unexpected token `('".
Jay: sure - you'd need to run it under gdb with a build with debugging symbols =) do you have such a thing ? I guess Chris & Mike also touched font related goodness recently ...
Created attachment 107834 [details] gdb backtrace Michael: the version i downloaded is a dbg version or do you mean another dbg version that actually runs? Do i need to execute it differently from the commandline than the standard backtrace?
Created attachment 107926 [details] output from fc-list Well i thought it might be one of the custom fonts i installed in ~/.fonts but the problem still persisted, so here is the output from fc-list of the fonts on the system.
Created attachment 107927 [details] output from fc-cache And here is output from 'fc-cache -fv' after i put the fonts in ~/.fonts back.
After a little remotely assisted debugging, we came up with the following: (gdb) x/sh GetFamilyName()->pData->buffer 0xafe9874c: u"FZSongS-Extended" (gdb) x/sh pClonedFace->GetFamilyName()->pData->buffer 0xafe94e58: u"FZSongS-Extended(SIP)"
This is triggered by the fonts from "WPS Office" (-> http://wps-community.org/download.html ) With the wps-office and wps-office-fonts packages installed, I can now reproduce this. -> NEW
It seems my earlier (remote) reconstruction was backwards - it should be GetFamilyName() is "FZSongS-Extended(SIP)" pClonedFace->GetFamilyName() is "FZSongS-Extended"
OUString GetEnglishSearchFontName( const OUString& rInName ) in unotools/source/misc/fontdefs.cxx is unprepared for a font that contains brackets in the name - it's expecting that to have some meaning to do with scripts As a result, in PhysicalFontCollection::Add(...), it looks like we end up getting the PhysicalFontFamily of "FZSongS-Extended(SIP)" and "FZSongS-Extended" mixed up
FZSongS-Extended(SIP) contains characters for the Supplementary Ideographic Plane (SIP) (specifically "CJK Unified Ideographs Extension B U+20000-U+2A6D6") Amusingly, WPS/Kingsoft Writer which supplies the font seems unable to actually make use of it. LibreOffice is capable of using this font in theory, but the assumption that font names do not contain brackets appears to be widespread, and such fonts appear to be rare, so it may be economical just to filter out such those with such names unless and until someone complains, in order to eliminate the crash
Why does GetEnglishFontName care about the script name in brackets? Does anyone understand the semantics around this?
Caolan commented on IRC earlier that "I have a vague memory that Word exports font names to rtf with the language or encoding in the font name, e.g. "Times New Roman (Russian)" and "Times New Roman (Baltic)" or some such"
Matthew, I believe this is a community sponsored package for Kingsoft's office suite... it's not the official font package?
And I can confirm what Caolan says - a small snippet (reformatted to make reading easier) from a Word 2010 RTF document I created: {\fonttbl {\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} {\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} {\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;} {\f36\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;} {\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;} {\f216\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0606020202030204}Arial Narrow;} {\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} {\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} {\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;} {\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} {\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} {\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} {\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;} {\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} {\f346\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} {\f347\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} {\f349\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} {\f350\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} {\f351\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} {\f352\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} {\f353\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} {\f354\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
There is also lcl_stripCharSetFromName in vcl, which knows about the exact script names that MSOffice uses. We should combine that into unotools/source/misc/fontdefs.cxx's GetEnglishSearchFontName which has that looser concept.
honestly, all this GetEnglishSearchFontName foo is super dubious. If there are other problems here we probably should just stop "removing" stuff from the names.
Seco(In reply to Caolán McNamara from comment #18) > honestly, all this GetEnglishSearchFontName foo is super dubious. If there > are other problems here we probably should just stop "removing" stuff from > the names. Can’t agree less.
I meant “Can’t agree more” of course!
So was this fixed in some patch?
I believe so - see http://cgit.freedesktop.org/libreoffice/core/commit/unotools?id=e12ba2eddc827e39444f5efe6107d8afe1f7aaff
Oh, and for good measure, the unit test was updated :-) http://cgit.freedesktop.org/libreoffice/core/commit/unotools?id=e12ba2eddc827e39444f5efe6107d8afe1f7aaff