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.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Error Code -17502 when clicking Specify Module button in my OI

I have a custom user interface using TestStand 2010 SP1. I run with .NET 4.0.

 

When I edit a step in a sequence and click the Specify Module button on the Action Properties dialog, I get a message box with the following message:

 

"System Level Exception. Error Code: -17502"

 

I am using the .NET adapter. I do not get the error if I us the LabView adapter.

 

Why do I get this error and how do I fix it? Anyone have any ideas?

 

Thanks.

0 Kudos
Message 1 of 13
(3,577 Views)

Try creating an app config file in the same directory as your exe with the name yourexename.exe.config (e.g. testexec.exe.config) with the following contents:

 

<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" />
</startup>
</configuration>

 

If you are using Visual Studio 2010 and have a file called app.config in your project, you can add this to that file instead and when you build the project, it will create the yourexename.exe.config file at the appropriate location.

 

This will make the .NET adapter also use the .NET 4.0 clr, which should hopefully resolve the problem you are seeing.

 

Hope this helps,

-Doug

0 Kudos
Message 2 of 13
(3,572 Views)

I already have that. Still get the error.

0 Kudos
Message 3 of 13
(3,568 Views)

Have you checked the contents of your app config file when you get this error? One thing that can happen is that if your project in visual studio has an app.config file, whenever you build it will overwrite any myexe.exe.config file you might have created manually and thus you will lose these changes without realizing it.

 

Also which custom user interface did you base yours off of, or at least what programming language is it written in?

 

-Doug

0 Kudos
Message 4 of 13
(3,557 Views)

My application has the same text in the App.config file. I don't have any trouble running the sequences. I just can't edit a .NET action step type in my user interface.

 

I built the user interface from scratch using the TestStand active X controls. I used the Full featured .NET user interface supplied by NI as an example. So far, I can't see any differences in the way I am setting up or using the AxSequenceView control. There must be something different, though because I can use the example UI without a problem.

 

I just wish NI would give a more descriptive error that would be useful in finding the actual problem. We spend enough money for this software it ought to do that.

0 Kudos
Message 5 of 13
(3,554 Views)

I was mistaken that this error has anything to do with the app.config file setting. I should have verified that before responding, sorry about that. It actually works fine without the special app.config setting at all in the C# UI that ships with TestStand, it just uses the .NET 2.0 clr for the .NET adapter if you don't have all of the necessary settings in the app.config.

 

That said, a "system level exception" error is an unexpected error usually caused by an access violation which is why, when it occurs, there is not a more detailed error message (i.e. since the error was unexpected, there is no code written to handle it). Once we are able to reproduce this error and determine its cause, in a future version of TestStand, we will likely either resolve the issue completely so it doesn't happen anymore or report a better error message.

 

I've tried a few things, but so far I have not been able to reproduce this error.

In order to help us reproduce this problem, please provide the following info:

1) Are you bringing up the specify module dialog on an already specified step or on a newly inserted step? If it's an already specified step, please try a newly inserted step and see if it has the same problem.

2) Can you provide us with sample code or a sample UI which reproduces this problem?

 

Thanks for any help with reproducing this problem,

-Doug

0 Kudos
Message 6 of 13
(3,542 Views)

It doesn't matter whether I try to specify a module on a new step or an existing step, I still get the error.

 

Unfortunately, I cannot provide a sample at this time. For what it's worth, the example OI provided by NI with TestStand does not have the problem. But, so far, I can't figure out what I am doing different except that I am not using the

NationalInstruments.TestStand.Utility.ApplicationWrappter.Run method to start the application. I have instead created a .NET user control that contains all the TestStand controls and that control is added dynamically to my GUI at run time. I know we did not have this problem before upgrading to TestStand 2010. We have since upgraded to TestStand 2010 SP1. We don't use the feature a lot. Most of our editing of sequence files is done using the Sequence Editor provided by NI but sometimes when debugging we want to be able to edit a sequence file from within our GUI. So, I'm not certain when the problem crept in.

 

Thanks.

0 Kudos
Message 7 of 13
(3,514 Views)

Hi,

 

I am guessing you are having this problem on all of your machines that have TestStand 2010 SP1. Are you able to debug your code to narrow it down as to when that exception is thrown?

Rohama K.
0 Kudos
Message 8 of 13
(3,484 Views)

Yes, we have it on all machines with TestStand 2010 SP1. The exception is thrown when I click the Specify Module button. It is not instantaneous. The exception is not in my code. It's in the .NET Adapter from NI.

0 Kudos
Message 9 of 13
(3,482 Views)

Any ideas on how I could reproduce your problem on my end?

Rohama K.
0 Kudos
Message 10 of 13
(3,477 Views)