Apache OpenOffice (AOO) Bugzilla – Issue 98317
using FunctionAccess service causes crash
Last modified: 2013-08-07 15:14:39 UTC
First this happen in m39 and NOT m38 ( I couldn't find the version in the list above ) how to reproduce invoke any function using the FunctionAccess service e.g. like with the following basic code Sub Main func = createunoservice("com.sun.star.sheet.FunctionAccess") dim args(1) args(0) = 1 func.callFunction( "ABS", args ) End Sub result - core dump stack trace (gdb) where #0 0xb0056e93 in formula::FormulaCompiler::OpCodeMap::putExternalSoftly (this=0x0, rSymbol=@0xbfeab590, rAddIn=@0x8e36558) at /data4/CWS/my_working_copy/formula/source/core/api/FormulaCompiler.cxx:279 #1 0xafc5644c in ScCompiler::fillFromAddInCollectionEnglishName (this=0xbfeab76c, xMap=@0xbfeab600) at /data4/CWS/my_working_copy/sc/source/core/tool/compiler.cxx:265 #2 0xb005840d in formula::FormulaCompiler::loadSymbols (this=0xbfeab76c, _nSymbols=31002, _eGrammar=formula::FormulaGrammar::GRAM_ENGLISH, _xMap=@0xb006ef50) at /data4/CWS/my_working_copy/formula/source/core/api/FormulaCompiler.cxx:701 #3 0xb00586ca in formula::FormulaCompiler::InitSymbolsEnglish (this=0xbfeab76c) at /data4/CWS/my_working_copy/formula/source/core/api/FormulaCompiler.cxx:667 #4 0xb0058ae9 in formula::FormulaCompiler::GetOpCodeMap (this=0xbfeab76c, nLanguage=2) at /data4/CWS/my_working_copy/formula/source/core/api/FormulaCompiler.cxx:566 #5 0xb0058b8d in formula::FormulaCompiler::GetEnglishOpCode (this=0xbfeab76c, rName=@0xbfeab6f8) at /data4/CWS/my_working_copy/formula/source/core/api/FormulaCompiler.cxx:719 #6 0xafad2cc2 in lcl_AddFunctionToken () at /data4/CWS/my_working_copy/solver/300/unxlngi6.pro/inc/com/sun/star/uno/Any.h:128 #7 0xafad3dbb in ScFunctionAccess::callFunction () at /data4/CWS/my_working_copy/solver/300/unxlngi6.pro/inc/com/sun/star/uno/Any.h:128 mxSymbolsEnglish is used before it is initialised ( in the routine that sets the variable it is initialised from ) I think the intention is illustrated by the attached patch
Created attachment 59564 [details] maybe patch
Thanks for the patch. Applied in cws dba31h
Fixed in cws dba31h. Please verify. Thanks.
verified in internal build cws_dba31h
*** Issue 99256 has been marked as a duplicate of this issue. ***
npower, I have checked Issue 99256, it works well. for this bug, I have noticed it doesn't crash once more, but I think your macro script must be some errors, pls pay attention to it. Verified in OOo310m9 on WinXP and Fedora9 Closing Li Meiying