Index: /branches/eam_branches/ipp-pstamp-20260421/psModules/src/camera/pmFPA.c
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/psModules/src/camera/pmFPA.c	(revision 43023)
+++ /branches/eam_branches/ipp-pstamp-20260421/psModules/src/camera/pmFPA.c	(revision 43024)
@@ -166,5 +166,7 @@
     psFree(readout->variance);
     psFree(readout->covariance);
-    psFree(readout->analysis);
+//  psFree(readout->analysis);
+//  EAM XXX : if we free this here, ppSub fails to find the subtraction kernel.
+//  surprisingly, this does not cause leaks in ppSub, ppStack or ppImage
     psFree(readout->bias);
 
@@ -174,7 +176,9 @@
     readout->variance = NULL;
     readout->covariance = NULL;
-    readout->analysis = NULL;
+//  readout->analysis = NULL; EAM see above
     readout->mask = NULL;
     readout->bias = NULL;
+//  readout->bias = psListAlloc(NULL); -- works with this in place
+//  if we allocate the bias list here, we introduce a leak
 
     readout->col0 = 0;
Index: /branches/eam_branches/ipp-pstamp-20260421/psModules/src/camera/pmFPARead.c
===================================================================
--- /branches/eam_branches/ipp-pstamp-20260421/psModules/src/camera/pmFPARead.c	(revision 43023)
+++ /branches/eam_branches/ipp-pstamp-20260421/psModules/src/camera/pmFPARead.c	(revision 43024)
@@ -456,4 +456,9 @@
     // Get the list of overscans: only for IMAGE types (no overscan for MASK and VARIANCE)
     if (type == FPA_READ_TYPE_IMAGE) {
+	// prevent the segfault by testing for readout->bias to exist
+	if (!readout->bias) {
+	    readout->bias = psListAlloc(NULL);
+	}
+	// why would we have a left-over entry on the bias array?
         if (readout->bias->n != 0) {
             // Make way!
@@ -846,7 +851,17 @@
         }
 
+	// XXX EAM: sometimes we arrive here with the array of readouts full
+	// but missing critical pieces??
         pmReadout *readout;             // Readout into which to read
         if (cell->readouts->n > i && cell->readouts->data[i]) {
             readout = psMemIncrRefCounter(cell->readouts->data[i]);
+	    // if we get to this point with a reused readout,
+	    // the analysis and bias entries will be NULL
+	    if (!readout->analysis) {
+		readout->analysis = psMetadataAlloc();
+	    }
+	    if (!readout->bias) {
+		readout->bias = psListAlloc(NULL);
+	    }
         } else {
             readout = pmReadoutAlloc(cell);
