Description: On pc Debian x86-64 with master sources updated today (4761e11aea650dd93fbc8830ddd7c4976334105e), when using Base Documenter I got this error: Argument is not optional Remark: local build includes the patch d8428094c7f8b186b37c76fd7e9508a075424f80 following tdf#146281 tdf#144353, tdf#146281 - Correctly copy the information about variables During the assignment of a variable, copy its information only if there isn't already one present. Steps to Reproduce: 1. Install BaseDocumenter (see https://extensions.libreoffice.org/en/extensions/show/basedocumenter-to-document-your-base-applications) 2. Open an existing odb file (embedded HSQLDB) containing a table, a form 3. Menu BaseDocumenter/New Repository 4. Menu BaseDocumenter/Document this database Actual Results: Popup error message "Argument is not optional" In BD_Html 230 If psTargetPage = kTableData Then Expected Results: no error Reproducible: Always User Profile Reset: No Additional Info: Version: 7.4.0.0.alpha0+ / LibreOffice Community Build ID: 4761e11aea650dd93fbc8830ddd7c4976334105e CPU threads: 12; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: fr-FR (fr_FR.UTF-8); UI: en-US Calc: threaded
Created attachment 177178 [details] gdb bt
Andreas/Mike: thought you might be interested in this one since it concerns Basic Jean-Pierre: thought you might be interested in this one since it concerns BaseDocumenter
Created attachment 177179 [details] BaseDocumenter Could you attach a sample document? I only get the following output with a one sample table and one sample form.
You need to define the output directory in BaseDocumenter options (it takes *much* time to show up, without any indication to user that it is busy - I first decided that it did nothing, tried again, and then closed LibreOffice, before seeing it crashed in the script because of termination of application in the middle of execution; I did not define any templates there in the options), to see the following error.
(In reply to Mike Kaganski from comment #4) And that is the correct error (it's the bug in Basic code). The psTargetPage is an optional argument of Sub _BD_AddColumn; it is checked for IsEmpty in line 220 prior to the problematic call in line 230; and the logic of the program is strange here: it uses a separate sTargetPage, which is initialized to _BD_Target(lIndex) or to psTargetPage depending on IsMissing(psTargetPage) - why? can't just initialize psTargetPage itself to _BD_Target(lIndex) when it's missing? - but then the work continues in 230 with psTargetPage unconditionally.
(In reply to Mike Kaganski from comment #5) > it is checked for IsEmpty in line 220 Sorry, I meant IsMissing, of course - sorry
Note also how *useful* is the *normal* Basic error here. Unlike in other cases, where the library tries hard to obfuscate everything, attempting to hide it all from user, and obscuring the possible errors - both from user, and from maintainer; making the library *effectively* not open-source (in the sense that to maintain it, one would need to exercise *great effort*, comparable to disassembly, and which would prevent most from contributing/maintaining such a library).
Thank you Mike for your assessment. Now after I could reproduce the error, it is definitely a bug in the implementation of the base documenter. Even looking at the gdb output, it shows the line where the new error arises patched in tdf#144353: #0 SbiRuntime::StepCompare(SbxOperator) (this=0xba63890, eOp=SbxEQ) at basic/source/runtime/runtime.cxx:1351 I will close it as NOTOURBUG.
By the way, _BD_DocumentDatabase and _BD_FilePicker in the extension also have the "missing closing parenthesis" - indicated in IDE after fixing bug 80731.
Thank you Mike and Andreas for your analysis. Sorry Andreas, I don't have a document, I had just launched the extension and yes I had forgotten talking about defining "output directory". As Mike indicated in the comment 4, it's indeed quite long. I knew there was some processing during this time because console displayed a lot of these warn:basic.sbx:3888:3888:basic/source/sbx/sbxvalue.cxx:709: Not at Parent-Prop - otherwise CyclicRef warn:stoc:3888:3888:stoc/source/inspect/introspection.cxx:1614: object of type "com.sun.star.beans.XIntrospectionAccess" lacks XTypeProvider and some: warn:toolkit.helper:3888:3888:toolkit/source/helper/unowrapper.cxx:185: UnoWrapper::SetWindowInterface: there is already a WindowPeer/ComponentInterface for this VCL window
I must confirm that it is not "OUR" bug, but, indeed, "MINE" :) Thanks to all, and, especially, to Mike who debugged the case: the leading "p" in psTargetPage on line 230 of module BD_Html must be removed.