From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Pass by pointer broken after non-use

I have some TestStand code that was developed on TestStand 4.2 in about 2009. In the code  a C++ function is called to transmit command data over a TCP/IP socket. The command data structure was passed by pointer. This code was run extensively from 2009 until about 2016 where it then just sat dormant on the system it was installed on for the conduct of the test. This week additional testing needed to be performed and the laptop used to do this was powered up and the test started. It generated an error during analysis that the send_command function loaded did not match the prototype. This is when it was discovered that the pointers were broken. The calling function is expecting an unsigned long which the pointer is but when the command data structure is passed in with the Pass set to by Pointer the error occurs that the data value passed in does not match the data type. It sees the data structure not the pointer. Does anyone know why/how the pointer can break and not recover? This has rendered all of the tests that were developed useless.

0 Kudos
Message 1 of 5
(2,372 Views)

Could you provide screenshots of the error you are seeing? Is this a TestStand generated error?  Also just to confirm the laptop running this test is the same one that has been successfully running it from 2009 to 2016?  Have you tried recreating these pointers in your code to see if the error still occurs?  If it was shown to work at one point and there have been no code changes then it is odd that it is having issues now.  Do you know if there are any network related changed that could be interfering with the TCP/IP communication?

CC
Applications Engineering
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 5
(2,243 Views)

SeqEdit_beforeSeqEdit_beforeSeqEdit_afterSeqEdit_after

This is a TestStand generated error. The laptop is the one that has been used during the entire time of the program. I do not know of any network changes but I am also not sure how that would affect the TestStand code and variable passing. This same code has been used since its initial development in 2008 and has been under CM control. This is occurring across multiple platforms. The two laptops used to test the system during its life time and on my office system that was used during development. Although I currently run 14.0.1.103 on my office system. The code had not been used or loaded for around two years then when brought up to try and run a regression test the analysis error occurred for the prototype not matching. The calling C++ code is looking for unsigned long inputs while the TestStand sequence builds a custom data structure. The structure was always passed in by pointer and was never an issue until the code was brought up earlier this week. I have attached screen shots before and after the prototype reload.

0 Kudos
Message 3 of 5
(2,239 Views)

It looks like the IN_cmd_data types don't match between the working version and the broken one.  I noticed it looks like is may be a custom data type: rt_logic_Base_BitSequence_struct_t   in the working version, but in the broken one it is set to Unsigned 32-bit Integer.  Are you able to set that data type to match the old custom one?

CC
Applications Engineering
National Instruments
http://www.ni.com/support
0 Kudos
Message 4 of 5
(2,228 Views)

We used the pointer which is an unsigned long 32 bit integer to pass the data structure because there was a miss communication between the software developers and the test developers. This had worked up until last week. The other difference from two years ago that may have something to do with the issue is that these systems were on a closed network most of the time and did not take Windows updates. The closed network no longer exists and these systems were brought up on an open network, access to www.

0 Kudos
Message 5 of 5
(2,200 Views)