NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

COM server cannot be marshaled

Hi All.

 

I have a problem on my testers, some times this error is showing up :

The parameter is incorrect.
One reason this can occur is if the interface of your COM server cannot be marshaled. This can happen if your server is not using the default OLE marshaling implementation and does not implement its own proxy and stub code. If you write your server using Visual C++ you can add the oleautomation attribute to your interface in order to use the default OLE marshaling implementation. Alternatively, COM does not require marshaling if the server's threading model is the same as the client thread's apartment. You can try changing your server's threading model or the client thread's apartment to avoid the need to marshal the interface. 

 

I dont have a clue where to look for it, sometimes it is coming after a couple of hours of testing.. sometimes after several weeks, on some testers... never...

My system is an "inline" system, so it is all time waiting for boards, and then it start a test, and after waiting for new board to arrive..

 

The problem was not there in the beginning, but the company has changed virus scanner.. and I think (not sure at all), that it started to show up at that time..

 

Any ideas ???

 

Kind regards Bojer

Danfoss Drives.

0 Kudos
Message 1 of 4
(4,000 Views)

What parameter is the error for and what are you passing for it? The error is likely because COM object marshalling failed. It's possible this could be caused by other reasons such as low system resources on the machine (i.e. a resource leak might lead to this happening after an extended period of time). Does it always happen on the same COM object or is it a different one each time? Are they TestStand API COM objects or are they from a different server? What server?

 

It's possible a third party program like a virus scanner could have an effect. We've seen issues caused by things like video driver utilities that hook into windows messages of other programs, but it's not that likely. It might be worth trying to verify though. Is it possible to verify whether or not the virus scanner has an effect? Is there a machine it's readily reproducible on that you can try with and without the scanner to see if the problem goes away?

 

-Doug

Message Edited by dug9000 on 04-23-2010 10:26 AM
0 Kudos
Message 2 of 4
(3,984 Views)

Could that be related to the question I just posted under the "17501" heading? This is exactly the error message we are getting :

 

"Error executing 'While' step. Wrong parameter.  One reason this can occur is if the interface of your COM server cannot be marshaled..."

 

We originally had this message with race conditions on StationGlobals (again thanks to dug9000 for the immensely helpful posts on this). Currently we have it only when we are actually making a call to a USB camera driver, closing and re-opening a device.

 

Regards

 

Peter

 

0 Kudos
Message 3 of 4
(3,930 Views)

Peter is right. This might be similar to his issue. Take a look at that thread:

 

http://forums.ni.com/ni/board/message?board.id=330&thread.id=27601

 

-Doug

0 Kudos
Message 4 of 4
(3,923 Views)