LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

querry: calling c code through labview

Plz guide me regarding this problem....
I have called a C program using call library function node...that C
program reads some data from a file ....on doing so I encounter an
error during run time which says

debug assertion failed
program:\c:\program files\NI\labview7.1\lv.exe
File Fclose.c
line 58
expression : stream != NULL

then i get a message to retry cancel or abort
on retrying it shows send error message to microsoft
after all this when i try running my C file simply it shows file
cannot be opened
and now i cant open any file through a C program even those which were
running smoothly earlier...
Why is this happening and how can this be resolved.....
thanks.........aparna

0 Kudos
Message 1 of 3
(2,847 Views)


@Anonymous wrote:
Plz guide me regarding this problem....
I have called a C program using call library function node...that C
program reads some data from a file ....on doing so I encounter an
error during run time which says

debug assertion failed
program:\c:\program files\NI\labview7.1\lv.exe
File Fclose.c
line 58
expression : stream != NULL

then i get a message to retry cancel or abort
on retrying it shows send error message to microsoft
after all this when i try running my C file simply it shows file
cannot be opened
and now i cant open any file through a C program even those which were
running smoothly earlier...
Why is this happening and how can this be resolved.....
thanks.........aparna



It's very simple. Your C program does an illegal operation that the C runtime libraries report with an exception. This exception gets catched by LabVIEW but all LabVIEW can do is inform you about it, as the exception could potentially have corrupted memory or the entire process environment LabVIEW is running in. When you decide to ignore it, LabVIEW continues and the system protection further down the exception chain comes to see it and decides that the application has performed an illegal operation and must be shut down.

The problem is definitely not LabVIEW but your C code or the way you call it from LabVIEW.

Rolf Kalbermatter

Message Edited by rolfk on 05-10-2007 04:13 PM

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 3
(2,841 Views)

>> It's very simple. Your C program does an illegal operation that the C runtime libraries report with an exception. This exception gets catched by LabVIEW but all LabVIEW can do is inform you about it, as the exception could potentially have corrupted memory or the entire process environment LabVIEW is running in. When you decide to ignore it, LabVIEW continues and the system protection further down the exception chain comes to see it and decides that the application has performed an illegal operation and must be shut down.
> The problem is definitely not LabVIEW but your C code or the way you call it from LabVIEW.
> Rolf KalbermatterMessage Edited by rolfk on 05-10-2007 04:13 PM

Thanks Rolf

Its seems simpler to you as you are a master I suppose of labview but
things arent that simple for a learner.
Please can you tell me, is that possible , that the C file we are
calling can inturn call other files say text files...
Regarding my program,my C code was executing normally before I called
it in labview using call function node.
My labview panel didnt show the broken arrow but the error on being
executed...My Labview is working fine but not the C programs .I will
reload the C compiler to solve the corrupted memory problem . But the
problem remains the same the error will again be produced corrupting
its memory again. My C program isnt wrong Because it works well before
being called by labview..Other labview programs which are calling
simple C files still work well .
So How should I proceed towards solving this problem...



0 Kudos
Message 3 of 3
(2,812 Views)