From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Debugging TestStand Custom User Interface

I am looking for advice on the topic of debugging custom user interfaces.  I created a complex TestStand user interface/operator interface in LabVIEW that has a few issues:

  1. LabVIEW is crashing at random times.  I would like to trace down the root cause of the LabVIEW crashes.
  2. Sometimes when I call the Application Manager shutdown method, I never receive the ExitApplication event callback

I was wondering if the community had any advice on how to debug these issues.

  • Are there any tools that will allow me to view the ActiveX items that are open in memory?
  • Are there any tools that will allow me to view the ActiveX callbacks that are occurring?
  • Is there a way to configure TestStand to write to a debug log for the ActiveX interface?

 

In general, any advice on debugging LabVIEW and TestStand interaction through ActiveX controls would be appreciated.

 

 

Thanks!

CLA, CTA
0 Kudos
Message 1 of 8
(3,997 Views)

Hi LVB,

 

Before I address some of the issues, I'd like to know a little bit about the circustances surrounding the LabVIEW crashes. Are they accompanied by any error messages? Does the crash occur consistently at a certain point during execution? Or when the custom interface is opened or closed? Thanks! 

 

Best,

--
Peter Rifken - Field Engineer & Business Manager
Boston / North New England & Maine
0 Kudos
Message 2 of 8
(3,979 Views)

Hi LVB,

 

Have you tried the abortAll method before shutting the AppMgr down? This may help you.

 

If your OI is complex I'm guessing you are using the TS API, make sure to close all TS references in subVIs

 

Regards,

Rodéric L
Certified LabVIEW Architect
0 Kudos
Message 3 of 8
(3,968 Views)

@Peter-R wrote:

Hi LVB,

 

Before I address some of the issues, I'd like to know a little bit about the circumstances surrounding the LabVIEW crashes. Are they accompanied by any error messages? Does the crash occur consistently at a certain point during execution? Or when the custom interface is opened or closed? Thanks! 

 

Best,


There are two types of "crashes" that occur, neither occur consistently:

  1. Windows displays a "Application has stopped responding" message for LabVIEW.  This occurs generally while an execution is running.
  2. LabVIEW closes without an error message.  The process disappears from windows Task Manager.  This generally occurs during the OI shutdown.
CLA, CTA
0 Kudos
Message 4 of 8
(3,953 Views)

Do you use any parallelism in your application?

Are there continuous processes in the UI? Do you call sequences as such that they run concurrently (e.g. parallelmodel)?

Are there any popup dialogs expected, but they do not display/come to front? Do you access shared/external resources (network drive, GPIB instrument, ...)?

 

What is the memory consumption before the crash? CPU load? Number of handles in your UI?

 

Does the crash occur only after some executions had run or immediatly after loading? Can you track down the crash/hang to the usage of a certain sequence-file/sequence/step/module?

 

just adding some thoughts here....

Norbert

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

Do you use any parallelism in your application?

Are you referring to LabVIEW of TestStand?  I have re-entrant VIs and parallel while loops in LabVIEW.


Are there continuous processes in the UI?

  There are multiple while loops, each running a Queued Message Handler.


Do you call sequences as such that they run concurrently (e.g. parallelmodel)?

 I am running a custom batch process model.


Are there any popup dialogs expected, but they do not display/come to front?

  No


Do you access shared/external resources (network drive, GPIB instrument, ...)?

 Yes

 


What is the memory consumption before the crash? CPU load? Number of handles in your UI?

I don't have the exact numbers for memory consumption.  How can I find the number of handles in the UI?


Does the crash occur only after some executions had run or immediately after loading? Can you track down the crash/hang to the usage of a certain sequence-file/sequence/step/module?  Can you track down the crash/hang to the usage of a certain sequence-file/sequence/step/module?

The crash occurs at random times, but generally after executions have been running for some time.  The crash is occurring on a very basic "simulation sequence" which just runs a few expressions.
  • Are there any tools that can assist with tracing down why the crash occurs?

 

Thanks for the assistance.

CLA, CTA
0 Kudos
Message 6 of 8
(3,932 Views)

So you tell us the following:

 

The crash/hang occurs when running a simple sequence file several times (never happened at the first execution) using a custom UI and a custom process model.

 

Can you track down any dependency?

 

So i suggest you test the combinations:

A) Run the sequence file several times using NI Sequence Editor and a NI process model (batch).

B) Run the sequence file several times using NI Sequence Editor and your customized process model.

C) Run the sequence file several times using your custom UI and a NI process model (batch)

 

Make sure that the sequence file contains no code modules and step types you have created. This is what i understood from your last reply that you already have...

 

You can try to hook up the Windows Performance Monitor (perfmon) to log memory usage/CPU load and handles for the UI process (so "SeqEdit.exe" when using the NI Sequence Editor). I never checked how perfmon reacts if the process it should monitor crashes silently......

Another thing is to start using WinDebug or similar tools, but i am not familiar with those.....

 

Norbert

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

Hi,

 

I'm currently facing the exact same problem as LVB. LV randomly crashes when lauching my custom interface. I found it happens when registering TS API callbacks. But I'm clearly unable to find which one is making my app to crash.

LVB were you succesfull at finding what was your problem ?

 

If so, could you share more information about it ?

 

PS:

Configuration : LV 2011 SP1 f2 ; TS 2010 SP f1

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 8 of 8
(3,801 Views)