Created attachment 164709 [details] Error448.odt with Basic code When running Main() in next Basic code, containing a cascade of calls with uninitialized optional arguments, the behaviour is different between LO 6.4.5 and LO 7.0.0 Sub Main Dim a a = 1 SubA(a) End Sub Sub SubA(a, Optional x, Optional y) SubB(a, x, y) End Sub Sub SubB(a, Optional x, Optional y) If IsMissing(x) Then x = 2 MsgBox x End Sub In 6.4, the execution ends with the message box containing "2", as expected. In 7.0 however, the execution aborts on the statement "x = 2" with the error message "Inadmissible value or data type. Data type mismatch." The reason, AFAIK, seems to be that variable x in SubB is of type - Variant/Error in LO6.4 - Error in LO 7.0 the latter preventing a reset of x to another value. To reproduce the issue: ---------------------- - open the attached Error448.odt file - open the Basic IDE - in the Basic module of the file "Module1", run Main() Result in 7.0: ------------- Error "Inadmissible value or data type. Data type mismatch." Expected result: --------------- No error message PS: current bug is the root cause of https://bugs.documentfoundation.org/show_bug.cgi?id=136063
Confirmed in: Version: 7.1.0.0.alpha0+ (x64) Build ID: 8b55854e51d085c17a1d6c85bbd626812c6b25b5 CPU threads: 6; OS: Windows 10.0 Build 17134; UI render: Skia/Vulkan; VCL: win Locale: de-DE (de_DE); UI: en-US Calc: CL
Andreas Heinisch committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/781b6ac998370f2923c0783100da7086bfad622d tdf#136143 - reset SbxFlagBits::Fixed SbiRuntime::StepPARAM It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Thank you, Andreas. Please, could the patch be applied on 7.0 as well ?
(In reply to Jean-Pierre Ledure from comment #3) Please don't change the automatically added tags, that have their meaning (in this case, it indicates that there's a patch that fixes that in 7.1.0). When the change will be backported and merged to 7.0, it will get the appropriate mark there as well, automatically.
Andreas Heinisch committed a patch related to this issue. It has been pushed to "libreoffice-7-0": https://git.libreoffice.org/core/commit/cfbc7fd2991874b164cc6398a4f8dc681eabe63f tdf#136143 - reset SbxFlagBits::Fixed SbiRuntime::StepPARAM It will be available in 7.0.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I confirm that the fix solved the issue in 7.1. Changed the status to VERIFIED. Thanks, Andreas !
(In reply to Mike Kaganski from comment #4) > (In reply to Jean-Pierre Ledure from comment #3) > > Please don't change the automatically added tags, that have their meaning > (in this case, it indicates that there's a patch that fixes that in 7.1.0). > > When the change will be backported and merged to 7.0, it will get the > appropriate mark there as well, automatically. Ooops. I didn't know that the field was managed automatically. Sorry for the disturbance.
*** Bug 136063 has been marked as a duplicate of this bug. ***
*** Bug 137150 has been marked as a duplicate of this bug. ***