Apache OpenOffice (AOO) Bugzilla – Issue 85222
Applications abort at startup
Last modified: 2008-01-18 09:59:29 UTC
The applications abort directly at startup. As far as it has been debugged the reason might be related with the locale configured (de_DE.UTF-8). When using en_US.UTF-8 the application can start. The problem seems to be in lib-tools Tested on Ubuntu Depperdrake
Reproducible at least on a Linux box that does not have de locales in /usr/lib/locale: - set the locale to de_DE.UTF-8 when calling soffice - _imp_getProcessLocale at sal/osl/unx/nlsupport.c:1.35 l. 640 determines only a "C" locale - osl_getThreadTextEncoding() therefor returns RTL_TEXTENCODING_DONTKNOW - tools/source/misc/extendapplicationenvironment.cxx:1.1.6.2 l. 81 calls abort() when rtl::OUString::convertToString fails, which it does when osl_getThreadTextEncoding() returns RTL_TEXTENCODING_DONTKNOW @hro: Apart from clarifying if the behavior of _imp_getProcessLocale is correctin the given environment, it would probably be useful to let osl_getThreadTextEncoding return RTL_TEXTENCODING_ASCII_US when the locale is "C".
For a not installed locale RTL_TEXT_ENCODING_ASCII_US is the most meaningful default, I agree.
Got the following patch by hro and applied it as masterfix for OOH680 (m3) and SRC680 (m243): @@ -991,6 +991,15 @@ defaultEncoding = osl_getTextEncodingFromLocale(NULL); OSL_ASSERT(defaultEncoding != RTL_TEXTENCODING_DONTKNOW); + + /* + Tools string functions call abort() on an unknown encoding so ASCII + is a meaningfull fallback regardless wether the assertion makes sense. + */ + + if ( RTL_TEXTENCODING_DONTKNOW == defaultEncoding ) + defaultEncoding = RTL_TEXTENCODING_ASCII_US; + g_thread.m_textencoding.m_default = defaultEncoding; }
Verified fix for OOH680_m3.
verified in SRC680_m243 as well. Marking issue as verified.
closing verified issue