Open-Systems-Pharmacology / PK-Sim

PK-Sim® is a comprehensive software tool for whole-body physiologically based pharmacokinetic modeling
Other
103 stars 50 forks source link

PK-Sim 7.3 beta: Error "Id lXL0oCyxmEissfeX6aL8oQ not unique" #656

Closed Christoph27 closed 6 years ago

Christoph27 commented 6 years ago

To reproduce:

  1. In simulation “Sol_Tab_1” of attached file : Compounds/Test -> Solubility table -> “Edit Table” -> change solubility at pH 5 -> Run simulation

  2. "Commit to Building Block" (change of solubility of molecule)

  3. At Molecule Building Block for molecule “Test”: Solubility “Table” -> Edit Table -> change solubility at pH 5

  4. Simulation: Update from building block -> Run simulation

  5. Save file and re-open file

  6. Open simulation “Sol_Tab_1”

-> An exception "Id lXL0oCyxmEissfeX6aL8oQ not unique" is thrown and the solubility table and other parameters are gone. ph_Sol.zip

Application: PK-Sim® 7.3.0.9 - EAP

Id lXL0oCyxmEissfeX6aL8oQ not unique

Stack trace:

at OSPSuite.Core.Domain.WithIdRepository.Register(IWithId objectWithId)
   at OSPSuite.Core.Serialization.Xml.SerializationContext.Register(IWithId withId)
   at OSPSuite.Core.Serialization.Xml.ObjectBaseXmlSerializer`1.TypedDeserialize(T objectToDeserialize, XElement outputToDeserialize, SerializationContext serializationContext)
   at OSPSuite.Core.Serialization.Xml.TableFormulaXmlSerializerBase`1.TypedDeserialize(TFormula tableFormula, XElement formulaElement, SerializationContext serializationContext)
   at OSPSuite.Serializer.Xml.XmlSerializer`2.Deserialize(XElement outputToDeserialize, TContext context)
   at OSPSuite.Serializer.Xml.XmlSerializer`2.Deserialize[T](XElement outputToDeserialize, TContext context)
   at OSPSuite.Serializer.Xml.XmlEnumerationNodeMapper`3.valueFromChildNode(XElement childElement, TContext context)
   at OSPSuite.Serializer.Xml.XmlEnumerationNodeMapper`3.Deserialize(TObject objectToDeserialize, XElement element, TContext context)
   at OSPSuite.Serializer.Xml.XmlSerializer`2.TypedDeserialize(TObject objectToDeserialize, XElement outputToDeserialize, TContext context)
   at OSPSuite.Core.Serialization.Xml.FormulaCacheXmlSerializer.TypedDeserialize(FormulaCache formulaCache, XElement formulaCacheNode, SerializationContext serializationContext)
   at OSPSuite.Serializer.Xml.XmlSerializer`2.Deserialize(XElement outputToDeserialize, TContext context)
   at OSPSuite.Serializer.Xml.XmlSerializer`2.Deserialize[T](XElement outputToDeserialize, TContext context)
   at OSPSuite.Core.Serialization.Xml.Extensions.XmlSerializerRepositoryExtensions.DeserializeFormulaCacheIn(IXmlSerializerRepository`1 serializerRepository, XElement element, SerializationContext serializationContext)
   at PKSim.Infrastructure.Serialization.Xml.Serializers.BuildingBlockXmlSerializer`1.TypedDeserialize(T buildingBlock, XElement element, SerializationContext serializationContext)
   at OSPSuite.Serializer.Xml.XmlSerializer`2.Deserialize(XElement outputToDeserialize, TContext context)
   at OSPSuite.Serializer.Xml.XmlSerializer`2.Deserialize[T](XElement outputToDeserialize, TContext context)
   at PKSim.Infrastructure.Serialization.Xml.Serializers.UsedBuildingBlockXmlSerializer.TypedDeserialize(UsedBuildingBlock usedBuildingBlock, XElement usedBuildingBlockNode, SerializationContext context)
   at OSPSuite.Serializer.Xml.XmlSerializer`2.Deserialize(XElement outputToDeserialize, TContext context)
   at OSPSuite.Serializer.Xml.XmlSerializer`2.Deserialize[T](XElement outputToDeserialize, TContext context)
   at OSPSuite.Serializer.Xml.XmlEnumerationNodeMapper`3.valueFromChildNode(XElement childElement, TContext context)
   at OSPSuite.Serializer.Xml.XmlEnumerationNodeMapper`3.Deserialize(TObject objectToDeserialize, XElement element, TContext context)
   at OSPSuite.Serializer.Xml.XmlSerializer`2.TypedDeserialize(TObject objectToDeserialize, XElement outputToDeserialize, TContext context)
   at OSPSuite.Core.Serialization.Xml.ObjectBaseXmlSerializer`1.TypedDeserialize(T objectToDeserialize, XElement outputToDeserialize, SerializationContext serializationContext)
   at PKSim.Infrastructure.Serialization.Xml.Serializers.BuildingBlockXmlSerializer`1.TypedDeserialize(T buildingBlock, XElement element, SerializationContext serializationContext)
   at PKSim.Infrastructure.Serialization.Xml.Serializers.SimulationXmlSerializer`1.TypedDeserialize(TSimulation simulation, XElement simulationElement, SerializationContext context)
   at OSPSuite.Serializer.Xml.XmlSerializer`2.Deserialize(Object objectToDeserialize, XElement outputToDeserialize, TContext context)
   at PKSim.Infrastructure.Serialization.Xml.XmlReader`1.ReadFrom(T objectToRead, XElement element, SerializationContext serializationContext)
   at PKSim.Infrastructure.Serialization.Xml.XmlSerializationManager.Deserialize[TObject](TObject objectToDeserialize, Byte[] serializationBytes, SerializationContext serializationContext)
   at PKSim.Core.Services.CompressedSerializationManager.Deserialize[TObject](TObject objectToDeserialize, Byte[] serializationBytes, SerializationContext serializationContext)
   at PKSim.Infrastructure.Services.ContentLoader.LoadContentFor[T](T objectToLoad)
   at PKSim.Infrastructure.Services.LazyLoadTask.loadObjectBase[T](T objectToLoad)
   at PKSim.Infrastructure.Services.LazyLoadTask.Load[TObject](TObject objectToLoad)
   at PKSim.Presentation.Core.SingleStartPresenterTask.<>c__DisplayClass5_0`1.<StartForSubject>b__0()
   at OSPSuite.Presentation.Services.HeavyWorkManager.doWork()
   at OSPSuite.Presentation.Services.HeavyWorkManager.<.ctor>b__9_1(Object o, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
msevestre commented 6 years ago

I can reproduce with only

  1. In simulation “Sol_Tab_1” of attached file : Compounds/Test -> Solubility table -> “Edit Table” -> change solubility at pH 5 -> Run simulation

  2. "Commit to Building Block" (change of solubility of molecule)

then

  1. Save and load

Well done @Christoph27

msevestre commented 6 years ago

Actually even smaller

  1. In simulation “Sol_Tab_1” of attached file : Compounds/Test -> Solubility table -> “Edit Table” -> change solubility at pH 5 -

Save and load