Index: branches/backtrack/ippTools/src/chiptool.c
===================================================================
--- branches/backtrack/ippTools/src/chiptool.c	(revision 13990)
+++ branches/backtrack/ippTools/src/chiptool.c	(revision 13994)
@@ -30,4 +30,5 @@
 #include "pxtools.h"
 #include "pxdata.h"
+
 #include "chiptool.h"
 #include "camtool.h"
@@ -553,4 +554,6 @@
     }
 
+
+
     // XXX I've decided to make the transaction cover the Exp migration as
     // well.  Otherwise, if the last imfile in an exp is moved and the exp
@@ -827,13 +830,18 @@
     }
 
-    // insert into camPendingExp
     for (long i = 0; i < psArrayLength(output); i++) {
         psMetadata *row = output->data[i];
 
         chipRunRow *chipRun = chipRunObjectFromMetadata(row);
-
-        // camQueueChipID() can only be run after the chipProcessedExp entry
-        // has been inserted.
-        // queue the chip_id in the camPendingExp table
+        // set chipRun.state to 'stop'
+        if (!pxchipRunSetState(config, chipRun->chip_id, "stop")) {
+            psError(PS_ERR_UNKNOWN, false, "failed to change chipRun.state for chip_id: %" PRId64, chipRun->chip_id);
+            psFree(chipRun);
+            psFree(output);
+            return false;
+        }
+
+        // camQueueChipID() can only be run after chipRun.state has been set to
+        // stop
         if (!camQueueChipID(config,
                     chipRun->chip_id,
