My LabVIEW 2016 32 bit is crashing a lot.
I can guess it is related to:
1. incompatibility with DAQmx 9.1.5 and the related device driver which I need for LabVIEW 8.5.1 which I also use (NI's support jumped on that issue yet I think it is not related)
2. an addon that I use to access OpenCV leaving some references open in the dlls
3. Controls with same label or with no label (I believe that this is the issue -LV can't recover correctly in such cases)
However, I don't want to guess like NI's support that it is point 1 and do nothing to prove it.
I expect to see the reason in a log file yet the support wasn't able to show me where to find it.
Searching around I found the dmp file under documents\LabVIEWdata
Is that the way to check those crashes or one of you know of a better way to check it beside elimination?
Thanks in advance
By The Engineering Bear
Wanted to look for some feedback on some code I made for troubleshooting crashes and hangs for medium to large LabVIEW applications. Wanted a way for a user experiencing a crash/hang to have a simple way of narrowing down where the problem is occurring. The VI is named Crash Logger.vi and it only requires the VI itself to use. No type def's, additional VI's, or other necessary parts. The reason for this is so that a user can drop it in multiple parts of their application and have it log the current state and some information on system state to narrow down where a crash/hang is occurring. I've gotten some feedback from friend's regarding making it a global variable that wrote to variables and had a separate VI to do the logging, but this takes away the "ease of use" I am going for for the user. I've included an example application to show how it can be used for a simple state machine.
I'd love getting more insight into what I could do better though which is why I'm coming here! Let me know what y'all think!
Crash Logger Project and VI.zip
I wrote wrapper in Visual Studio for OpenCV calibrateCamera() function. Every operation like converting 1D array of points to vector<vector<Point2f>> etc, works ok, except most important thing.
When function ()calibrateCamera is called, LabVIEW crashes. When this line is commented out, dll works ok (at least labview is still alive). Im out of ideas. I suspect that this is problem with memory management but i dont have an idea where it cames from. Function do not operate directly on data passed from LabVIEW.
Ultimately I can compile code as exe and call it via cmd, but I'm curious why such a thing appears.
Thanks for your precious time!
dll source (if you need i can enclose some sample input data):
using namespace cv;
using namespace std;
static void calcBoardCornerPositions(Size boardSize, float squareSize, vector<Point3f> &corners);
static void arr2vect(float *APoints,int *Asize, vector<vector<Point2f>> &imagePoints);
Calibrate(float *APoints, int *Asize, int width, int height, float squareSize)
boardSize.height = height; boardSize.width = width;
Mat cameraMatrix = Mat::eye(3, 3, CV_64F), distCoeffs = Mat::zeros(1, 1, CV_64F);
cameraMatrix.at<double>(0,0) = 1.0;
vector<Mat> rvecs, tvecs;
Size imageSize; imageSize.width = 2040; imageSize.height = 2040;
arr2vect(APoints, Asize, imagePoints); // prepare imagePoints
calcBoardCornerPositions(boardSize, squareSize, objectPoints); //prepare objectPoints
double rms = calibrateCamera(objectPoints, imagePoints, imageSize, cameraMatrix, distCoeffs, rvecs, tvecs);
static void arr2vect(float *APoints,int *Asize, vector<vector<Point2f>> &imagePoints)
int page = *(Asize); int row = *(Asize+1); int col = *(Asize +2);
for (int i = 0; i<page; i++)
for (int j = 0; j<row; j++)
pointBuf.x = *(APoints + (i*(row*col))+j*2);
pointBuf.y = *(APoints + (i*(row*col))+j*2+1);
static void calcBoardCornerPositions(Size boardSize, float squareSize, vector<Point3f> &corners)
for( int i = 0; i < boardSize.height; ++i )
for( int j = 0; j < boardSize.width; ++j )
corners.push_back(Point3f(float( j*squareSize ), float( i*squareSize ), 0));
I have several USB instruments (Agilent/Keysight optical power meters) which I can talk to via USB.
To minimise the time "wasted" by transferring data between the instruments and the PC I would like to query them in parallel. Unfortunately, LabVIEW doesn't agree with that strategy and reliably crashes when doing so. It doesn't matter which command I send, so here's a sample snippet, where I just query the instrument ID repeatedly. I don't even have to read the answer back (doing so won't make a difference):
This will kill LabVIEW 2012 and 2014, both 64bit without even popping up the "We apologize for the inconvenience" crash reporter dialog.
Has anyone had similar experiences?
I've seen LabVIEW crash while communicating over RS232 (VISA) but it's much harder to reproduce.
Is it outrageous to assume that communication to separate instruments via different VISA references should work in parallel?
All my instrument drivers are separate objects. I can ensure that communication to a single type of instrument is done in series by making the vi that does the communication non-reentrant. But I have to communicate with multiple instruments of different types, most of which use some flavour of VISA (RS232, USB, GPIB).
Am I just lucky that I haven't had more crashes when I'm talking to a lot of instruments?
Could it be a bug specific to the USB part of VISA? I've only recently changed from GPIB to USB on those power meters to get faster data transfer rates. In the past everything went via GPIB, which isn't a parallel communication protocol anyway afaik.
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 ?