NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Internal Error: Error occurred in module 'NIAnalysisModules.dll: NIAnalysisModules::ValidateStepSettings'

Hello, 

I have done significant searching and haven't been able to find any information on this topic so hopefully someone can help. We have written a sequence that pulls data from an Excel file, uses it to query our system under test, then verifies the results and writes them back to a new Excel file. The sequence was working earlier this week, but in the midst of some fairly significant changes it began giving us this error during analyzing: 

 

Message: Internal Error: Error occurred in module 'NIAnalysisModules.dll:NIAnalysisModules::ValidateStepSettings': The requested object does not exist.

 

Location:  ShellCommand_Compliance_V3.seq Seq["MainSequence"].Cleanup["Save Output Workbook"]

 

Rule: Internal Error

 

Description: The sequence analyzer uses this rule to report internal errors that occur during analysis. These message usually indicate a serious problem with a component of the sequence analyzer. Report the information to the component owner or to National Instruments. You cannot disable this rule. 

 

We get the same error on two other steps (the two steps to close the input and output workbooks).

 

This error never shows up when you first start Teststand or when you analyze/run the sequence the first time. It is only present after the sequence has been run once. You can also ignore the error and continue running once it has shown up, but after a while Teststand will freeze and crash. This is making me think something is not being closed properly, but I can't for the life of me figure out what it is.

 

The other thing we're seeing is that occasionally the variables pane will stop showing variables and instead say "An error occurred while accessing the data this control displays. This can happen if another thread, such as asynchronously running code modules, is modifying the data while you are viewing it." I'm assuming it's related, as it's only happening in this particular sequence. Sometimes it will come back after a while, other times I have to restart Teststand to get everything back to normal.

 

I tried copying just the Excel open and close steps to a new sequence and running it and I get the same results. Runs fine the first time, then gives me an error when analyzing afterward. 

 

My sequence file is attached for reference. 

 

Any ideas would be much appreciated!

0 Kudos
Message 1 of 11
(7,569 Views)

Trevalion,

 

What were the "fairly significant changes" that you made? Do you have access to the older, working version of the sequence file and its dependencies?

Kirk L. | Applications Engineer | National Instruments
0 Kudos
Message 2 of 11
(7,475 Views)

I have the backup file, which I've attached. The changes were mostly structural (in particular we decided to go with a line by line comparison system rather than a response by response comparison). The only changes that were made in regards to the Excel portion of the test were the column resize and background color changes. 

0 Kudos
Message 3 of 11
(7,469 Views)

So your backup file works correctly? I would recommend you "work forward" from the valid backup and slowly add in your modifications: if you test after every addition you should be able to find which part of your code is buggy/incomplete; if even the backup refuses to work anymore then the issue may lie with the installation of TestStand.

Kirk L. | Applications Engineer | National Instruments
0 Kudos
Message 4 of 11
(7,383 Views)

I have not had a chance to work on that sequence file again, but I have been building another similar sequence file. As I was building it I was analyzing after each change I made in order to watch out for the error. I was in the process of debugging and had not seen the error yet. I ran the sequence and it started up fine but I got an exception during runtime (the sequence requires the use of a COM port and I had forgot to disconnect another program from the port). So the sequence terminated, I closed the COM port, and when I reran the same error I was previously seeing on the above sequence showed up again. 

 

I tried shutting down Testand and reopening. This sequence is now behaving exactly like the first problem sequence, where it runs fine the first time after launching Teststand then gives me the error the second time I try to run it. 

 

I also tried undoing the last few changes I had made, which made no difference. Because the error doesn't seem to show up until after it's been run successfully once, I can't tell you exactly when it started happening. I was analyzing after each change, but not running the sequence. 

 

0 Kudos
Message 5 of 11
(7,325 Views)

Thought I'd add some new information in case it sparks any ideas in anyone's minds. 

I added a statement that clears all of my station globals related to Excel at the end of the cleanup. I am now no longer getting the internal error, but when I run I am having a new issue.

 

I am pausing at the very first step of the setup and at that point (even though my station globals were cleared when I started the execution, according to the sequence editor) the variable StationGlobals.Excel.OutputFilePath is being populated with a string that we cannot figure out where it is coming from. Initially it seems to be populated with "CfgVarCommand_Compliance_Results_000_0-0-0CfgVarCommand_Compliance_Results_000_0-0-0CfgVarCommand_Compliance_Results_000_0-0-0", but if you watch it while the execution is paused it will actually add to the variable string three times, resulting in "CfgVarCommand_Compliance_Results_000_0-0-0CfgVarCommand_Compliance_Results_000_0-0-0CfgVarCommand_Compliance_Results_000_0-0-0CfgVarCommand_Compliance_Results_000_0-0-0CfgVarCommand_Compliance_Results_000_0-0-0CfgVarCommand_Compliance_Results_000_0-0-0". 

 

0 Kudos
Message 6 of 11
(7,282 Views)

Trevalion,

 

So both sequences are giving you the same "Error occurred in module 'NIAnalysisModules.dll: NIAnalysisModules::ValidateStepSettings'" error? Are both sequences populating that StationGlobals.Excel.OutputFilePath variable in the same fashion you described?

 

Kirk L. | Applications Engineer | National Instruments
0 Kudos
Message 7 of 11
(7,273 Views)

Both sequences were giving me the "Error occurred in module 'NIAnalysisModules.dll: NIAnalysisModules::ValidateStepSettings'" error. Now that I have added the statement to clear the Excel related Station Globals neither one is giving me that error anymore. The first sequence actually seems to be back to working fine, from what I have tested so far. 

 

However the second sequence file is still populating the StationGlobals.Excel.OutputFilePath variable. I tried removing the statement to clear the Station Globals, which is what I added right before this problem showed up, but that didn't fix anything and only caused the internal error from before to start happening again. 

 

Interestingly, I only see this problem if I run the sequence in my 64-bit version of Teststand. Running the exact same sequence in the 32-bit version works just fine. I tried uninstalling and reinstalling the 64-bit version, which did not change anything. 

 

I have attached the most recent version of the sequence file. If I run this sequence file and break on the very first step of the setup, the OutputFilePath variable (which I can see is an empty string according to the variables panel when I start the run) gets changed to the new string at some point before I reach the first step of this sequence. If I leave the sequence paused here and watch it, the variable will double itself (by concatenating it's value to itself) five times, and then will stop there. 

0 Kudos
Message 8 of 11
(7,261 Views)

Trevalion,

 

Are both of these sequences reading/writing from Excel? 

Kirk L. | Applications Engineer | National Instruments
0 Kudos
Message 9 of 11
(7,239 Views)

Yes, both sequences were reading from and writing to Excel. It seems that explicitly letting go of my Excel object reference, rather than just quitting the application, actually solved all of internal error problems. 


The second problem, with the sequence file updating it's variables unusually, I have no idea about. I don't know what caused it. But I was able to get around it by copying all of the steps and subsequences from that file into a new file. My colleague thinks that maybe the file was corrupted somehow because the behavior was just exceedingly strange. 

 

In any case, everything seems to be working again, both sequences have been run several times since yesterday and are showing no problems. 

 

Thanks for your help!

 

 

0 Kudos
Message 10 of 11
(7,225 Views)