Jump to content

TS custom user interface makes LV randomly crash

Recommended Posts

Hi all !

Currently building a TS custom interface for one of my customer, I decided (this time) to manage user rights directly using TS user manager.

Since I applied this solution, LV randomly crashes (or not crash) without giving any message that could help on resolving the issue.

This is not the first time I create TS custom interfaces, but this time there are few new things compared to other HMI I built :

  • newer LV | TS versions than usually (LV 2011 SP1.f2 and TS 2010 SP1.f1)
  • user rights are managed using TS user manager

For my user manager, I used a functional global to retain the TS engine reference and share through all functions I made to deal with user (I've built a library in order to reuse these functions later). Maybe this is not allowed... what do you think about it ?

Link to post
Share on other sites

I'm implmeneted the user manager a few times and haven't had any issues - maybe you're not closing a reference somewhere? Can you post your code? Or, at least, trim it down to as little as possible where the issue still occurs (make a little example) so we can fault find.

Link to post
Share on other sites

Hi Crelf,

I can post my code (somehow ugly because of a lack of time and idrectly using the TS API exemple given with LV...). However, I already tried to trim it down... and it seems to crash just after callbacks are registered. So if the issue comes from a callback code, I'm stuck... Else, it would come from the functions made to deal with users and rights.

I tried to debug it using DETT, but every time I launch it LV crashes and nothing appears in DETT (it seems like DETT just stop logging...).


I just didn't get it when you talked about the object leak dialog. It is turned on on my computer.

Of course when LV crashes, the debug window doesn't show up.

But when my interface runs well, this dialog window doesn't show up either ! I assume that there is no memory leak...

Most of the time, when LV crashes, NIERR window indicates it's an acces violation which made it crash. Sometimes, I see a 'pure virtual function call' Visual C++ error window poping-up...

Don't know if that help a lot...

Edited by Zyl
Link to post
Share on other sites

I can post my code (somehow ugly because of a lack of time and idrectly using the TS API exemple given with LV...). However, I already tried to trim it down... and it seems to crash just after callbacks are registered. So if the issue comes from a callback code, I'm stuck... Else, it would come from the functions made to deal with users and rights.

Sounds like you have a starting place. Start dropping callbacks that you're registering for one-by-one until the crash goes away. Depending on what you're registering for, maybe you want to drop breakpoints right at the front of the callback VIs and make sure they're not responsible somehow for the crash.

Link to post
Share on other sites

Hi !

In fact the code is a bit big to be posted here, and as I'm continuing to develop this software program it's getting bigger everyday. So I guess I won't post it.

Just to let you know, the problem really looks like this post I found on NI forums : http://forums.ni.com/t5/NI-TestStand/LabVIEW-Access-Violation-Crashes-from-TestStand/td-p/2004661. Except that I don't communicate with devices for the moment and the situation is reversed (I call TS in a LV app ; they call LV modules in TS).

NI France was working on my issue, reproduced the bug, but couldn' explain it. So they transfered to NI US support. They, again, reproduced the bug... but it seems that they could'nt find where it comes from. They are still searching... So as soon as I have a decent answer from them I'll let you know...

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By javier_r
      VIPM.io now allows you to post LabVIEW Resources, Ideas, and Tools. For example, you could post a link to a video tutorial or blog article about a package. You can also post ideas, like feature requests or new tools. Best of all, package developers are notified when you post your ideas and resources, and you can comment and discuss posts with the community. Take a look at this video to learn more: https://www.vipm.io/posts/664960df-f111-4e13-989a-24be8207182d/

    • By Shuvankar Das
      I want to connect My ccd camera with labview. The details of my system is given bellow. I cannot connect it please help   OS:  WINDOWS 7, 64bit   LabView Run-Time 2013(64-bit) NI-IMAQ 4.8 NI-IMAQdx 4.3   Camera: QICAM Monochrome Cooled (QIC-F-M-12-C) Model QICAM Resolution 1392 x 1040 Sensor 1/2" Sony ICX205 progressive-scan interline CCD Pixel Size 4.65 x 4.65µm Cooling Type Peltier thermoelectric cooling to 25˚C below ambient Digital Output 12 bit Video Output FireWire (IEEE 1394b) Max. Frame Rate 10 fps full resolution @ 12 bits Pixel Scan 20, 10, 5, 2.5MHz Mount Type C-mount optical format  
    • By Bryan
      TestStand Version(s) Used: 2010 thru 2016
      Windows (7 & 10)
      Database: MS SQL Server (v?)
      Note: The database connection I'm referring to is what's configured in "Configure > Result Processing", (or equivalent location in older versions).
      Based on some issues we've been having with nearly all of our TestStand-based production testers, I'm assuming that TestStand opens the configured database connection when the sequence is run, and maintains that same connection for all subsequent UUTs tested until the sequence is stopped/terminated/aborted.  However, I'm not sure of this and would like someone to either confirm or correct this assumption. 
      The problem we're having is that: Nearly all of our TestStand-based production testers have intermittently been losing their database connections - returning an error (usually after the PASS/FAIL banner).  I'm not sure if it's a TestStand issue or an issue with the database itself. The operator - Seeing and only caring about whether it passed or failed, often ignores the error message and soldiers on, mostly ignoring every error message that pops up.  Testers at the next higher assembly that look for a passed record of the sub assemblies' serial number in the database will now fail their test because they can't find a passed record of the serial number. 
      We've tried communicating with the operators to either let us know when the error occurs, re-test the UUT, or restart TestStand (usually the option that works), but it's often forgotten or ignored.
      The operators do not stop the test sequence when they go home for the evening/weekend/etc. so, TestStand is normally left waiting for them to enter the next serial number of the device to test.  I'm assuming that their connection to the database is still opened during this time.  If so, it's almost as though MS SQL has been configured to terminate idle connections to it, or if something happens with the SQL Server - the connection hasn't been properly closed or re-established, etc. 
      Our LabVIEW based testers don't appear to have this problem unless there really is an issue with the database server.  The majority of these testers I believe open > write > close their database connections at the completion of a unit test. 
      I'm currently looking into writing my own routine to be called in the "Log to Database" callback which will open > write > close the database connection.  But, I wanted to check if anyone more knowledgeable had any insight before I spend time doing something that may have an easy fix.
      Thanks all!
    • By javier_r
      Hello everybody!
      Wondering how many people have tried the new vipm.io site. We have added a ton of features to make it easy to Discover LabVIEW Tools and there are some cool ones coming soon.
      Check it out and let me know what you think 😀

    • By DigDoug
      CLA_ATM_QMH_PRACTICE.zipHi Folks,
      I'm taking the CLA exam in a few weeks and would like some feedback on the solution I put together (attached). A few specific questions:
      Can I dump tags in the VI Documentation of the VI like I did in Error Handler - Console Error.vi and get credit since there are instructions for developers to complete this work? This would be my strategy if I run out of time. 
      Does this seem like a passing solution? Why/why not?
      Where do you think I would lose the most points in this solution?
      Any other feedback on this exam or general strategy tips are greatly appreciated!
      Best Regards,
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.