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.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CNVCreateBufferedWriter - Could not complete operation in specified time

Hey Vix -

 

I'd like to be able to reproduce what you're seeing here.  Could you please post some code that reproduces what you're seeing so that I can investigate?

 

Thanks -

 

NickB

National Instruments

0 Kudos
Message 11 of 40
(1,030 Views)

The code is the one I posted in Message 4 of this discussion.

I'll try to write a simple example reproducing the problem, but I'm not sure because it seems to be very computer-specific.

I think it's related to the interactions between:

  • Windows 7 64-bi
  • NI Shared Variable Engine
  • Microsoft Outlook 2010
  • MC Afee VirusScan Enterprise 8.7i

 

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 12 of 40
(1,020 Views)

Hi Nick,

good news!

I have a small example that replicates my problem (at least on my Win7 64-bit CVI 2010 SP1 machine) - see attachment

 

With a step-by-step debug I saw in NI Distributed System Manager 2010 that all the variables are properly created, but when I start the process, they're deleted!!!!!! ...and so the following CNVCreateBufferedWriter() gives an error.

 

I hope this helps finding a solution.

 

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 13 of 40
(1,001 Views)

Hey Vix,

 

I could not reproduce this issue with your code. Is this running as a startup app, or under any special conditions?

National Instruments
0 Kudos
Message 14 of 40
(988 Views)

As I wrote in one of the previous messages, I think this problems only happens under special conditions:

  • Win 7 Professional 64-bit
  • Outlook 2010
  • MC Viruscan Enterprise 8.7i

I don't know if the reason is in one of them, or the problem is some kind of interaction.

This is the situation:

  • if the program is manually launched immediately after the system boot, it works. And in this situation it can be stopped and re-launched without problems, even after Outlook 2010 launch.
  • if the program is launched for the first time if Outlook 2010 has been launched yet, it doesn't work. And in this situation it won't never work: you must re-boot the machine.
Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 15 of 40
(984 Views)

I've already written in one of the previous messages: I think it could be difficult for you being able to reproduce this specific behavior, but I'll do my best to help you sending some other debug info from my machine.

Tell me what can I do, because this problems is really annoying and frustrating (believe me)

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 16 of 40
(964 Views)

The Shared Variable Engine uses ports 5000 and 6000 by default. Could you check to see if either of those ports are blocked by your security software? Also, maybe Outlook is also trying to use those ports. You could call "netstat -an" from the command prompt without the shared variable engine to see if port 5000 or 6000 is being used. If that is the case, I can provide you instructions on how to change those ports.

National Instruments
0 Kudos
Message 17 of 40
(951 Views)

The Shared Variable Engine uses ports 5000 and 6000 by default. Could you check to see if either of those ports are blocked by your security software?

I don't know. I'll ask to my system administrator

 


You could call "netstat -an" from the command prompt without the shared variable engine to see if port 5000 or 6000 is being used.

Immediately after the boot, I stopped "National Instruments Variable Engine" through Control Panel >> Administrative Tools >> Services, then I call "netstat -an".

There are some connections related to these ports:

TCP    0.0.0.0:5151           0.0.0.0:0              LISTENING
TCP    0.0.0.0:5357           0.0.0.0:0              LISTENING
TCP    [::]:5357              [::]:0                 LISTENING
UDP    0.0.0.0:5000           *:*                   
UDP    0.0.0.0:5002           *:*                   
UDP    0.0.0.0:5003           *:*                   
UDP    0.0.0.0:5355           *:*                   
UDP    0.0.0.0:6000           *:*                   
UDP    0.0.0.0:6004           *:*                   
UDP    0.0.0.0:6005           *:*                   
UDP    10.1.2.16:5353         *:*                   
UDP    169.254.249.185:5353   *:*                   
UDP    [::]:5355              *:*                   

 

Is this information helpful?

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 18 of 40
(945 Views)

It looks like something else is taking ports 5000 and 6000 before your application can. Maybe this is a race condition and occasionally your application beats it to those ports which explains why it works some of the time. Let's try changing the ports of the shared variable engine.

 

In the system registry, add the following two keys:

 

  • HKEY_LOCAL_MACHINE\SOFTWARE\National Instruments\Logos\Ports\FirstClientPort
  • HKEY_LOCAL_MACHINE\SOFTWARE\National Instruments\Logos\Ports\FirstServerPort

The two keys don't exist by default, so you probably need to create them. The two keys should be DWORD values. By default the FirstClientPort is 5000, so make this something that is not taken like 5001. And FirstServerPort is 6000 by default, so let's make that 6001. Then resart the system and try your application again.

National Instruments
0 Kudos
Message 19 of 40
(938 Views)

Unfortunately I don't think this is the reason of my problems because (without having modified the registry yet):

  • using CurrPortsI see that ports 5000 and 6000 are used by a system process with ID = 2116
  • Task Manager shows that that process ID belongs to National Instruments Domain Service (and I think this is what it should be)

but CNVCreateBufferedWriter() returns the usual error Smiley Sad

 

Anyway tomorrow morning I'll do what you suggest me and other tests, and I let you know.

Vix
-------------------------------------------
In claris non fit interpretatio

-------------------------------------------
Using LV from 7
Using LW/CVI from 6.0
0 Kudos
Message 20 of 40
(936 Views)