Page 1 of 1 1
Topic Options
#183906 - 2007-12-18 11:35 PM Invalid UDF call line error bug
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
Dear Ruud et. al.,

I've found a line error bug relating to invalid UDF calls. Please check out the following code:
 Code:
? "Line 1"
? "Line 2"
Test

Function Test($x)

	$Test=$x
	
EndFunction

Which returns:
 Code:
Line 1
Line 2
ERROR : invalid method/function call: missing '('!
Script: C:\Temp\test.kix
Line  : 10

There are only 9 lines of code in the above script. I assume that KiX is scanning the entire script for a function with the same name and signature. When it gets to the end, it returns the number of lines of the script + 1 as the error line rather than where the error occured.

Regards,

Richard

Top
#183977 - 2007-12-19 11:13 PM Re: Invalid UDF call line error bug [Re: It_took_my_meds]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Is this an error? V4.53, 4.52, 4.50 give the same messages.
Top
#183979 - 2007-12-19 11:22 PM Re: Invalid UDF call line error bug [Re: Witto]
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
Just because older versions also exhibit the same behaviour doesn't preclude it from being an error. It just means that no one has found and reported it before.
Top
#183986 - 2007-12-20 02:07 AM Re: Invalid UDF call line error bug [Re: It_took_my_meds]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Are you the QA dept looking for obscure minor things to complain about?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#183987 - 2007-12-20 02:11 AM Re: Invalid UDF call line error bug [Re: Les]
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
Hardly. I don't think reporting a bug is complaining at all. I don't care too much if this gets fixed, however I certainly hate any bugs in my code and as a courtesy to Ruud, I'm letting him know about. It is up to him if he wants to do something about it.
Top
#184138 - 2007-12-21 02:30 PM Re: Invalid UDF call line error bug [Re: It_took_my_meds]
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
Les - A bug doesn't really have a size - and if it has - it's small, right?
If it's big you usually call it beta or release candidate, no? \:\)

Meds - Agree, it catches the missing (), but throws you of at line that is a bug in my opinion.
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#184163 - 2007-12-21 10:02 PM Re: Invalid UDF call line error bug [Re: Björn]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hmm...
this has actually been reported earlier and ruud even answered something but yeah, it never got fixed.

the error messages have had issues as far as I can remember. The issues have changed a lot during the years, but they have never been totally accurate.

also, one might consider the depth of the information of the error being way too shallow.
say, someone writes a line with some 20 function calls from which half of them are nested. How he may know from the error where the problem lies?
_________________________
!

download KiXnet

Top
#184168 - 2007-12-22 02:36 AM Re: Invalid UDF call line error bug [Re: Lonkero]
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
How about doing it the same way a regular error shows - say, if you set the option that you have to declare variables - it halts on the first error period ? Using the same logic here seems to me to be the easiest way, or? Perhaps that doesn't touch that kind of nested code?
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#184171 - 2007-12-22 03:47 AM Re: Invalid UDF call line error bug [Re: Björn]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
 Originally Posted By: Björn
Les - A bug doesn't really have a size - and if it has - it's small, right?
Actually, I would not call it a bug. IMHO a bug causes good code to go bad. A properly written script would never manifest this issue. IMHO, it is a feature and as Jooel mentioned, Ruud knows about it but is probably not bothered enough by it to expend the effort to change it.

I tend to get a little defensive when people start crying "BUG" for every little "feature".
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#184172 - 2007-12-22 04:29 AM Re: Invalid UDF call line error bug [Re: Les]
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
 Originally Posted By: Les
Actually, I would not call it a bug. IMHO a bug causes good code to go bad. A properly written script would never manifest this issue.

Well - The code for getting the proper line goes bad in my opinion. Feature is what I would call it if it was left there with intent - perhaps it was.

Yes, I get you Les - no worries, you know I'll ask if I don't \:\)
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#184196 - 2007-12-23 07:00 AM Re: Invalid UDF call line error bug [Re: Les]
It_took_my_meds Offline
Hey THIS is FUN
*****

Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
Your confusing issues here. It is a bug in the KiXtart run-time, it just takes a script bug to show it. It is of course a minor bug, and if I was Ruud, I wouldn't necessarily bother to fix it if it wasn't easy to do so.

I would much rather he used his precious time to add things like: .NET support; COM events; multi-threading; references; nested error handling; inbuilt associative arrays; etc...

Top
#184198 - 2007-12-24 02:30 AM Re: Invalid UDF call line error bug [Re: It_took_my_meds]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
nice list of feats dude. maybe not in the perfect order.
but threads, com events and refs would be way cool.

anyhow... this minor thing is a annoying one and it increases the learning curve of a fresh scripter and that's bad.
Giving misleading information where the actual error is can sometimes be really exhausting.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  ShaneEP, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.063 seconds in which 0.023 seconds were spent on a total of 13 queries. Zlib compression enabled.