For Base there is a extension Base Documenter available. The extension works well with LO 6.4.7.2 and fails with all LO 7.x-versions I installed here (LO 7.0.5.2 and LO 7.1.4.2 on OpenSUSE 15.2 64bit rpm Linux). It will crash LO immediately when trying to open any form to read the content of the form.
On pc Debian x86-64 with master sources updated today, it fails to create a BaseDocumenter repository because of the error "Object variable not set" there: Dim iTables As Integer, bReinit As Boolean, iMaster As Integer InitRepository = False If IsNull(Repository) Then GoTo Exit_Function With Repository 'Identify if repo should be (re)initialized bReinit = False iTables = .TableDefs().Count If iTables = 0 Then bReinit = True ElseIf iTables = 2 Then 'Do nothing if the database is not a repository !! If .TableDefs(0).Name <> "DATABASES" Or .TableDefs(1).Name <> "OBJECTS" Then Set Repository = Nothing Else Set Repository = Nothing End If 'Check if a master database record exists If Not bReinit Then iMaster = .DCount("ID", "DATABASES", "ID=0") <<<<<<< THERE So can't test the crash.
(In reply to Julien Nabet from comment #1) Have had the same error sometimes ago. Didn't know what has solved the problem. Did you register the database BaseDocumenter.odb?
I gave a new try. This time I installed Access2Base since it seems used by Base Documenter. Then I tried to initialize repository following http://www.access2base.com/basedocumenter/basedocumenter.html. 1) with use of creating automatically new repository, I must recognize I don't understand why it would need to disable macros but I tested both, still no response with security at high or low. 2) I created manually a database (HSQLDB) and registered it. Then I tried "Open the repository" in BaseDocumenter menu => The repository could not be opened or initialized. Some error/warn/info message during repo generation + info about why disabling macro during repo generation would be useful.
Jean-Pierre: since the extension Base Documenter requires Access2Base, thought you might be interested here.
(In reply to Julien Nabet from comment #3) > I gave a new try. > This time I installed Access2Base since it seems used by Base Documenter. Yes, without Access2Base it won't work. Then you have to create a folder. You have to unzip http://www.access2base.com/basedocumenter/_download/Templates.zip in this folder. This should be all. BaseDocumenter could be seen in the menue of Base. You have to create a new "Sammel-DB" (don't know it in English). This should be created better from a database, which doesn't contain macros. The database you will document could be documented with enabled macros. Works here with LO 6, but not with LO 7.*
I removed the registered BaseDocumenter + extension BaseDocumenter and started over. I installed again BaseDocumenter (this time "only for me" instead of "For all users"). I created a new dir: /home/julien/Documents/testBaseDocumenter I downloaded Templates.zip and unzip it there => so I got jquery, BD_Template.html, etc. in this dir. Then I launched LO and tried again the menu "new Repository", it still failed with the same error. Just for the record, at another moment (I don't remember exactly when), I had another popup message: Public Function _BD_ScriptPython(ByVal psFunction As String) As Object ' Return the script to invoke to call the given Python function ' https://wiki.openoffice.org/wiki/Documentation/DevGuide/Scripting/Scripting_Framework_URI_Specification 'Manual storage of python script 'Set _BD_ScriptPython = _BD_.ScriptProvider.getScript("vnd.sun.star.script:BaseDocumenter/BD_json.py$" & psFunction & "?language=Python&location=user") On Local Error GoTo Install_ForAllUsers 'Storage from extension => Install "only for me" Set _BD_ScriptPython = _BD_.ScriptProvider.getScript( _ "vnd.sun.star.script:BaseDocumenter.oxt|python|BD_json.py$" & psFunction & "?language=Python&location=user:uno_packages") ================ Error here Exit_Function: Exit Function Install_ForAllUsers: 'Storage from extension => Install "for all users" On Local Error GoTo Error_NoPython Set _BD_ScriptPython = _BD_.ScriptProvider.getScript( _ "vnd.sun.star.script:BaseDocumenter.oxt|python|BD_json.py$" & psFunction & "?language=Python&location=share:uno_packages") GoTo Exit_Function Error_NoPython: _BD_ForceExecutionStop(_BD_GetLabel("ERR" & ERRINTERNAL)) End Function ' _BD_ScriptPython (I copied it by hand since I couldn't copy paste the error message).
I haven't tested to create the database with LO 7.*. I had installed it with LO 6.2 or something else and only used it with LO 7.* The database will only be an empty database, which is registered as "BaseDocumenter" in LO. I had described the steps I made (only in German) here: https://www.familiegrosskopf.de/robert/index.php?&Inhalt=base_documenter
Ok certainly someone may reproduce this.
With Version: 7.1.2.2 / LibreOffice Community Build ID: 8a45595d069ef5570103caea1b71cc9d82b2aae4 CPU threads: 8; OS: Mac OS X 10.16; UI render: default; VCL: osx Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR Calc: threaded As per the documentation, I opened an existing database without any embedded macros, then I go to the BaseDocumenter menu, and choose Create New Repository (Nouveau Référentiel in French). The dialog asks me to select a location for the new empty database. I chose a folder named BaseDocumenter that is writable. However, the macro fails to complete correctly with a Basic execution error : Erreur d'exécution BASIC. Une exception s'est produite : Type: com.sun.star.script.provider.ScriptFrameworkErrorException Message: <class 'KeyError'>: 'BaseDocumenter.oxt' File "/Applications/LibreOffice.app/Contents/Resources/pythonscript.py", line 1046, in getScript storageUri = self.provCtx.getStorageUrlFromPersistentUrl( File "/Applications/LibreOffice.app/Contents/Resources/pythonscript.py", line 417, in getStorageUrlFromPersistentUrl package = self.mapPackageName2Path[ packageName ] I see that the very same error is already reported on the Extensions web page for the BaseDocumenter extension (5 months ago). I don't have a 6.4.x version anymore to test with to see if the extension setup works there.
Hi all, I could not reproduce the crash described by Robert but could reproduce the behaviour described by Alex. The cause of the latter incident is that the file downloaded from the extensions web site is called basedocumenter.oxt while it should be BaseDocumenter.oxt I had never uploaded a file with a name in lower case, but the extensions site has been revamped/redesigned in the mean time. The wrong name has as unexpected side-effect that the installation creates somewhere a subdirectory .../uno_packages/lu...tmp/basedocumenter.oxt i.o. .../BaseDocumenter.oxt. This prevents the software to find a Python piece of code and causes the error. Most extensions do not care about the name of that directory and, additionally, the error probably does not happen in Windows that ignores lower/upper case in file names. Anyway I discovered the file name change only today ... May I suggest to Robert to re-test after having: - uninstalled the extension - downloaded the extension - renamed the received file with correctly cased characters - reinstalled the extension ? Thanks to all for the tests done.
Created attachment 173249 [details] Try to document this database with BaseDocumenter I have tested it now with a simple database without any macros and a database, which contains macros. The attached database couldn't be documented here with LO 7.0.5 and newer database. No difference if I allow to execute macros or don't allow. The simple database could documented with the newer versions of LO. If I start BaseDocumenter in LO 7.0.0 or 7.0.1 I get "Error #13 (Datentypen unverträglich) aufgetreten in Zeile 486 in Tabledef._PropertyGet". BaseDocumenter won't start in this versions. With LO 7.0.2 it started but crashes during documentation.
[Automated Action] NeedInfo-To-Unconfirmed
(In reply to Jean-Pierre Ledure from comment #10) > May I suggest to Robert to re-test after having: > - uninstalled the extension > - downloaded the extension > - renamed the received file with correctly cased characters > - reinstalled the extension > ? 1) I removed the package using the GUI Extension Manager, then restarted LO. 2) Although the UI indicated that the extension wasn't present, a verification check with unopkg from the command line showed that it was still installed. 3) To force removal, I used unopkg remove BaseDocumenter from the command line. Restarted LO. 4) Then I renamed the OXT file to BaseDocumenter.oxt instead of the original all lower case characters name. 5) Next, I tried re-installing the extension via the GUI Extensions Manager. The installation hung, forcing me to force quit LO. 6) Restarted LO to find that the extension showed up in the Extension Manager, but didn't contain any menu entries when a Base file was loaded. 7) Removed the extension again via unopkg, and reinstalled via unopkg. Restarted LO. Now, the extension was finally reinstalled and I could see the corresponding menu entry. 8) Opened an ODB file. Created a new BaseDocumenter.odb file. 9) With the previously opened ODB file open on the desktop, chose Document this database from the BaseDocumenter menu - no crash for me. From my testing on macOS with 7.1.2.2, this is WFM.
I should add that the initial test of the extension was only on the available Tables object, I still need to try a database containing Forms.
Testing with an ODB file containing forms seems to work too, cf. attached screenshot.
Created attachment 173263 [details] Screenshot of BaseDocumenter extension in action
(In reply to Alex Thurgood from comment #15) > Testing with an ODB file containing forms seems to work too, cf. attached > screenshot. Could you please test it with the attached database? With the simple example-database of the Base handbook ("Example_Sports.odb") ist will work here. But with the attached database it will fail every time with any LO 7.*-version.
Crash is confirmed in version Version: 7.1.3.2 / LibreOffice Community Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1 CPU threads: 6; OS: Linux 5.4; UI render: default; VCL: kf5 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded with the provided database. It limit the scope of the crash more precisely: it happens when removing all forms and reports, and all queries except "Rechnung_Bericht". The run Basic routine is parsing and beautifying the SQL statement stored in that single query (when deselecting "Beautify SQL ?" i the settings, the crash does not happen). I have no idea so far what is specific to that query to cause the crash. I will try to identify the statement that causes it. "Try" because not obvious. In the mean time I change the status to "NEW".
When I replace in above-mentioned query "Rechnung_Bericht" the identifier "Straße" with "Strasse", the crash does not happen. The root cause however (Unicode in LO, Unicode in Basic, Unicode in HSQLDB ?) remains unknown.
(In reply to Jean-Pierre Ledure from comment #19) > When I replace in above-mentioned query "Rechnung_Bericht" the identifier > "Straße" > with > "Strasse", > the crash does not happen. Field "Straße" is part of table "Kunde". I tried to create a view from the query and deleted the query but the crash will appear also. Don't know what is running better here with LO 6.* instead of LO 7.*
I could reproduce the crash with a minimalist scenario. It has nothing to do with Base or BaseDocumenter. Run simply next Basic statements in any empty document: Sub Main Dim a As String, b As String a = """Straße""" b = Replace(a, """", """) End Sub LO crashes instantly. I presume it has to do with the fact that - the replacement is by default case-insensitive - the upper case of character "ß" is 2 characters long, and not only 1 I change the title of the bug to "Basic Replace() function crashes LO"
(In reply to Jean-Pierre Ledure from comment #21) > I could reproduce the crash with a minimalist scenario. > > It has nothing to do with Base or BaseDocumenter. > > Run simply next Basic statements in any empty document: > > Sub Main > Dim a As String, b As String > a = """Straße""" > b = Replace(a, """", """) > End Sub > > LO crashes instantly. > > I presume it has to do with the fact that > - the replacement is by default case-insensitive > - the upper case of character "ß" is 2 characters long, and not only 1 > > I change the title of the bug to "Basic Replace() function crashes LO" Following this comment I change the component to BASIC.
Created attachment 173298 [details] bt with debug symbols On pc Debian x86-64 with master sources updated today, I got an assertion by following Jean-Pierre's example in comment 21.
I gave a try with https://bugs.documentfoundation.org/show_bug.cgi?id=143081
Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/4a0b40f1be9f6773c8ebc5331c257911a76a5cee tdf#143081: fix Basic Replace() function crashes LO It will be available in 7.3.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.
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/89e19634a775d53ea855db8767113f3ab08a3479 tdf#143081: fix Basic Replace() function crashes LO It will be available in 7.2.0.0.beta2. 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.
Julien Nabet committed a patch related to this issue. It has been pushed to "libreoffice-7-1": https://git.libreoffice.org/core/commit/bf3c4e49a48178849f75e6449ec47ab3ff456878 tdf#143081: fix Basic Replace() function crashes LO It will be available in 7.1.5. 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.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/79657c9f5392a9c243d3f3c14fa190b04b6806e9 tdf#143081: basic_macros: Add unittest It will be available in 7.3.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.
Xisco Fauli committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/fadccf7e6e9a46c54de9578dd708623495ba8e80 tdf#143081: basic_macros: Add unittest It will be available in 7.2.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.