TD-23824: Unable to locate correct late bound function

Post found bugs and possible workarounds.
Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 118
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

TD-23824: Unable to locate correct late bound function

Post by Igor Ivanovic » 22 Nov 2017, 13:54

Hi,

With the introduction of overloaded functions something got broken with late bound calls.
In our old/new app we were getting a lot of "Internal memory is not valid" errors on one of our new forms which was designed to use late bound class functions, so I tried to make a repro.
The interesting thing is that in the repro I didn't receive the "Internal..." error but instead a new one: "Unable to locate correct late bound function" on the same place.
Further investigation showed that it's a regression in TD7. and up.
The same works ok in TD 6.2 and 6.3.

Here is the repro if you wan't to take a look at the problem yourself.
late_bound_bug.zip
In the original app we are still getting the "Internal..." errors, but on the same spot - when calling the late bound function.
You do not have the required permissions to view the files attached to this post.
Igor Ivanovic
Image

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 400
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: TD-23824: Unable to locate correct late bound function

Post by Dave Rabelink » 22 Nov 2017, 16:00

Interesting Igor !

It clearly starts with an issue in the new function overloading, as you stated.

A simple testcase shows that passing an UDV to a function, TD is not searching for the correct class-type.

See that on the second MyFunction implementation, it expects a UDV of type cfcBase.
When calling the function and actually passing an UDV of type cfcBase, you will get assignment different types at runtime.

Latebound calls will have the same issue, but trigger a different error message.
overloading_bug.zip
You do not have the required permissions to view the files attached to this post.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 118
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Re: TD-23824: Unable to locate correct late bound function

Post by Igor Ivanovic » 23 Nov 2017, 08:09

Dave,

Did you already reported this to OT or should I open a ticket?

Cheers,
Igor Ivanovic
Image

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 400
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: TD-23824: Unable to locate correct late bound function

Post by Dave Rabelink » 23 Nov 2017, 08:41

Igor Ivanovic wrote:
23 Nov 2017, 08:09
Did you already reported this to OT or should I open a ticket?
I did not report this. I found this out trying to investigate/fix your source provided in this thread.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 118
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Re: TD-23824: Unable to locate correct late bound function

Post by Igor Ivanovic » 23 Nov 2017, 09:19

Ok, I've opened a ticket on the OT support site.

Cheers
Igor Ivanovic
Image

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 400
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: TD-23824: Unable to locate correct late bound function

Post by Dave Rabelink » 23 Nov 2017, 09:43

Igor Ivanovic wrote:
23 Nov 2017, 09:19
Ok, I've opened a ticket on the OT support site.
Thanks Igor !
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 118
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Re: TD-23824: Unable to locate correct late bound function

Post by Igor Ivanovic » 23 Nov 2017, 12:39

Just received the ticket number: TD-23829
Igor Ivanovic
Image

Return to “Bug Reports”

Who is online

Users browsing this forum: Ccbot [Crawler] and 0 guests