Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error configuring Simulation when removing concentrations to simulate in Define Settings and Run #2988

Open
nguyen-tranbach opened this issue Oct 6, 2024 · 3 comments

Comments

@nguyen-tranbach
Copy link

Application:
PK-Sim® 11.3.208

Object reference not set to an instance of an object.

Stack trace:

at OSPSuite.Core.Domain.SimulationQuantitySelection.Clone()
   at OSPSuite.Core.Domain.OutputMapping.Clone()
   at OSPSuite.Core.Domain.OutputMappings.<>c.<UpdatePropertiesFrom>b__1_0(OutputMapping x)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at OSPSuite.Core.Domain.OutputMappings.UpdatePropertiesFrom(IUpdatable source, ICloneManager cloneManager)
   at PKSim.Core.Model.Simulation.UpdatePropertiesFrom(IUpdatable sourceObject, ICloneManager cloneManager)
   at OSPSuite.Core.Domain.Services.CloneManagerStrategy.Clone[T](T objectToClone)
   at PKSim.Core.Services.Cloner.createClone[T](T objectToClone, ICloneManager cloneManager)
   at PKSim.Core.Services.Cloner.CloneForModel[T](T objectToClone)
   at PKSim.Presentation.Presenters.Simulations.ConfigureSimulationPresenterBase`1.createSimulationToConfigureBasedOn()
   at PKSim.Presentation.Presenters.Simulations.ConfigureSimulationPresenterBase`1.configureSimulation(Simulation simulation, ISubPresenterItem subPresenterItem, Action actionToPerformBeforeDisplayingView)
   at PKSim.Presentation.Presenters.Simulations.ConfigureSimulationPresenterBase`1.ConfigureSimulation(Simulation simulation)
   at PKSim.Presentation.Services.ConfigureSimulationTask.<>c__DisplayClass8_0.<Configure>b__0(IConfigureSimulationPresenter x)
   at PKSim.Presentation.Services.ConfigureSimulationTask.configure(Simulation simulationToConfigure, Func`2 configureAction)
   at PKSim.Presentation.Services.ConfigureSimulationTask.Configure(Simulation simulationToConfigure)
   at PKSim.Presentation.UICommands.ConfigureSimulationCommand.PerformExecute()
   at OSPSuite.Presentation.UICommands.ObjectUICommand`1.Execute()
   at OSPSuite.Presentation.UICommands.UICommandExtensions.ExecuteWithinExceptionHandler(IUICommand uiCommand, IEventPublisher eventPublisher, IChangePropagator changePropagator)

I had to remove the simulation and create a new one.

@rwmcintosh
Copy link
Member

It was a simulation you created previously and were trying to reconfigure?

@rwmcintosh
Copy link
Member

ok, probably cloning it.

@rwmcintosh
Copy link
Member

This happened because an output mapping between an output and observation is created for a simulation in PK-Sim, then the output is removed from the simulation outputs.

I'll fix the issue for the future, but if it happens again you can open the simulation and remove/recreate the mappings, or add the output to the simulation, then remove the mapping, then remove the output again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants