Bug 159697 - BASE, EXTENSIONS, BaseDocumenter error Basic script crashes
Summary: BASE, EXTENSIONS, BaseDocumenter error Basic script crashes
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Extensions (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Jean-Pierre Ledure
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-12 16:51 UTC by graham.ward@gmx.net
Modified: 2024-02-15 14:47 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample database "PDB-copy-odb" (32.31 KB, application/octet-stream)
2024-02-13 20:31 UTC, graham.ward@gmx.net
Details

Note You need to log in before you can comment on or make changes to this bug.
Description graham.ward@gmx.net 2024-02-12 16:51:09 UTC
Description:
I am trying to use the BaseDocumenter extension. When it runs I get the following error:

BASIC runtime error.
Argument is not optional.

It is getting upset at line 230

If psTargetPage = kTableData Then
					vElement = _BD_ATag(vElement, sTargetPage, lTargetIndex, _BD_GetLabel("DATASAMPLE"))
				Else
					vElement = _BD_ATag(vElement, sTargetPage, lTargetIndex)
				End If

Steps to Reproduce:
1.BaseDocumenter - Document this datbase
2.Start


Actual Results:
BASIC runtime error.
Argument is not optional.

Line 130

Expected Results:
Created a static HTML report in the specified folder.


Reproducible: Always


User Profile Reset: No

Additional Info:
Seems to be similar to Bug 151943
Comment 1 Jean-Pierre Ledure 2024-02-13 06:56:00 UTC
Hi,

- line 130 or 230 ?

- can you, please, attach the database that causes the error ? Eventually, reduce it to what is strictly necessary to reproduce the error and remove private or sensible data.

JPL
Comment 2 graham.ward@gmx.net 2024-02-13 20:31:10 UTC
Created attachment 192545 [details]
Sample database "PDB-copy-odb"
Comment 3 graham.ward@gmx.net 2024-02-13 20:32:38 UTC
You're correct - line 230.

Sample database attached.
Comment 4 Jean-Pierre Ledure 2024-02-14 17:22:43 UTC
I could reproduce the bug.

To fix it, in the BaseDocumenter Basic library, module BD_Html, replace line 230
    If psTargetPage = kTableData Then
by
    If sTargetPage = kTableData Then
(i.e. remove the leading "p" in psTargetPage).

Preferably do it manually. I will not post an update of the extension soon.

Note also that, when recompiling that module, an error appears due to a more strict syntax checking by the Basic compiler since the last 4 years: on line 558 of the same module, add a closing bracket.

Thanks for reporting the bug.
Comment 5 graham.ward@gmx.net 2024-02-14 17:38:32 UTC
I can confirm that this manual fix works.
Comment 6 Jean-Pierre Ledure 2024-02-15 14:47:55 UTC
I opt for status = NOTOURBUG.
Indeed, not a bug inside the standard LO code: neither in Access2Base nor in the Basic interpreter or alike.