Prevent LabVIEW from Crashing When Update a Shared Library Using FTP, SFTP (SSH), or the CP Console Command on NI Linux Real-Time Target

Updated Nov 12, 2018

Reported In

Software

  • LabVIEW

Operating System

  • NI Linux Real-Time

Issue Details

How do I prevent LabVIEW from crashing when I update a shared library using FTP, SFTP (SSH), or the cp console command on an NI Linux Real-Time target?

Solution

When you replace a file on disk, many commands and programs open the file and replace the existing contents with new contents. This method preserves the permission and ownership values of the original file. However, replacing a shared library loaded in memory with this method can result in a LabVIEW crash because the library changes while LabVIEW has access to the original version. Use the following alternatives to safely replace a shared library loaded in memory:

FTP and SFTP (SSH)

If you want to replace a shared library loaded in memory on an NI Linux Real-Time target using FTP or SFTP (SSH), you must rename or delete the shared library before replacing it.

Note: Renaming or deleting a shared library does not preserve the permission and ownership values associated with the library.
 

Console

If you want to replace a shared library loaded in memory on an NI Linux Real-Time target using the console, use the following syntax to delete the existing shared library before copying the new file:

cp --remove-destination NewFile OldFile

where NewFile and OldFile represent the shared library paths of the file to copy and the file to replace, respectively.

Note: The --remove-destination option does not preserve the permission and ownership values associated with the library you replace.
 

WebDAV

If you want to replace a shared library loaded in memory on an NI Linux Real-Time target using WebDAV, you do not have to rename or delete the shared library before replacing it. The WebDAV server automatically deletes the original shared library before performing the copy operation.

Note: Using WebDAV to replace a shared library loaded in memory does not preserve the permission and ownership values associated with the library.

WAS THIS ARTICLE HELPFUL?

Not Helpful