LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Harlequinade

Execute DLL in sandbox

Status: New

Some companies provide the best drivers ever. Some don't.

 

So when using the Call Library Function Node for using external libraries, a call to badly written dll library shouldn't harm LabVIEW, in my humble opinion. However, as described in the KB, badly written libraries can let LabVIEW crash. I think this is not necessary.

 

Would it be possible to let the calls to a dll library be done in a sandbox, such that when the sandbox crashes, LabVIEW still remains alive?

 

 

Frequently seen message:

LabVIEW crash upon dll error

3 Comments
SteenSchmidt
Trusted Enthusiast

I've kudoed this but I think it could only be implemented on a select number of OS'es. I also think it would come with a large overhead in the calling process, so maybe it should be toggleable in each Call Library Function node, or maybe when enabling/disabling Debugging?

 

/Steen

CLA, CTA, CLED & LabVIEW Champion
PNR
Member
Member

One way to reduce the number of crashes is to set the 'Error Checking' option for the 'Call Library Function' to maximum (LabVIEW will throw an error message instead of crashing). However this does not work in all circumstances. A sandbox option would be helpful anyway.

AristosQueue (NI)
NI Employee (retired)

The only way I know to do this would be to have LV create a separate EXE that loads the DLL and then message that other EXE through some sort of message passing interface. You'd lose a lot of performance doing that, and I'm not even sure that we could generate such an EXE on the fly.

 

I think your best bet is to roll your own such EXE for the DLL that you're concerned about. No other mechanism for sandboxing a DLL exists to the best of my knowledge.