LabVIEW crashes after VI (calls DLL to post Windows Msg) exits
I built a DLL in Visual C++ and I use LabVIEW 7.1 to call it (using the Call Library function).
When I run the LabVIEW VI without the 'post windows message' functionality in the DLL, it works fine and exits LabVIEW without a problem. If the DLL posts a message, and the code from the link below is used to catch the meassage, the VI appears to have executed and exit correctly, allowing other VIs to be run, etc, but when the VI is closed, LabVIEW stops responding. If it is the only VI open, then it closes leaving the LabVIEW window minimized (and unresponsive) in the Taskbar. Both DLLs successfully detached from LV before the VI stops running.
http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3E7AC56A4E034080020E74861&p_node=DZ52071&p_submitted=N&p_rank=&p_answer=&p_source=External
Hi,
can you post your code here so we can try to reproduce it?
It sounds as if the handles aren't being released in the right order. i.e. LabVIEW will hold onto a DLL until the vi using it goes out of memory.
I think from your description you have a DLL which posts a message, and then you're using the example code which was written for LabVIEW 5.0 to read that windows message?
What message are you sending?
When you say the DLL has detached, is that process detach or thread detach?
What version of LabVIEW are you using?
What operating system?
What version of Visual C++?
Thanks
Sacha Emery
National Instruments (UK)
// it takes almost no time to rate an answer
Similar Messages
-
After update to Firefox 15 it crashes after javascript call from a popup window.close();opener.alert('test');. Is this working as intended or is it a bug?
According to the pages linked to the crash ID, there is a bug report on this.
Does the crash occur as soon as you run those two lines of code, or after dismissing the alert()?
If this is your application, why are you running script commands after calling window.close()? Could you avoid the problem by using an approach like this:
<br>window.setTimeout(function(){opener.alert('test'},250);
window.close(); -
Phone crashes after every call
My Droid crashes after every call. I have to remove the battery and reboot the phone. (Am running Droid 2.1).
Verizon - this isn't even funny any more. What's up with this?I haven't seen this before and it sounds really strange.
Have you tried restoring you phone to "factory defaults". It is quite possible something that you have installed is conflicting somewhere, but it's really hard to guess what it might be.
Also, while some of the VZW technical people do hang out here and answer questions, you're probably better off contacting VZW Customer Service with this one. You can reach them by dialing 611 on your mobile (which, in this case I wouldn't recommend) or at (800) 922-0204.
jason -
Why does LabView crash when unloading my DLL (reentrant calls)?
I have written a DLL in Borland Delphi using multiple threads that exports several functions (stdcall). I am using LabVIEW 6i on a WinXP machine. All functions in the DLL work as expected and return correct values. Everything works fine if I set all Call Library Function Nodes to 'UI-Thread', but as soon as I set one Function Node to 'Reentrant', LabView crashes when I close the VI after it has been executed. I assume the error is caused by the DLL unloading mechanism of LabView. Other C++/Delphi programs using the DLL reentrantly work fine, this only occurs in LabView. In which thread does LabView call FreeLibrary/DLL_PROCESS_DETACH? Has anyone experienced similar problems?
I have never run into this situation myself, but I do know that calling a multi-threaded DLL or CIN from LabVIEW does depend upon the following criteria:
If your CIN/DLL doesn't have any global data storage (global variables, files on disk, etc.), AND it doesn't access any hardware (register-level programming) AND it doesn't call any functions/DLLs/Drivers that are thread-unsafe.
OR
Your CIN/DLL protects (with semaphores or mutex's) access to those global resources.
OR
Your DLL is only called from one, non-reentrant VI
OR
Your CIN is only called from one, non-reentrant VI AND you don't access any global resources from CINInit, CINAbort, CINDispose, etc. procedures.
Hopefully this information can help you out in some way.
J.R. Allen -
Anyone can prove JNI is safe? My application crashes after many calls.
I heard that JNI is not safe. In fact I made an application base on many JNI calls.
C level is API supplied by IBM. And I was told the C API is tested and safe.
Java application and JNI calls is writen by myself. It crashed after about 3000 times call. I tried other JDK and other OS. On some platform, the thread hold there after many calls. No error, no crash. But others crashed even early.
Here's my JNI call's code:
JNIEXPORT void JNICALL Java_com_ibm_mm_sdk_cim_internal_PServiceFACImp_cEvaluate
(JNIEnv *env, jclass jobj, jlong jhandle, jstring jmanualedListFilename, jstring jclassedListFileName, jstring jresultFilename){
char *manualedListFilename = jstringToWindows(env, jmanualedListFilename);
char *classedListFileName = jstringToWindows(env, jclassedListFileName);
char *resultFilename = jstringToWindows(env, jresultFilename);
int rc; // API return code
void* handle; // FAC Handle
// convert C pointer from java long type
handle = (void*)jhandle;
rc = KmFAC_Evaluate(
handle, // FAC Handle
(char*)manualedListFilename, // File name of list of files
(char*)classedListFileName, // File name of list of files
(char*)resultFilename // Result file
if (manualedListFilename)
free(manualedListFilename);
if (classedListFileName)
free(classedListFileName);
if (resultFilename)
free(resultFilename);
if (rc != KM_RC_OK) {
//Throw exception
jclass exceptClass; // JNI exception class
char errorMsg[256]; // Used to build error msg for exceptions
jmethodID methodid; // Exception constructor method id
sprintf(errorMsg, "KmFAC_Evaluate() [CKM=%d]", (int)rc);
exceptClass = env->FindClass("com/ibm/mm/sdk/cim/DKServiceExceptionCIM");
methodid = env->GetMethodID(exceptClass,"<init>","(Ljava/lang/String;II)V");
jstring str = env->NewStringUTF(errorMsg);
jthrowable excobj = (jthrowable)env->NewObject(exceptClass,methodid,str,100, (int)rc);
env->Throw(excobj);
return;I agree with fury88. Try the code below it works fine!
// **************** Java portion ************************
public class Test {
// Load the dll that exports functions callable from java
static {System.loadLibrary("TestImp");}
// Imported function declarations
public native void print(String msg);
public void Test() {
public static void main(String [] args) {
Test t = new Test();
// Printf example
t.print("->Testing JNI - Hello from c++\n");
// **************** Windows portion - TestImp.dll **********************
// Exported function
JNIEXPORT void JNICALL Java_Test_print(JNIEnv *env, jobject obj, jstring msg)
const char *str = env->GetStringUTFChars(msg, 0);
printf("%s\n", str);
env->ReleaseStringUTFChars(msg, str);
// Entry point
BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
switch(ul_reason_for_call)
case DLL_PROCESS_ATTACH:
return TRUE;
case DLL_PROCESS_DETACH:
return TRUE;
return TRUE;
} -
Skype crashes after answering call in windows 8.1
My skype crashes after I answer a skype call in my brand new computer.
Intel core i7 4790
Amd radeon 255 2 gb
8 gb ram
i'll leave my dxdiag file here.. please help me..
Attachments:
DxDiag.zip 12 KBUninstall the currently installed Skype version and install the 6.14.0.104 version using the download links provided here:
http://community.skype.com/t5/Windows-desktop-client/ASUS-USB2-0-Webcam-not-recognized-by-Skype-6-18...
Make sure to disable automatic updates:
Tools -> Options -> Advanced -> Automatic updates ->Turn off automatic updates -
LabVIEW crashing when running NI-DSP VI on Windows XP
I am in the process of upgrading a software application from LabVIEW 3.1 on Windows 3.11 to LabVIEW 7.0 on Windows XP with NI-DAQ 7.2. The hardware has been replaced, the relevant hardware change here is from the AT-DSP2200 to the NI-4551.
The source code uses the NI-DSP libraries to control the DSP2200. I can't find any equivalent in the new LabVIEW (and have assumed that there is none, this is all covered in the MAXX now). The source code has been convereted to LabVIEW 7.
When the source code is opened on the Windows XP machine LabVIEW crashes. I've traced to cause of this crash to the NI-DSP code. Whenever I try to open any VI that contains the DSP code it crashes LabVIEW. I think the problem is the CNI call
inside the DSP library. When I try opening the source code on a computer that doesn't have the NI-4551 installed there are no problems.
What is the upgrade from NI-DSP to? Is there a direct mapping of NI-DSP functions to equivalent NI-DAQ ones? How is it that having the hardware plugged in causes a crash even though it shouldn't be accesssed until I run the VI?
Any help would be appreciated.
Thanks.Hello EborLance,
The NI-4551 can use either NI-DAQ or NI-DSA as the driver. If you only have NI-DAQ installed, any program that uses the NI-DSA functions may be crashing.
There is no direct mapping of NI-DAQ functions to NI-DSA functions but you can download and install the NI-DSA driver from the website. Current DSA Drivers
Once you have installed the NI-DSA driver, you should see the functionality you were previously used to and your program should run.
Thanks,
C. Flip
National Instruments -
Call dll function on Windows CE6.0 Device
I am trying to call a dll on a windows CE6.0 device, which is the KEBA KeTop T20techno.
In the "call library function" I added a selfmade WIN32 stub dll and in the build specifications I added the original Windows CE .lib file.
When I try to build an execution I always get the following build error:
THUMB is a missing VI or C file
ARM is a missing VI or C file
Can anyone give me a hand on this issue?Hi Oimel,
Are you sure that the function name and function prototype for both libraries is the same?
Thanks as kudos only -
Labview Crashes after DLL call
HI All,
I am working on to write a wrapper to a dll. The call to dll works fine an returns appropriate values but as soon as i close the VI the LabVIEW dev environment crashes. Any help on avoiding the same. I went through a lot of posts and tried varing the types of data being sent to the dll but still it gets crashed.
the dll function I am using is of the prototype(with C type call convention)
int functionName(Struct *cfg, UCHAR dNumber, UCHAR hTYPE)
The UCHAR varables I am passing as Unsigned 8-bit Integers.
For the structure I have made a cluster and am passing with Adapt to Type and as Handles.
The DLL executes fine and the VI stops too, but as soon as i try to close the VI the dev environment crashes. Please help.
Thanks.
Solved!
Go to Solution.While nathand is right about possible other errors, the Struct that you fail to tell anything about is a big flag pole for something that might be going wrong. Show us the C header declaring the structure and function and attach the VI you created (please no BMP or other image! They do say a picture says more than thousend words, but in the case of a LabVIEW diagram a picture is not enough to show all aspects of a VI, especially things like how the Call Library Node is configured!)
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
Iphone crashes after phone call
My iphone 3gs will crash immediately after completing a phone call. I don't even hit "end call". Crashes as my lower the iphone from my ear. Need to do a reset each time. Any suggestions?
Do you have a case on it?
Try removing it and see if that helps. A case can block the proximity sensor.
You can try a restore as well.
http://manuals.info.apple.com/enUS/iPhone_UserGuide.pdf -
LAbview crashing after long test
Hi,
I was wondering if anyone else has experienced this problem. I am
running a long test (about 6 hours) and I am finding before it gets to
the end, Labview shuts down. It is fine if I run the shorter version of
the test and I am 99% sure it isn't anything in my program since it is
all just repeating the same loop over and over again for different
permutations of data (and since it doesn't crash in one particular
spot).
Any ideas? Suggestions?
Thanks
Jenni
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.Thanks for your reply!
Yes, I did check all of those things that you mentioned and don't think
that any of them really apply. Do you think that it could be because of
insufficient memory and/or Virtual memory since so many resources would
likely be allocated during a long test?
Thanks
jenni
In article <7nmuvd$hsv$[email protected]>,
"Richard Jones" wrote:
> Other things outside of Labview might be causing it.
> Have you checked things like screensavers, automated virus scans, misc
> network activity, bored security guard using PC to surf net after
hours...
> Just some ideas...
>
> [email protected] wrote in message <7nmsid$ppi$[email protected]>...
> >Hi,
> >
> >I was wondering if anyone else has experienced this p
roblem. I am
> >running a long test (about 6 hours) and I am finding before it gets
to
> >the end, Labview shuts down. It is fine if I run the shorter version
of
> >the test and I am 99% sure it isn't anything in my program since it
is
> >all just repeating the same loop over and over again for different
> >permutations of data (and since it doesn't crash in one particular
> >spot).
> >
> >Any ideas? Suggestions?
> >
> >Thanks
> >Jenni
> >
> >
> >Sent via Deja.com http://www.deja.com/
> >Share what you know. Learn what you don't.
>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. -
Iphone crashes after missed calls or not answered calls
Hi,
I have an iphone5, version 6.1.4 and when I don't answer a call, y always found my iphone freeze, crashed!.
You can see the information about the lost call in the screen, but the iphone doesn't work, you can only restart the iphone, but it's so irritating.
I have asked some friends about the behaivor about their iphones and all of them told me that they have the same problem, with iphone4S, IOS7, etc.
This problems starts since IOS 5 upgrade i think.
Please can you help me?
Regards
Hugo RosasDid you do any of the basic troubleshooting steps described in the User Guide?
Restart
Reset
Restore in iTunes using a backup
Restore as a new iPhone, without a backup -
Firefox 19 always crashes after completing download and opening download window
I never had this problem before, it only started after the update to Firefox 19.
After completing a download, FF crashes, when the crash happens FF closes and doesn't give the option to send a report.
I already disabled virus scanning and it didn't solve the problem.
I'm using Windows 8 64 bits.Try to disable hardware acceleration in Firefox.
Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
https://hacks.mozilla.org/2010/09/hardware-acceleration/
THANK YOU A LOT cor-el!!!!!!! :D -
After boot PWMTR64V.dll not found Windows 8.1
After STARTUP I get the following error message on a brand new E440.....There was a problem starting C:\Program Files (x86) Thinkpad \ Utilities \ PWMTR64V.dll. The specified module could not be found.
How do I get rid of this error message. Took a look at the registry but could not locate key to delete and in windows 8.1 there doesn't seem to be a Lenovo power manager program to install as in windows 7. What are my options here? Thanks?For general advice see Troubleshooting issues with iTunes for Windows updates.
The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
The further information area has direct links to the current and recent builds in case you have problems downloading, need to revert to an older version or want to try the iTunes for Windows (64-bit - for older video cards) release as a workaround for installation or performance issues, or compatibility with QuickTime or third party software.
Your library should be unaffected by these steps but there are also links to backup and recovery advice should it be needed.
tt2 -
Illustrator crashes after starting (Adobe CC 17.1)(Windows 8.1)
installed all of the adobe CC apps and all of them work fine except Illustrator. Every time I open it I get that Adobe Illustrator has stopped working. If I click on more info I get this:
Problem Event Name:
APPCRASH
Application Name:
Illustrator.exe
Application Version:
17.0.0.256
Application Timestamp:
51a87a49
Fault Module Name:
Illustrator.exe
Fault Module Version:
17.0.0.256
Fault Module Timestamp:
51a87a49
Exception Code:
c0000005
Exception Offset:
00000000009e13d1
OS Version:
6.1.7601.2.1.0.256.48
Locale ID:
1033
Additional Information 1:
011a
Additional Information 2:
011a440ee6852bb0901c1a4e3564f8ee
Additional Information 3:
3919
Additional Information 4:
3919f6cb69012a301f132517587d5505
I am running Windows 8.1, but previously had Professional SP1 with a 2.7GHZ six core processor, 16 gigs ram, and a Geforce 560 graphics card. It wouldn't work on either OS. I have tried removing the read only property, complete uninstall reinstall, and disabling the graphics card and launching.I realize the event info I posted was from when I copied it from windows 7. Here's the new event viewer information.
Illustrator.exe
17.1.0.273
52b328f5
Illustrator.exe
17.1.0.273
52b328f5
c0000005
0000000000e6bb81
119c
01cf287d35916246
C:\Program Files\Adobe\Adobe Illustrator CC (64 Bit)\Support Files\Contents\Windows\Illustrator.exe
C:\Program Files\Adobe\Adobe Illustrator CC (64 Bit)\Support Files\Contents\Windows\Illustrator.exe
b71564c2-9470-11e3-828b-f46d04ee0e06
Maybe you are looking for
-
Error while registration of SAPCCM4X in solman live system
Dear All, Please help. I want to CCMS configuration in SOLMAN system(cenntarl monitoring system) I have done almost all prerequistes well but while registration of SAPCCMS4X i m getting below error in SOLMAN prod system ERROR: cannot open config file
-
Form.Location being ignored on second monitor
Hi all! I have a form, and I'm trying to set the Location to a saved (previous) location. It seems to work fine for the primary monitor, but it is completely ignored for the secondary monitor, and the window is instead being places in the center of t
-
How do I get the...
How do I get the Finder window to always open in the same location on my desktop no matter what? Example: Every time I double click on the "Macintosh HD" I want the window to be in the same location and same size as it was before. Even after a comple
-
Hi all, I have a small problem here that I've been trying to resolve for some time and couldn't come with a solution that "feels right". i'm working on a finance application where we have a table to keep a history of customer's transactions. The prob
-
I WANT TO PREVENT CERTAIN SITE FROM AUTOMATICALLY OPENING
Certain web site and pop-up windows keep opening: the web site open on a new page. Te do this without my request or consent. How can I stop them doing this - I know the web sites' addresses?