Index: /tags/ipp-20100525/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
===================================================================
--- /tags/ipp-20100525/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 28134)
+++ /tags/ipp-20100525/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 28135)
@@ -1045,4 +1045,6 @@
     $last_project = $proj_hash->[0];
 
+    $ipprc->define_camera($last_project->{camera});
+
     return $last_project;
 }
@@ -1105,6 +1107,4 @@
     close $pointsList;
 
-    # XXX: need to loop over these
-    # my $run = $runList->[0];
     if (($req_type eq "byid") or ($req_type eq "byexp")) {
         my ($last_tess_id, $tess_dir_abs, $astrom_file) = ("", "", "");
@@ -1114,5 +1114,15 @@
                 # XXX: use file rule and handle cameras where the astrometry is solved at
                 # the chip stage.
-                $astrom_file = $run->{cam_path_base} . ".smf";
+                my $cam_path_base = $run->{cam_path_base};
+                if ($cam_path_base) {
+                    $astrom_file = $run->{cam_path_base} . ".smf";
+                } else {
+                    if (! find_astrometry($ipprc, $imagedb, $run, $verbose) ) {
+                        setErrorCodes($rowList, $PSTAMP_NOT_AVAILABLE);
+                        next;
+                    }
+                    $cam_path_base = $run->{cam_path_base};
+                    $astrom_file = $run->{astrom_file};
+                }
                 my $astrom_file_resolved = $ipprc->file_resolve($astrom_file);
                 if (!$astrom_file_resolved) {
Index: /tags/ipp-20100525/pstamp/scripts/pstamp_checkdependent.pl
===================================================================
--- /tags/ipp-20100525/pstamp/scripts/pstamp_checkdependent.pl	(revision 28134)
+++ /tags/ipp-20100525/pstamp/scripts/pstamp_checkdependent.pl	(revision 28135)
@@ -299,6 +299,15 @@
         my $command = "$warptool -scmap -warp_id $warp_id -skycell_id $skycell_id";
         my $data = runToolAndParse($command, $verbose);
-        my_die("failed to find warpSkyCelllMap for warpRun $warp_id skycell_id $skycell_id", $PS_EXIT_UNKNOWN_ERROR)
-            if !$data or scalar @$data == 0;
+        if (!$data or scalar @$data == 0) {
+            # This happens if the chipProcessedImfile disappears which happened when earlier
+            # versions of chiptool -revertprocessedimfile didn't check the chipRun.state before
+            # deleing the row. 
+            # Fault the jobs so that the Request can finish ...
+            faultJobs('stop', undef, undef, $PSTAMP_GONE);
+            # ... and fault the dependent so that we have a record of the error
+            my_die("failed to find warpSkyCelllMap for warpRun $warp_id skycell_id $skycell_id",
+                $PS_EXIT_DATA_ERROR);
+        }
+
 
         my $chips_ready = 1;
