The following problem occurred inside a program I have written. I will try to explain it in a short version of the whole program:
I have a control-Callback for a button where i wait for EVENT_COMMIT. If i press the button I call a function where I handle different things. Inside of this function there is a Fmt() command where i get a General Protection Fault.
In short it looks like this:
int CVICALLBACK Main_CALLBACK_Test (int panel, int control, int event, void *callbackData, int eventData1, int eventData2)
{
if(event == EVENT_COMMIT)
{
if(control == MAIN_Start)
{
Function_Call();
}
}
return 0;
}
void Function_Call (void)
{
char cDummy [50] = {0};
Fmt(cDummy, "%s<%s", "Test for Text message");
}
This behavior does not only happen with the Fmt(). I also get errors with for example SetCtrlVal commands or whole function calls. All of these errors only occur, if the code is inside of a function. If I put it outside, everything works fine. The function itself is declared in an .h-file which I include in the main-program.
Please someone help me with this issue.
My System is Windows 10 with CVI 19.0.0