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

Report bugs and possible workarounds.
Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 785
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: 1162
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

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: 785
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

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: 1162
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

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: 785
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

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: 1162
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

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: 785
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

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

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

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

Post by Dave Rabelink » 15 Nov 2018, 18:58

Fixed in TD 7.1.1
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

Uwe van der Horst
Site Admin
Site Admin
Germany
Posts: 100
Joined: 05 Mar 2017, 14:21
Location: Wetter (Ruhr), Germany

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

Post by Uwe van der Horst » 10 Jan 2019, 14:09

Dave Rabelink wrote:
15 Nov 2018, 18:58
Fixed in TD 7.1.1
I don't see that the issue is fixed. With TD 7.1.1, Build 55819, I still get the assignment of different types error at runtime.
Best regards,
Uwe van der Horst
Advo-web GmbH

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

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

Post by Igor Ivanovic » 10 Jan 2019, 14:29

Uwe,

There are still some issues related with late bound functions...
Could you provide a simple test case for us and open a ticket on OpenText?
If you don't have rights to open a ticket (or just don't want to do it yourself), please just let me know and I will open it, but will need a test case...
Igor Ivanovic
Image

Uwe van der Horst
Site Admin
Site Admin
Germany
Posts: 100
Joined: 05 Mar 2017, 14:21
Location: Wetter (Ruhr), Germany

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

Post by Uwe van der Horst » 10 Jan 2019, 15:31

Igor,

I have attached a similar test case that is related. It crashes here:

ScreenShot005.png
I opened a ticket, the defect number is TD-24267. In this ticket I have attached Dave's test case as well to show that this defect TD-23824 is still not solved.
Gupta wrote:
Sure as I did (notice TD-23824) enter that bug at the time of TD 7.0 when it got reported and that bug got closed BECAUSE fixed and it was for given testcsase, in other words this got partially fixed... hence the new bug ad DEV asked me to enter as new one...
Interesting: My new testcase crashes only when using dynalib. After merging there is no error.
You do not have the required permissions to view the files attached to this post.
Best regards,
Uwe van der Horst
Advo-web GmbH

Uwe van der Horst
Site Admin
Site Admin
Germany
Posts: 100
Joined: 05 Mar 2017, 14:21
Location: Wetter (Ruhr), Germany

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

Post by Uwe van der Horst » 14 Jan 2019, 16:52

JM has entered two new defects:

TD-24341 TD-24342: Internal memory has becomeinvalid + "assignment of different types" error when using specific functions overloading passing UDV
Best regards,
Uwe van der Horst
Advo-web GmbH

Uwe van der Horst
Site Admin
Site Admin
Germany
Posts: 100
Joined: 05 Mar 2017, 14:21
Location: Wetter (Ruhr), Germany

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

Post by Uwe van der Horst » 17 Jan 2019, 08:45

I got an answer from Gupta.

TD-24342 is assigned to TD 7.1.3 for a fix.
TD-24341 this will not get fixed:
From DEV that dynalib issue is a long standing one, going back to at least 5.X days. Dynalibs were never designed for exporting of classes. Including copies into the main application is a workaround and this works, but not with inheritance and the function returning a different type then what's declared. Dave Rabelink has a good discussion on the pitfalls of using UDV's in dynalibs and his recommendation never to use inheritance at all with them:

https://forum.tdcommunity.net/viewtopic.php?t=45696

These are complex issues with high possibility for introducing regressions. At this point we need to treat the current functionality of dynalibs and their pitfalls "as designed".
Best regards,
Uwe van der Horst
Advo-web GmbH

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 0 guests