A bug in the macro ScriptForge.SF_FileSystem.pickfile() which uses the FilePicker dialog? - Ubuntu

I am using Libre Office 7.5
Here is a macro than runs fine under windows 10 LibreOffice

Sub pick()
f = ScriptForge.SF_FileSystem.pickfile()
print(f)
End Sub

Using the exact same macro on my Ubuntu18 machine results in the following error message

pickfile_error

Furthermore, the first run of the macro doesn’t return an error. It actually works the first time, but not for subsequent runs.

If I shut down Calc and the macro editor, and restart, it happens all over again i.e. the macro runs the first time, but not again.

Am I doing something wrong with the Linux version?

Then I’d suggest a bug-report at bugzilla. And please include there how your LO is installed (via apt, as snap …)
.
Bugs are reported here:

https://bugs.documentfoundation.org/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED&bug_severity=normal

For Ubuntu I usually suspect Snap first, but then it should not work on furst run…

Done… reported this as a bug.

Thanks.

tdf#154462