Solved TD-22152: External function as function parameter crash TD63

Report TD 5.x and 6.x bugs and possible workarounds.
Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3512
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

TD-22152: External function as function parameter crash TD63

Post by Dave Rabelink » 10 Jun 2015, 12:13

This is a severe one.
It seems that in particular cases when calling external functions and use them directly as function parameters will crash TD 63.

For instance:

Code: Select all

Call OnErrorCheck( ExtFunction1( "a", "b" ) )
Will crash.

And when rewriting the above to :

Code: Select all

Set nError = ExtFunction1( "a", "b" )
Call OnErrorCheck( nError )
Does not crash. But my feeling is that TD becomes unstable afterwards. I get often crashes later on in the application or IDE.

It does not happen in all external functions I checked. Most WinAPI functions seem to work ok.
But on many 3rd party dll's and custom dll's we use, the crash is present.

I tried to create a testcase having the DLL project also.
I have seen that when the external function has parameters of its own (like in the sample above) the crash occurs.
But on functions without parameters it does not crash.

So I do not have the exact cause why and when it will fail. But at least the attached testcase can reproduce it.

I have tested the sample on several TD versions, and none crash (except TD 6.3 UPD1r)

Even TD 6.3 RTM does not crash. It seems to be introduced in TD 6.3 UPD1r !!!

For me this is an urgent one as we heavily use external components and it's impossible to check them all to apply the workaround.
(and even having the workaround, my feeling is it will make TD unstable)

The testcase is saved as TD 6.2 text format.
The test dll can be rebuild using the VS6 project.
ExtFunctionAsParam.zip
Please confirm.


PS.
This issue resembles
viewtopic.php?t=69679
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

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

Re: TD-22152: External function as function parameter crash TD63

Post by Dave Rabelink » 10 Jun 2015, 15:03

Gupta has assigned a defect for this issue:

TD-22152 - External function as function parameter crash TD
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

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

Re: TD-22152: External function as function parameter crash TD63

Post by Dave Rabelink » 13 Jul 2015, 12:11

This defect has been fixed in:

TD 6.3 UPD2 45680
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

Return to “Bug Reports”

Who is online

Users browsing this forum: [Ccbot] and 6 guests