Camera Histogram Calibration (fAutoCalibration.dll)

Debug notes

AutoCalibration.cpp

Why is it when I add one or more of these to AutoCalibration.h:

double min_gain;
double max_gain;
double min_inttime;
double max_inttime;

fAutoCalibration.cpp fails at the last line of the following excerpt, trying to allocate memory (new.cpp)?:

BOOL AllocateRingBuf(FilterState *pState)
{
	pState->Settings.nRingSize = max(1, pState->Settings.nRingSize);
 
	//PDWORD * temp = new PDWORD[3];
	pState->pRingBuf = new PDWORD[pState->Settings.nRingSize];

It fails even if I don't create those min/max vars, but instead allocate another PDWORD as seen above with PDWORD * temp = new PDWORD[3]; Or create any pointer: double * k = new double; Memory allocation fails, why?