Previous Thread
Next Thread
Print Thread
ATE 7.0.1670.0 XTREE Error #37477 01 Aug 24 06:13 PM
Joined: Aug 2016
Posts: 371
J
John Andreasen Offline OP
Member
OP Offline
Member
J
Joined: Aug 2016
Posts: 371
Hi,

I seem to be experiencing an issue with ATE 7.0.1670.0 related to XTREE. We have a dialog with an XTREE of payments made on a ticket (which starts empty.) The user can then add different payments until the ticket is fully paid. In this case, when I add another row (there is another selection dialog that is displayed and deleted in the interim) it generates an XTREE related error and results in the ATE window closing. I have not been able to reproduce in a way that would be easy to send to you. So, it may require me giving you access to a system here. I did enable the XTREE trace in the ATE miame file and was able to capture the attached traces. (I had to change to txt extension to upload to the forum). I know this probably is not very clear. If there is more info I can provide, let me know. Also, everything works fine in ATE 6.5.1728.2. I could try to find when it changed if that would be helpful.

Thanks,
John Andreasen

Attached Files
ashlog.txt (8.79 KB, 18 downloads)
SHA1: b478cdfec73cd82dfb713e670df3efb3cb4d2073
Re: ATE 7.0.1670.0 XTREE Error [Re: John Andreasen] #37478 01 Aug 24 06:43 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Your trace is actually helpful, containing what I think is the smoking gun. At some point in the not-too-distant past, I encountered a crash scenario in a particular XTREE configuration which I could trace to an error within a Windows DLL during handling of a message fired from within the DLL underlying XTREE. Both being third-party modules, I never was able to get a satisfactory resolution. (The best advice I was able to get from any of the responsible parties was to look for potential memory corruption.) Which I was unable to find, but it did lead me down a path of adding a lot of housekeeping, defensive code, safety margins, etc. which eventually did seem to make the problem go away. But one of those steps was to completely unload the DLL at the end of a program.

Your log does show the DLL being reloaded after several XTREE calls, with an error (invalid control id) on the very next call. So you were trying to access an XTREE control created earlier, but the DLL had been unloaded/reloaded/reset since then.) My guess is you're using the ASFLAG AF_SBXASRUN option and these calls are occurring across multiple instances of SBX's that are acting like RUNs?

If that seems likely to you, then we should probably start with an ATE update that backs out that precautionary step (which probably was never actually necessary).

Re: ATE 7.0.1670.0 XTREE Error [Re: John Andreasen] #37479 01 Aug 24 07:04 PM
Joined: Aug 2016
Posts: 371
J
John Andreasen Offline OP
Member
OP Offline
Member
J
Joined: Aug 2016
Posts: 371
Hi Jack,

You are correct that the XTREE calls in question are happening in separate SBXs where at least the original SBX has the AF_SBXASRUN flag set. Interestingly, I don't see where the flag is set in any of the subsequent SBXs that are being called. Otherwise, what you stated seems like a likely scenario. There may be a subsequent SBX call I am missing that has the AF_SBXASRUN flag set though.

Re: ATE 7.0.1670.0 XTREE Error [Re: John Andreasen] #37480 01 Aug 24 07:27 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
I think the flag persists across XCALLs. But I'm not sure actually sure it's the culprit here. Can you repeat your test with the ATE flag turned on? I'm looking for lines that look like this:
Code
2 12:24:18 <TELNET:4c97> TAB(-10,85);5,LOG,3.1(124)

I think the unload is occurring in response to TAB(-10,85),5 which is sent whenever a new RUN program is loaded (but shouldn't be for SBXs), so I'm not sure yet what's really happening.

Re: ATE 7.0.1670.0 XTREE Error [Re: John Andreasen] #37481 01 Aug 24 09:19 PM
Joined: Aug 2016
Posts: 371
J
John Andreasen Offline OP
Member
OP Offline
Member
J
Joined: Aug 2016
Posts: 371
OK, I just ran the test again with the ATE trace on. Attached are the results.

Attached Files
ashlog.txt (62.22 KB, 15 downloads)
SHA1: c55b07c66997a5a621cd5ccbda6462f567ca8aed
Re: ATE 7.0.1670.0 XTREE Error [Re: John Andreasen] #37482 01 Aug 24 10:03 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
It looks like this is the culprit:
Code
TAB(-10,85);5,COPY,3.4(147)

In other words, you're somehow executing a COPY command in the middle of these XTREE operations, probably via XCALL AMOS,"COPY...".

As suggested earlier, I can probably remove that logic, but it would require an update of ATE. It might be simpler, at least in the short term, to see if you can replace that COPY operation with MX_COPYFILE

Let me know which you prefer.

Re: ATE 7.0.1670.0 XTREE Error [Re: John Andreasen] #37483 02 Aug 24 01:44 PM
Joined: Aug 2016
Posts: 371
J
John Andreasen Offline OP
Member
OP Offline
Member
J
Joined: Aug 2016
Posts: 371
OK, thank you Jack. I will try to track down where the copy is and we can go from there.

Re: ATE 7.0.1670.0 XTREE Error [Re: John Andreasen] #37484 02 Aug 24 02:50 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Whether or not you decide to replace the COPY, if you want to verify that the ATE patch does resolve the problem, I posted a beta update of ashw32.exe here..

ash-7.0.1761.2-w32-upd.zip

Also, a couple of tips on tracking down where the COPY occurs:
  • Use grep, or SBCSCH or your preferred search tool on the LSX files, not the source files. (That makes it a lot easier to pin down the main module when it occurs within an include.).
  • Turn on the EXEC, XCALL and AMOS traces (on the server side, from the dot prompt). That should show all the XCALLs and in particular, the XCALL AMOS calls in context. (If XCALL is too verbose, you can probably do without that one.) Note that each trace line will show the main program and the SBX, if applicable.

Re: ATE 7.0.1670.0 XTREE Error [Re: John Andreasen] #37485 02 Aug 24 04:36 PM
Joined: Aug 2016
Posts: 371
J
John Andreasen Offline OP
Member
OP Offline
Member
J
Joined: Aug 2016
Posts: 371
I can confirm that the patch does indeed fix the issue. Thanks for the search tips as I will still plan to eliminate the copy via XCALL AMOS.

Re: ATE 7.0.1670.0 XTREE Error [Re: John Andreasen] #37486 02 Aug 24 05:11 PM
Joined: Jun 2001
Posts: 11,794
J
Jack McGregor Offline
Member
Offline
Member
J
Joined: Jun 2001
Posts: 11,794
Good. I'll post a proper update for the ATE installer after a bit more in-house testing. But I think it will be cleaner to use MX_COPYFILE, or even HOSTEX to cp rather than XCALL AMOS, which is a lot more complex internally.

Re: ATE 7.0.1670.0 XTREE Error [Re: John Andreasen] #37487 02 Aug 24 09:19 PM
Joined: Aug 2016
Posts: 371
J
John Andreasen Offline OP
Member
OP Offline
Member
J
Joined: Aug 2016
Posts: 371
OK, sounds good. Yes, I agree and always use MX_COPYFILE in new code.


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3