Apache OpenOffice (AOO) Bugzilla – Issue 77971
OOo abnormal end when open the “.pdf â€in unicode
Last modified: 2013-08-07 15:31:14 UTC
1.create a Calc document; 2.input something randomly,just like input "1111â€in one cellï¼› 3.click the button of "Export Directly as PDF" on the toolbar,name the file as test.pdf,and save itï¼› 4.choose "visible Button->Load URL"; 5.input the url of test.pdf in LoadURF blank,then enter,select unicode in the dialogue of "ASCII Filter Options",click okï¼› 6.OOo end without error message same problem also happen in Writer.
Same issue exists in Impress,Drawing and Database. Besides pdf file,same issue happen when open music,movie,exe,rar etc
OpenOffice.org is not meant to be able to open PDF files. To open PDF files you need a PDF viewer like Adobe Reader or Apple's Preview.
But i still think OOo should not end without error message.
Through the "insert->Link to External Data" and select a pdf and Unicode, OOo also collapse.
Hi, I would even say it should not crash at all. No matter, with or without error message. Component should be 'framework', if more that one application is affected. BTW, cannot reproduce it for OOo2.1 using Linux. @bstqc_caozy: Do you use a Chinese version? This is maybe important. Peter
In Calc, "insert->Link to External Data" and select a pdf and Unicode, OOo crash in below cases: 1.OS-Ubuntu 7.04, OOo 2.2 2.OS-Windows XP, OOo 2.1 Chinese version 3.OS-Windows XP, OOo 2.0.4 RC3 Chinese version
.
@ as: Something for you? crashing in this case is nor very graceful.
Created attachment 47811 [details] stacktrace showing the crash
AS: These stack shows the result ... but not the reason. Fact is the following ... VCL font layout crashes caused by a corrupt encoded text (non complete surrogate). So the problem already occures on converting the binary stream into unicode text inside text encoded filter (both - writer and calc). AS->SB: As discussed - please take over this task. Might be converting text to unicode using the method "rtl_convertTextToUnicode()" can be improved.
AS->SB: Please note further ... crash occure by selecting "UNICODE" as encoding ... nit "UTF-8" !
Created attachment 47879 [details] will crash the office
There are two problems with SwASCIIParser::ReadChars in sw/source/filter/ascii/parasc.cxx:1.26 when currentCharSet == RTL_TEXTENCODING_UCS2: 1 When the input file has an odd number of bytes, pEnd will become a misaligned pointer in line 429. This can lead to SIGBUS or the import of excess garbage into the document. 2 When the input contains stray surrogates (i.e., a high surrogate not followed by a low surrogate, or a low surrogate not preceded by a high surrogate), this according to hdu can lead to the reported crash.
@fme: Thinking about it, a good fix might be to drop the special-handling of RTL_TEXTENCODING_UCS2 from SwASCIIParser::ReadChars, which would require as a prerequisite that a working rtl_createTextToUnicodeConverter(RTL_TEXTENCODING_UCS2) were added (which is currently missing, returning NULL). Let me know if I should supply that prerequisite.
Cannot be fixed until code freeze. Set target to 3.x.