Bug 150139 - No name in the "Property or method not found: $(ARG1)" error message
Summary: No name in the "Property or method not found: $(ARG1)" error message
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Andreas Heinisch
URL:
Whiteboard: target:7.5.0
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-25 11:49 UTC by Mike Kaganski
Modified: 2022-08-22 17:04 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2022-07-25 11:49:13 UTC
Run this BASIC code:

Sub MeaninglessErrorMessage
  x = CreateUnoListener("Impl_", "com.sun.star.io.XInputStream")
  x.available()
End Sub

This will produce two run-time error messages; the last one is not relevant here, but the first one is (literally):

> BASIC runtime error.
> Property or method not found: $(ARG1).

It doesn't tell the user which method is not found; in fact, that should be "Impl_available".

The error originates inside BasicAllListener_Impl::firing_impl, in a call to StarBASIC::Call.

The real problem is when user passes a created listener (actually, a generic UNO interface implementation) to some other object, so the interface's methods are called indirectly, and there's no way for the user to know which method is attempted.
Comment 1 Rafael Lima 2022-07-25 14:15:43 UTC
Repro with

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: 21a31eefab1401d288dbb8220f3df3365be9efaf
CPU threads: 16; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: threaded

Indeed the first error message makes no sense.

The message is defined in [1] but I don't know why it shows the second error message.

[1] https://opengrok.libreoffice.org/xref/core/basic/inc/basic.hrc?r=840b4eb2&mo=7414&fi=100#100
Comment 2 Commit Notification 2022-08-22 17:04:30 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7e2a8a9869e362ae181ad92f50ea287e9abf85bb

tdf#150139 - Add a concrete name to the error message

It will be available in 7.5.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.