LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

windows system exec error in application causes app to crash

The basics:

LabView 11.0 (32-bit)

Windows 7 enterprise

Because I have to control an elevated app I run my built app elevated on a Win7 64 machine.

 

I have an application that uses the system exec.vi (attached) to get a portion of the arp table. When I run this in development it works great. However when I build an app and run it this vi causes the app to be unstable and crash.... sometimes. I have a troubleshooting vi that I wrote that I place at the start and end of vis. This puts a log file on my desktop so that I can trace where it crashes. I've attached the log as well.

 

Basically we have a power controller that we control by Telnet but 1st I have to get the IP. I have the MAC of the controller which is DHCP but not the IP. To get the IP I fill the ARP table and search it for the MAC.

 

get ARPCache.vi throws the error messaage: System Exec.vi . Command was "cmd /c "arp -a | find "192.168.120"" but only in the built app.

 

Update: While getting more info to complete this post I did a build where I changed "get ARPCachs.vi" to show when called so I could see the error cluster. Now it pops up but no errors. hmmm

 

Norm

 

 

0 Kudos
Message 1 of 5
(2,822 Views)

Not sure about the '"' in the argument list. Are you sure that you really can use them like this without honoring escape characters?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(2,814 Views)

You have to remember that this is a call to the system exec and not to a labview function. Adding the esc \"\" for the quotes will cause windows to throw an error.

0 Kudos
Message 3 of 5
(2,790 Views)

It depends on how the exe deals with the arguments. Some do honor escape characters, some not.....

 

Afaik, there is no difference regarding the System Exec in development environment vs. exe. But it is possible, that these are executed using different user rights?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 5
(2,775 Views)

It's really strange that showing when called has cured this problem.

0 Kudos
Message 5 of 5
(2,762 Views)