I habe a similar problem with Gatling 2.0.0M3a
The body of foreach is executed in the correct way, but afterwards the following exception occurs
[ERROR] [04/09/2014 11:46:23.697] [GatlingSystem-akka.actor.default-dispatcher-3] [akka://GatlingSystem/user/$c/$a] tail of empty list
java.lang.UnsupportedOperationException: tail of empty list
at scala.collection.immutable.Nil$.tail(List.scala:339)
at scala.collection.immutable.Nil$.tail(List.scala:334)
at io.gatling.core.session.Session.exitInterruptable(Session.scala:105)
at io.gatling.core.action.InnerWhile$$anonfun$3.applyOrElse(While.scala:54)
at io.gatling.core.action.InnerWhile$$anonfun$3.applyOrElse(While.scala:54)
at io.gatling.core.action.InnerWhile.execute(While.scala:68)
at io.gatling.core.action.Action$$anonfun$receive$1.applyOrElse(Action.scala:27)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:425)
at akka.actor.ActorCell.invoke(ActorCell.scala:386)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:230)
at akka.dispatch.Mailbox.run(Mailbox.scala:212)
at akka.dispatch.ForkJoinExecutorConfigurator$MailboxExecutionTask.exec(AbstractDispatcher.scala:506)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
11:46:23.712 [ERROR] i.g.c.a.InnerWhile - Action InnerWhile crashed, forwarding user to next one
java.lang.UnsupportedOperationException: tail of empty list
at scala.collection.immutable.Nil$.tail(List.scala:339) ~[na:na]
at scala.collection.immutable.Nil$.tail(List.scala:334) ~[na:na]
at io.gatling.core.session.Session.exitInterruptable(Session.scala:105) ~[gatling-core-2.0.0.20130628.jar:na]
at io.gatling.core.action.InnerWhile$$anonfun$3.applyOrElse(While.scala:54) ~[gatling-core-2.0.0.20130628.jar:na]
at io.gatling.core.action.InnerWhile$$anonfun$3.applyOrElse(While.scala:54) ~[gatling-core-2.0.0.20130628.jar:na]
at io.gatling.core.action.InnerWhile.execute(While.scala:68) ~[gatling-core-2.0.0.20130628.jar:na]
at io.gatling.core.action.Action$$anonfun$receive$1.applyOrElse(Action.scala:27) ~[gatling-core-2.0.0.20130628.jar:na]
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:425) ~[akka-actor_2.10-2.1.4.jar:na]
at akka.actor.ActorCell.invoke(ActorCell.scala:386) ~[akka-actor_2.10-2.1.4.jar:na]
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:230) ~[akka-actor_2.10-2.1.4.jar:na]
at akka.dispatch.Mailbox.run(Mailbox.scala:212) ~[akka-actor_2.10-2.1.4.jar:na]
at akka.dispatch.ForkJoinExecutorConfigurator$MailboxExecutionTask.exec(AbstractDispatcher.scala:506) [akka-actor_2.10-2.1.4.jar:na]
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [na:na]
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [na:na]
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [na:na]
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [na:na]
– Ulrich