02-17-2022 09:58 PM
Program is crashing during the execution of this function. When tried in debug mode found that its crashing during the Fillbytes function.
( FillBytes(readback, 0, 2, 0x00); )
int test_1_041_av850(tData *data)
{
char readback[2];
TestComplete[1][5]=1;
if (TEST_RUN_MODE == PARTIAL_TEST)
{
if (TestComplete[1][4] == 0) test_1_040_av850 (&dummy);
}
// SetCtrlVal(MainPanelHandle,MainPanel_RunTimeMessagesText,"Readback created");
FillBytes(readback, 0, 2, 0x00);
RTIU_Change_Page ("N");
Delay(1.0);
/*if (ConfirmPopup ("",
"Is EMRG MIC RET on video monitor is LOW?"))
data->iMeasurement = 1;
else
data->iMeasurement = 0;*/
SetCtrlVal(MainPanelHandle,MainPanel_RunTimeMessagesText,"Reached RTIU Loc 1_041");
if (RTIU_Read_Loc (36, 9, 1, 1.0, readback) < 0)
return (-1);
SetCtrlVal(MainPanelHandle,MainPanel_RunTimeMessagesText," RTIU Loc Completed 1_041");
if (CompareStrings (readback, 0, "L", 0, 0) == 0)
data->iMeasurement = 1;
else
data->iMeasurement = 0;
return (0);
}
02-19-2022 03:37 AM - edited 02-19-2022 03:38 AM
It's hard to say why the program i crashing with no additional info: you could probably find some detail more in the Event Viewer and try understanding what's happening.
But in the line of simpler-is-better, why don't you define
char readback[2] = { 0, 0 };
or set
readback[0] = 0;
readback[1] = 0;
?