Issue 98317 - using FunctionAccess service causes crash
Summary: using FunctionAccess service causes crash
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: DEV300m39
Hardware: Unknown All
: P2 Trivial (vote)
Target Milestone: ---
Assignee: oc
QA Contact: issues@sc
URL:
Keywords:
: 99256 (view as issue list)
Depends on:
Blocks:
 
Reported: 2009-01-21 12:08 UTC by noel.power
Modified: 2013-08-07 15:14 UTC (History)
2 users (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
maybe patch (613 bytes, patch)
2009-01-21 12:09 UTC, noel.power
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description noel.power 2009-01-21 12:08:49 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
Comment 1 noel.power 2009-01-21 12:09:55 UTC
Created attachment 59564 [details]
maybe patch
Comment 2 ocke.janssen 2009-01-21 12:57:54 UTC
Thanks for the patch. Applied in cws dba31h
Comment 3 ocke.janssen 2009-01-26 07:07:16 UTC
Fixed in cws dba31h. Please verify. Thanks.
Comment 4 oc 2009-01-28 15:21:18 UTC
verified in internal build cws_dba31h
Comment 5 niklas.nebel 2009-02-17 08:51:53 UTC
*** Issue 99256 has been marked as a duplicate of this issue. ***
Comment 6 amy2008 2009-04-13 06:21:28 UTC
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