-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[minor] Update Client Generator helpers to replace tunnels in loops and prevent reference leak #634
base: main
Are you sure you want to change the base?
Conversation
0 of 3 files processed successfully. Possible reason(s): LabVIEW: (Hex 0x1) An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.Command requires GPIB Controller to be Controller-In-Charge. Complete call chain: Processed Possible reason(s): LabVIEW: (Hex 0x1) An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.Command requires GPIB Controller to be Controller-In-Charge. Complete call chain: Processed Possible reason(s): LabVIEW: (Hex 0x1) An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.Command requires GPIB Controller to be Controller-In-Charge. Complete call chain: |
Source/Generator/Measurement V2 Client Generator Runtime/Cleanup Client If Error.vi
Show resolved
Hide resolved
Source/Generator/Measurement V2 Client Generator Runtime/Copy Client Template Library.vi
Show resolved
Hide resolved
Source/Generator/Measurement V2 Client Generator Runtime/Update Measurement from Metadata.vi
Show resolved
Hide resolved
Source/Generator/Measurement V2 Client Generator Runtime/Copy Client Template Library.vi
Show resolved
Hide resolved
Source/Generator/Measurement V2 Client Generator Runtime/Update Measurement from Metadata.vi
Show resolved
Hide resolved
Code changes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Using a terminal name of vi refnum in
for symmetry with vi refnum out
is a little more standard than just vi refnum
.
What does this Pull Request accomplish?
Updates
Cleanup Client If Error.vi
andUpdate Measurement from Metadata.vi
to replace the error wire tunnels in for loops with shift registers, as using tunnels for error wires might lead to the loss of the error source if the loop does not execute even once.Updates the Client Generator helper VIs
Copy Client Template Library.vi
,Update Control from Metadata.vi
,Update Measurement from Metadata.vi
,Get Default Value.vi
andCreate Control.vi
to prevent reference leaks.Context:
While integrating
Generate Client.vi
into our application, we encountered1357
and1051
errors during testing when trying to create client (with same name) multiple times for a measurement.Upon debugging, we discovered that these conflicts were caused by certain VI reference leaks in the helper VIs of the application. These leaks caused the generated client libraries to remain in memory under LabVIEW's Items in Memory, leading to conflicts when attempting to create a new client with the same name. Additionally, we found that there are certain VI reference leaks in the
Copy Client Template Library.vi
and few other helper VIs of the Client Generator as well.Although the VI reference leaks in the Client Generator helper VIs do not currently impact functionality, it is advisable to close these references appropriately after use to prevent any unexpected behavior in the future.
Why should this Pull Request be merged?
To update Client Generator helper VIs to replace the error wire tunnels in for loops with shift registers and to prevent VI reference leaks.
What testing has been done?
Built package for the changes and tested the wrapper VI for the mentioned scenario and also using the 'Desktop Execution Trace Toolkit'.