Bug 118987 - Use of WEBSERVICE within a macro in CALC raises an "Illegal argument" exception
Summary: Use of WEBSERVICE within a macro in CALC raises an "Illegal argument" exception
Status: CLOSED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
6.0.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-29 17:28 UTC by Felix
Modified: 2018-09-05 16:50 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
File with macro generating the exception (10.99 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-07-31 19:33 UTC, Felix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felix 2018-07-29 17:28:39 UTC
Description:
Calling WEBSERVICE from a Basic macro will cause sometimes an exception:

BASIC runtime error.
An exception ocurred
Type: com.sun.star.lang.IllegalArgumentExceptionMessage;.

The exception seems to depend on the Website-URL. The following macro hopefully can reproduce the bug:

Sub MainTest
	Dim i As Integer
	i=0
	For i=0 To 100
		svc = createUnoService( "com.sun.star.sheet.FunctionAccess" ) 'Create a service to use Calc functions
		XML_String = svc.callFunction("WEBSERVICE",array("https://quotes.wsj.com/AUO/financials"))
	Next	
End Sub

This macro was assigned to a button and ran when the button is pushed. The exception appeared at i=18.




Steps to Reproduce:
1. Assign above stated macro "MainTest" to a button
2. Run it
3. Wait

Actual Results:
BASIC runtime error.
An exception ocurred
Type: com.sun.star.lang.IllegalArgumentExceptionMessage;.

Expected Results:
Properly rendered Website code in 	XML_String


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Roman Kuznetsov 2018-07-31 10:25:26 UTC
please attach file-example with your macros

Forward back status to UNCONFIRMED when you attach file into bug
Comment 2 Felix 2018-07-31 19:33:41 UTC
Created attachment 143861 [details]
File with macro generating the exception

Attached is a  file with the macro generating the exception. Just press the button and the macro will start.
Comment 3 Felix 2018-08-23 11:26:52 UTC
(In reply to Roman Kuznetsov from comment #1)
> please attach file-example with your macros
> 
> Forward back status to UNCONFIRMED when you attach file into bug

I did already attach a file and changed the ststus to UNCONFIRMED. Everything alright? Were you able to reproduce the behaviour?

Best regards,
Felix
Comment 4 Xisco Faulí 2018-08-23 16:07:02 UTC
in

Version: 6.2.0.0.alpha0+
Build ID: e78a6c4231cfb33643b45442b786e1e31b2781a8
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

i got the exception in iteration 29 the first time I tried, then in iteration 17.

In

Version: 6.1.0.0.alpha1+
Build ID: 3a801799536e6870f2fb111b1cc00b9575a35a39
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

( oldest commit in bibisect-linux64-6.2 ) 

on iteration 7...

In

Version: 6.1.0.0.alpha0+
Build ID: 93ea7cb6b5ab3c9b964b2b38e8f4a3bde71dbadf
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

( same commit as in bug 115710 )

i get the exception right after clicking on the button...

@Eike, since this is similar to bug 115710 I thought you could be interested in this issue...
Comment 5 Xisco Faulí 2018-08-30 10:28:36 UTC
So, even in

Version: 6.0.0.0.alpha1+
Build ID: 6eeac3539ea4cac32d126c5e24141f262eb5a4d9
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

( oldest commit in bibisect-linux64-6.1 ) 

I also get an exception at iteration 40. Second time I tried at iteration 31...
Comment 6 Xisco Faulí 2018-08-30 10:35:07 UTC
If I change the webservice from https://quotes.wsj.com/AUO/financials to http://www.lipsum.com/feed/xml?amount=2&what=paras&start=Yes ( same as in bug 115710 ) I can reach 100 iterations

Version: 6.2.0.0.alpha0+
Build ID: 3bd8316718fdfed454c01a9c4ae6af6beb34437d
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

Definitely, it looks like a limitation in the webservice https://quotes.wsj.com in the number of queries a user can do. Try to increase the waiting time between iterations...
Closing as RESOLVED NOTABUG