Open AndreDlm opened 4 years ago
I think it has nothing to do with the MoBi simulations (in your project they are not part of the PI anyway). It's something in the PI itself which prevents importing it from the snapshot
There is no way that the simulation can be recreated from snapshot. An error/warning should be shown when exporting to snapshot that the project won't be valid anymore
As long as MoBi simulations are part of the project, Export to snapshot stops with an error (as expected). After 2 MoBi simulations are removed from the project, it can be exported to snapshot, but reimport crashes during recreation of PI.
Oh I see. Is it possible to delete a normal simulation from a project when used in a PI? (E.g would we have the same behavior when taking Mobi out if the picture?)
If yes the snapshot reimport needs to be more resilient
Following the subsequently described workflow, PK-Sim throws the error message below. I am not sure how to interpret it and where the error is exactly located. What I did is:
Information: Loading Project from snapshot file 'C:\Projects\GitHub\Erythromycin.json' Error: Object reference not set to an instance of an object.
Stack trace: at OSPSuite.Core.Domain.Services.ParameterIdentifications.IdentificationParameterFactory.<>c.b__8_0(IParameter x)
at System.Linq.Enumerable.WhereSelectListIteratord9d 8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiterd16d 15d17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at PKSim.Presentation.Presenters.Snapshots.LoadProjectFromSnapshotPresenter.d 4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiterd19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at PKSim.Presentation.Presenters.Snapshots.LoadFromSnapshotPresenter`1.d 14.MoveNext()
2.MoveNext() at System.Linq.Enumerable.<DistinctIterator>d__64
1.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable
1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at OSPSuite.Core.Domain.Services.ParameterIdentifications.IdentificationParameterFactory.ensureThatDimensionsAreEqual(IEnumerable
1 parameters) at OSPSuite.Core.Domain.Services.ParameterIdentifications.IdentificationParameterFactory.CreateFor(IEnumerable1 parameterSelections, ParameterIdentification parameterIdentification) at PKSim.Core.Snapshots.Mappers.IdentificationParameterMapper.<MapToModel>d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult() at PKSim.Core.Snapshots.Mappers.SnapshotMapperBaseExtensions.2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult() at PKSim.Core.Snapshots.Mappers.ParameterIdentificationMapper.1.GetResult() at PKSim.Core.Snapshots.Mappers.SnapshotMapperBaseExtensions.<MapTo>d__9
2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at PKSim.Core.Snapshots.Mappers.ProjectMapper.<MapToModel>d__11.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult() at PKSim.Core.Snapshots.Mappers.SnapshotMapperBase2.<MapToModel>d__1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult() at PKSim.Core.Snapshots.Services.SnapshotTask.1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult() at PKSim.Core.Snapshots.Services.SnapshotTask.1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult() at PKSim.Core.Snapshots.Services.SnapshotTask.1.GetResult() at PKSim.Presentation.Presenters.Snapshots.LoadFromSnapshotPresenter
1.