fundacion-sadosky / genis

GENis
https://www.fundacionsadosky.org.ar/genis/
GNU Affero General Public License v3.0
7 stars 3 forks source link

Error while trying to check pedigree consistency on malformed pedigree #77

Closed javieriserte closed 9 months ago

javieriserte commented 9 months ago

Here a summary of the error log:

[ERROR] 2023-11-28 12:58:48,488 [play-akka.actor.default-dispatcher-1612] play: Cannot invoke the action, eventually got an error: java.util.NoSuchElementException: key not found: PI1 [ERROR] 2023-11-28 12:58:48,490 [play-akka.actor.default-dispatcher-1612] application:

! @83kopgagi - Internal server error, for (POST) [/pedcheck?pedigreeId=4&idCourtCase=1] ->

play.api.Application$$anon$1: Execution exception[[NoSuchElementException: key not found: PI1]] at play.api.Application$class.handleError(Application.scala:296) ~[com.typesafe.play.play_2.11-2.3.10.jar:2.3.10] at play.api.DefaultApplication.handleError(Application.scala:402) [com.typesafe.play.play_2.11-2.3.10.jar:2.3.10] at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [com.typesafe.play.play_2.11-2.3.10.jar:2.3.10] at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [com.typesafe.play.play_2.11-2.3.10.jar:2.3.10] at scala.Option.map(Option.scala:146) [org.scala-lang.scala-library-2.11.11.jar:na] at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3.applyOrElse(PlayDefaultUpstreamHandler.scala:320) [com.typesafe.play.play_2.11-2.3.10.jar:2.3.10] at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3.applyOrElse(PlayDefaultUpstreamHandler.scala:316) [com.typesafe.play.play_2.11-2.3.10.jar:2.3.10] at scala.concurrent.Future$$anonfun$recoverWith$1.apply(Future.scala:346) [org.scala-lang.scala-library-2.11.11.jar:na] at scala.concurrent.Future$$anonfun$recoverWith$1.apply(Future.scala:345) [org.scala-lang.scala-library-2.11.11.jar:na] at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:36) [org.scala-lang.scala-library-2.11.11.jar:na] at play.api.libs.iteratee.Execution$trampoline$.execute(Execution.scala:46) [com.typesafe.play.play-iteratees_2.11-2.3.10.jar:2.3.10] at scala.concurrent.impl.CallbackRunnable.executeWithValue(Promise.scala:44) [org.scala-lang.scala-library-2.11.11.jar:na] at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:252) [org.scala-lang.scala-library-2.11.11.jar:na] at scala.concurrent.Promise$class.complete(Promise.scala:55) [org.scala-lang.scala-library-2.11.11.jar:na] at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:157) [org.scala-lang.scala-library-2.11.11.jar:na] at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:237) [org.scala-lang.scala-library-2.11.11.jar:na] at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:237) [org.scala-lang.scala-library-2.11.11.jar:na] at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:36) [org.scala-lang.scala-library-2.11.11.jar:na] at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55) [com.typesafe.akka.akka-actor_2.11-2.3.13.jar:na] at akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:91) [com.typesafe.akka.akka-actor_2.11-2.3.13.jar:na] at akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91) [com.typesafe.akka.akka-actor_2.11-2.3.13.jar:na] at akka.dispatch.BatchingExecutor$BlockableBatch$$anonfun$run$1.apply(BatchingExecutor.scala:91) [com.typesafe.akka.akka-actor_2.11-2.3.13.jar:na] at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72) [org.scala-lang.scala-library-2.11.11.jar:na] at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:90) [com.typesafe.akka.akka-actor_2.11-2.3.13.jar:na] at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40) [com.typesafe.akka.akka-actor_2.11-2.3.13.jar:na] at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397) [com.typesafe.akka.akka-actor_2.11-2.3.13.jar:na] at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) [org.scala-lang.scala-library-2.11.11.jar:na] at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) [org.scala-lang.scala-library-2.11.11.jar:na] at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) [org.scala-lang.scala-library-2.11.11.jar:na] at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) [org.scala-lang.scala-library-2.11.11.jar:na] Caused by: java.util.NoSuchElementException: key not found: PI1 at scala.collection.MapLike$class.default(MapLike.scala:228) ~[org.scala-lang.scala-library-2.11.11.jar:na] at scala.collection.AbstractMap.default(Map.scala:59) ~[org.scala-lang.scala-library-2.11.11.jar:na] definition) at pedigree.PedigreeConsistencyAlgorithm$$anonfun$langeGoradia$1.apply(PedigreeConsistencyAlgorithm.scala:105) ~[ar.org.fundacionsadosky.genis-5.1.11.jar:5.1.11]

javieriserte commented 9 months ago

There was a bug in the implementation of the pedigree consistency check algorithm. When a pedigree has a missing person that has child, an error is produced.

imagen

When the same pedigree is used as input, the error is not thrown.

imagen

The old implementation explicitely searchs for missing persons and avoids using them. This is the cause of the problem.

This was fixed in the commit 4fd2549

The files modified in this issue are: