Hi,
I am using the Plotscaledintensity() function in my application code, running on CVI 7.1. To create the ColorMapArray, I need to perform the following operation: I get a General 'Protection Fault' failure and the application terminates.
Following is the code:
typedef struct
{
ColorMapEntry *colormaparray;
int numberofColors;
int HiColor;
}colormapstruct;
colormapstruct *colormaprec;
colormaprec->HiColor = 0x0;
colormaprec->numberofColors = 7;
// PGM FAILS WHEN THE COLOR VARIABLE IS INPUT WITH VALUES: FOLLOWING LINES OF CODES
colormaprec->colormaparray[0].color = 0xff00ff; //VIOLET
colormaprec->colormaparray[1].color = 0x800080; //INDIGO
colormaprec->colormaparray[2].color = 0x0000ff; //BLUE
colormaprec->colormaparray[3].color = 0x00ff00; //GREEN
colormaprec->colormaparray[4].color = 0xffff00; //YELLOW
colormaprec->colormaparray[5].color = 0xff8000; //ORANGE
colormaprec->colormaparray[6].color = 0xff0000; //RED
The Error that I receive:
FATAL RUN-TIME ERROR: "commontribo.c", line 9231, col 5, thread id 0x00000E28: The program has caused a 'General Protection' fault at 001B:004CB3FB.
Same piece of code worked fine in CVI 6.0 environment.
Any suggestions..???
- Dwivedi