Hello we have a labview Vi which tries to call a C function from a C/C++ dll. the function sets the python script paths and then calls Py_initialize.
Labview exits with no warning or error notification.
Windows error log shows the following.
|C:\Users\fernav2\AppData\Local\Temp\WER5E2C.tmp.WERInternalMetadata.xml C:\Users\fernav2\AppData\Local\Temp\WER78DE.tmp.appcompat.txt C:\Users\fernav2\AppData\Local\Temp\WER8E62.tmp.hdmp C:\Users\fernav2\AppData\Local\Temp\WER90F2.tmp.mdmp|
The code to launch labview is as follows
/*Initializes the python script*/
char* new_path= (char* )malloc(strlen(Py_GetPath())+1+strlen(s_py_path)+4);
"\r\n %s ",new_path);
s_PyObjectInst[index] = NULL;
Would appriciate any help possible.
I don't understand what you mean by the code to launch LabVIEW.
You said that LV is calling a function in a DLL. Did you write the code to make the call yourself or did you use the import utility?
If you have access to the header file associated with the DLL, the first thing to do would be to use the import utility to generate VIs for the function calls you want to use. It is very easy to cause memory allocation problems when calling DLLs.
I apologize for the typo. The code snippet is the code to launch Python interpereter. It is in the C dll that i have compiled . I am the author of the DLL and have simple wrapper calls to initialize python, load a module and execute the modules from it .
The same DLL is used with Labwindows and works fine.
However the when py_initialize is called from a Labview Call function node or a Importe LVLib, the result is the same , labview exits with no warning.
I would have to say that it does work on rare occasions , but they are rare.