LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Debug Assertion failed in LabVIEW.exe

Highlighted

I have a demo VI which calls several of our library VIs, which are wrappers (using Call library function nodes) for our DLLs.  We actually have the VI call a LabWindows/CVI DLL which calls a Microsoft Visual Studio DLL compiled on my computer.

 

I have attached the error I am getting from LabVIEW.

 

Now, since I have a Microsoft DLL underneath this, my first suspicion should be that it is a problem inside that DLL.  What is confusing me is that the path f:\dd\vctools\crt_bld etc.  does not exist on my computer, where I compiled the Microsoft DLL.

 

Any ideas of what direction I should be looking in?

 

Thank you.

Batya

 

 

 

 

0 Kudos
Message 1 of 5
(1,463 Views)

The assertion failure is thrown by one of the standard C++ library functions with invalid parameter(s). Run it in a debugger, and you should be able to determine which call it is. If you press Retry when the error pops up, you'll be put in the debugger.

 

Additionally, since this is a Visual Studio C++ error, you may find more information on other forums like StackOverflow or C++ Forum, where there are users that work more closely with Visual Basic.

Taylor B.
National Instruments
0 Kudos
Message 2 of 5
(1,419 Views)

@TBirkulosis wrote:

The assertion failure is thrown by one of the standard C++ library functions with invalid parameter(s). Run it in a debugger, and you should be able to determine which call it is. If you press Retry when the error pops up, you'll be put in the debugger.

 


I also thought that I could press Retry and go into the debugger, but it did not work.  I press Retry and just get the same message box again.  This surprised me.

 


 

Additionally, since this is a Visual Studio C++ error, you may find more information on other forums like StackOverflow or C++ Forum, where there are users that work more closely with Visual Basic.


 

The assertion is from Visual Studio C++, but the error is unlikely to be from something in Visual Studio.  It is indicating that a programmer who used the standard library functions has an error in his or her code (or, even possibly, mine Smiley Surprised).  The error itself appears to be saying that someone passed fprintf a NULL pointer as the string input.

 

I am going to try to run Labview.exe from the Visual Studio debugger, to see if I can break into our code.

 

Thank you.

Batya

 

 

0 Kudos
Message 3 of 5
(1,387 Views)

Another interesting piece of the puzzle is that it seems to be timing or number of repetitions related.  I thought I could step through or VIs (or use highlight execution) and see which of our VIs (or its underlying function in the DLL) is giving the error.  But if I use breakpoints or highlight execution, I don't see the crash.  I have two VIs in a loop; it is apparently one of them.  But either running it slowly prevents it, or it has to run a great many times before the crash and thus I don't see it when I slow things down....

 

Batya

0 Kudos
Message 4 of 5
(1,386 Views)

If it does take many iterations for the error to occur, then highlight execution may be too slow. Breakpoints will still work. Since the error is thrown by Visual Studio, it's likely one of the calls to the Visual Studio DLL, possibly from the LabWindows/CVI DLLs (based on your original post). I suggest enabling debugging for the DLLs.

 

Form the LabWindows/CVI Help Manual, there is a page about Debugging DLLs. Verify that the build is in Debug mode. Then, you can set breakpoints within the DLL. LabWindows/CVI needs to be open for the debug mode and breakpoints to work when running the calling LabVIEW code.

 

Step 5 of this NI Article Writing Win32 Dynamic Link Libraries (DLLs) and Calling Them from LabVIEW says this about debugging Visual Studio DLLs:

"Another troubleshooting option is to try to debug your DLL by using the source level debugger provided with your compiler. In Microsoft Visual C++ 2005, you can set in the Build»Settings»Debug section, Executable for Debug session as labview.exe to debug your DLL. See Using Visual Studio to Debug an Assembly in LabVIEW for detailed instructions about how to troubleshoot an assembly.  For even more information on debugging, please refer to the appropriate manual for your compiler."

Taylor B.
National Instruments
0 Kudos
Message 5 of 5
(1,303 Views)