https://bugs.documentfoundation.org/show_bug.cgi?id=138155
--- Comment #8 from Mike Kaganski <[email protected]> --- (In reply to Mike Kaganski from comment #6) Oh sorry, I need to stop answering after only code-reading, without debugging. I must say that for me, the problem manifests a bit different, not with "BASIC runtime error. Incorrect property value.", but with "BASIC runtime error. '9' Index out of defined range." Then, debugging that, the call stack at the moment of generating *that* error is > sblo.dll!SbxDimArray::Offset(SbxArray * pPar) Line 504 C++ > sblo.dll!SbxDimArray::Get(SbxArray * pPar) Line 532 C++ > sblo.dll!SbiRuntime::CheckArray(SbxVariable * pElem) Line 3965 C++ > sblo.dll!SbiRuntime::FindElement(SbxObject * pObj, unsigned long nOp1, > unsigned long nOp2, ErrCode nNotFound, bool bLocal, bool bStatic) Line 3737 > C++ > sblo.dll!SbiRuntime::StepRTL(unsigned long nOp1, unsigned long nOp2) Line > 4132 C++ > sblo.dll!SbiRuntime::Step() Line 832 C++ > sblo.dll!`anonymous namespace'::RunInitGuard::run() Line 1015 C++ > sblo.dll!SbModule::Run(SbMethod * pMeth) Line 1178 C++ > sblo.dll!SbModule::Notify(SfxBroadcaster & rBC, const SfxHint & rHint) Line > 776 C++ > svllo.dll!SfxBroadcaster::Broadcast(const SfxHint & rHint) Line 41 C++ > sblo.dll!SbMethod::Broadcast(SfxHintId nHintId) Line 2113 C++ > sblo.dll!SbxValue::Get(SbxValues & rRes) Line 289 C++ > basctllo.dll!basctl::RunMethod(const SbMethod * pMethod) Line 281 C++ > basctllo.dll!basctl::ModulWindow::BasicExecute() Line 367 C++ > basctllo.dll!basctl::ModulWindow::BasicRun() Line 387 C++ > basctllo.dll!basctl::ModulWindow::ExecuteCommand(SfxRequest & rReq) Line 908 > C++ > basctllo.dll!basctl::Shell::ExecuteBasic(SfxRequest & rReq) Line 235 C++ > basctllo.dll!SfxStubbasctl_ShellExecuteBasic(SfxShell * pShell, SfxRequest & > rReq) Line 153 C++ > ... and I am really confused with what is the logic of SbiRuntime::CheckArray [1] - it tries to get the element defined by parameter array in the returned array, which looks absolutely crazy to me. pElem points to "CallByName" method, pElemObj (and pDimArray) points to the returned array(1,2,3), and pPar points to the 5-element array of [ptr_to_CallByName_as_retval, ptr_to_Module2, "SomeMethod", 1, array(1,2,3)]. SbxDimArray::Offset takes the passed 5-element array as the array of indices in the dimensions (1 in pDimArray), and indeed, that fails. OTOH, maybe there's something missing like clearing of the parameters before returning from SbRtl_CallByName ... but IIUC, that should not happen there, needs debugging. Actually, I'm a bit lost. ATM, I can't spend much time on this, sorry. [1] https://opengrok.libreoffice.org/xref/core/basic/source/runtime/runtime.cxx?r=7c9d99a5#3952 -- You are receiving this mail because: You are the assignee for the bug.
