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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 42 on Create Network Stream Reader Endpoint

Solved!
Go to solution

Yesterday, I had the pleasure of discussing this problem with Alejandro Calvo, an NI Applications Engineer.  We took my original question, Why isn't the NI PSP Locator Service installed on my Home PC, and turned it around, "Is it possible that the NI PSP Locator Service installation is being prevented?".  I mentioned that one difference between the Home (failure) and Work (success) systems is the AntiVirus platform -- I use Symantec at home.  He suggested I do a fresh install with the antivirus turned off.  So I did!

 

Two Steps Forward, One Step Back.  First, I uninstalled both LabVIEW 2010 and LabVIEW 2011 (the only versions on my home PC), and made sure that all of the NI-related Services were also stopped (I had to also remove a VISA-related program, and an NI WebServer64 Service).  I then turned off Virus checking (I'm not 100% certain it was really off, but I did the best that Norton would allow).  I then installed LabVIEW 2010, along with the Report Generation and Real-Time toolkits (but without Devices), rebooting where necessary.

 

At this point, I checked the Services, and, sure enough, the PSP Locator was running!  Great, I thought, we fixed it!  At this point, NI Updater started bugging me to update things -- you first have to Update the Updater (which requires running the Updater with Administrative Privileges).  It then found and installed 4 updates for LabVIEW 2010.

 

I then proceeded to install LabVIEW 2011 (again, LabVIEW, the Report Generation Toolkit, and the Real-Time Toolkit).  Confident, I again checked the running Services, sure that when I saw the PSP Locator running, I would be able to run the Network Streams example program and avoid the Error 42.  Oops, no more PSP Locator Service!  Totally gone, though it was present a few hours earlier after the 2010 installation. 

 

Sigh.  Just before going to bed, I again removed all the LabVIEW code so that I can "try again" later this evening (perhaps).

 

Here's my current thinking.  It made some sense to me that possibly Norton "interfered" with the installation of the PSP Locator Service in my original installation, so that it never got installed.  If this were the case, what we did yesterday, namely installing with Norton turned off, should have worked.  At first, it seemed that this was so -- LabVIEW 2010 installed and the Service was present.  But with Norton still off, after installing LabVIEW 2011, the Service was missing (not only not running, but not there!).

 

I'm now thinking that as part of either installing LabVIEW 2011, or possibly applying the LabVIEW 2010 updates, something goes awry while updating or reinstalling the PSP Locator Service, resulting in its removal.  I'm not at all sure at what step this happens, but it at least seems to be somewhat reproducible, and is likely to only take about another 10-20 hours to find!  [I'm being this persistent because I really want to use Network Streams in some applications I'm writing, but I have to get them to install and work on all of my machines ...].

 

[Note to the Discussion Group Moderators -- I've essentially been having a long conversation with myself here documenting an "unusual feature" of LabVIEW.  I'm doing so in the hopes that this information is useful to others, and that someone has seen this and knows what is happening.  If this "conversation with myself" is not appropriate, please let me know and I will be happy to Cease and Desist.]

 

Bob Schor

0 Kudos
Message 11 of 15
(1,646 Views)

The observation -- running the Network Streams "Host Fullness/Target Fullness" example on two Windows 7 PCs with LabVIEW 2010 and LabVIEW 2011  installed (at home, on a home network) results in an Error 42 ("Generic Error") message; the same code works fine on a third Windows 7 LV2010/2011 system (at work, on a domain).  Second observation -- the NI PSP Locator Service is not running on the home PCs, but is running on the work PC.

 

Hypothesis 1 (previously not tested) -- the Error 42 (while not at all helpful!) results from not having the PSP Locator Service active.

Hypothesis 2 (partly tested) -- the PSP Service, which is supposed to be installed when installing the full LabVIEW Core Developer software, was either removed subsequently or never installed in the first place.

 

Previous testing (just-previous post) demonstrates that (a) the Service is installed when LabVIEW 2010 is first installed, but (b) is missing after both the LabVIEW Updates (and the updates to the Update Service) are installed and LabVIEW 2011 is installed.  Unfortunately, I neglected to determine exactly when the PSP Service "went missing".

 

Last night, I tried another re-install.  I can confirm that the PSP Service is installed and running after (a) installing LabVIEW 2010 Core, (b) installing LabVIEW Update 1.1.2 (I had to download this from the NI site, as the "auto-update" repeatedly failed to connect to NI and do it automatically), (c) running the three updates it identified (one of which was updating itself to Version 2.0), (d) installing LabVIEW 2010 Real-Time, and (e) getting the final two updates from the Update Service.  Will continue the testing with LabVIEW 2011 tonight.

 

Meanwhile, I decided to test Hypothesis 1 on my work PC.  I stopped the PSP Service, which also stops 4 other NI services, and tried the Network Streams examples.  To my surprise, they ran just fine!  A check back showed the PSP Locator was running -- I had left its mode on Automatic, so it apparently restarted itself.  I changed the mode to Manual, stopped the Service, and tried again.  The example still worked!  Now I'm really confused.  However, I have to get on with my "real work", so I restarted all of the stopped services and created this documentation of my efforts in the hopes it will suggest the solution to an interested and knowledgable reader.

0 Kudos
Message 12 of 15
(1,637 Views)
Solution
Accepted by topic author Bob_Schor

Working with Alejandro Calvo, we finally figured this out!  There are several problems, some "fixes", and some work for NI.

 

My observation was that on some Windows 7 PCs (but not all) with LabVIEW 2011 installed, if I tried running the Network Streams examples, I would get an Error 42 when executing the Create Network Stream Reader Endpoint function.  Question 1 was what does this "Generic Error" really mean (i.e. what's wrong), and the second was why does this happen on some installations and not on others (a sub-question is can I "fix" the systems on which it doesn't work).  I'll call the PCs that can execute the Network Streams examples the Good PCs, and the ones that cannot the Bad PCs.

 

A key player in this drama is the NI PSP Locator Server (or Service), which has Service name of LkClassAds and "lives" in the executable lkads.exe (which is found in Windows\SysWOW64 on 64-bit Window 7 PCs).  At one point, I removed LabVIEW entirely from one of my Bad PCs and reinstalled it as I had done previously, on both the Good PCs and Bad PCs.  The installation pattern might be important, so I'll describe it briefly:

1)  Install LabVIEW 2010 Development System, with Office Report Generation Module.

2)  Install LabVIEW 2010 RealTime Module.

3)  Update LabVIEW Updates (may need to download NI Update Service 1.1.2).  Download and install the 4 updates it suggests.

4)  Install LabVIEW 2011 Development System, with Office Report Generation Module.

5)  Install LabVIEW 2011 RealTime Module.

 

After Step 3, I checked, and the PSP Service was running.  After Step 5, it was not!

 

Wanting a more "user-friendly" and "hardware-independent" installation platform, I created a Windows 7 VM using VMWare Desktop, and did the above installation again, this time checking after each step for the presence of the PSP Service.  I discovered that it vanishes in the middle of Step 4, after installing LabVIEW 2011 Development System, but before installing the Report Module (there's a "natural pause" to switch DVDs).

 

I had earlier done a slightly different experiment on my Good PC -- I stopped the PSP Service (putting it on Manual first) and tried running the example programs.  I did not get Error 42 (thus casting doubt on the hypothesis that this was a PSP-related feature).

 

At this point, I called Alejandro Calvo, an NI Applications Engineer who had charge of this "ticket".  I described the above attempt to stop the PSP service, which he reproduced on his PC.  However, he noticed that the Service, while stopped, was still "visible" in the Registry (and in the List of Services).  When he removed the Service from the Registry (HKLM\System\CurrentControlSet\Services\LkClassAds) (I didn't want to do this on my Good PC!), he got Error 42!  He agreed with me that this is a highly-specific error ("Cannot Create Network Stream Reader because PSP Locator Service does not exist") that is deserving of its own more-useful error code, something more meaningful than "Generic Error".

 

So why is the LabVIEW 2011 installer clobbering (sometimes) the PSP Service?  Alejandro picked up on the fact that I had just built a system in a VM, and told me there was an NI report that suggested, when things didn't install properly in VMs, you should "Repair" (go to Control Panel, Programs and Features, and choose the "Repair" option for the program in question).  I was skeptical, but gave it a try.  The first time I "repaired" LabVIEW 2011 on my VM, it (a) returned the PSP Service, and (b) asked me to repair LabVIEW Real-Time and LabVIEW 2010, which I decided not to do.  With the PSP Service now restored, I tried the Network Streams example -- still failing, but now I get a message saying the NI Web Server isn't installed.  [Why do I need the NI Web Server?  Who knows ...]  So I do the second "Repair", and the Web Server appears.  Now the Network Stream example works!

 

Greatly encouraged by this, I go home and try to "repair" one of my Bad PCs.  I run the Repair twice, asking it to Repair LabVIEW 2011, and agreeing to repair whatever else it requests (as I recall, it just needed to repair LabVIEW 2011 RealTime, and maybe the LabVIEW Update Service).  After doing this twice, Network Streams works here, as well.

 

I believe that Alejandro is in the process of submitting a CAR for both the Error 42 "unhelpful" message and whatever process is going awry in the installation of LabVIEW 2011.  [He suggested I could do a few more installations, with logging turned on so that NI could see exactly what was being installed, and uninstalled -- instead, I sent him a detailed list of the steps I'd taken to demonstrate the problem so that NI can "see for themselves"].

 

I now consider this "solved", and will try to mark it as such.  To summarize:

 

1)  If Error 42 occurs when trying to use Network Streams, it is probably because the PSP Locator Service is not running.

2)  Under some circumstances, installing LabVIEW 2011 (32-bit) on a Windows 7 (64-bit, but maybe also 32-bit) system may cause the PSP Locator Service to be removed.  If this occurs, it can be "repaired" by using Control Panel to "repair" the LabVIEW 2011 installation, but you must repair it twice.

3)  NI has been informed of both of these issues.  I hope they are ameliorated in LabVIEW 2012.

Message 13 of 15
(1,623 Views)

Thanks for taking the time to do this very nice writeup on the cause! It could be very helpful to others. I had the same issue and I never found out what the cause was so I was watching this thread. The issue went away when I replaced the computer so I was never able to find out what it was. This puts my mind at ease about network streams.

=====================
LabVIEW 2012


0 Kudos
Message 14 of 15
(1,617 Views)

Thanks for the kind words.  I'm also relieved that someone else has seen this!

 

I've just finished "repairing" my second home PC.  I'd uninstalled all of LabVIEW at the beginning of the week in an attempt to track this down, and on doing the "ordinary" installation, discovered that the PSP Locator that was installed as part of LabVIEW 2010 vanished after installing LabVIEW 2011.  I'd earlier repaired my laptop; tonight, I finished the installation of LabVIEW 2011 on my desktop, saw the Error 42 bug in action, repaired once, saw the PSP Locator reappear, repaired twice, and had full functionality restored!  Having now seen this "magic" work three times, I'm convinced.

Message 15 of 15
(1,610 Views)