Open-Systems-Pharmacology / MoBi

MoBi® is a software tool for multiscale physiological modeling and simulation
Other
31 stars 10 forks source link

Exception when trying to rename a simulation #1563

Closed PavelBal closed 1 month ago

PavelBal commented 1 month ago

PregnancyModel_bug.zip

From the attached project, try to rename the simulation "Pregnant":

Application: MoBi® 12.0.340

Object reference not set to an instance of an object.

Stack trace:

at MoBi.Core.Commands.BuildingBlockChangeCommandBase`1.get_WillConvertPKSimModuleToExtensionModule()
   at MoBi.Core.Domain.Model.MoBiContext.PromptForCancellation(ICommand command)
   at OSPSuite.Utility.Extensions.EnumerableExtensions.Each[T](IEnumerable`1 list, Action`1 action)
   at MoBi.Core.Domain.Model.MoBiContext.PromptForCancellation(ICommand command)
   at MoBi.Core.Extensions.MoBiCommandExtensions.RunCommand[T,TExecutionContext](T command, TExecutionContext context)
   at MoBi.Presentation.Tasks.Edit.EditTaskFor`1.rename(T objectBase, IEnumerable`1 forbiddenNames, IBuildingBlock buildingBlock)
   at MoBi.Presentation.Tasks.Edit.EditTaskFor`1.Rename(T objectBase, IEnumerable`1 existingObjectsInParent, IBuildingBlock buildingBlock)
   at MoBi.Presentation.Tasks.Edit.EditTasksForSimulation.Rename(IMoBiSimulation simulationToRename, IEnumerable`1 existingObjectsInParent, IBuildingBlock buildingBlock)
   at MoBi.Presentation.UICommand.RenameSimulationUICommand.PerformExecute()
   at OSPSuite.Presentation.UICommands.ObjectUICommand`1.Execute()
   at OSPSuite.Presentation.UICommands.UICommandExtensions.ExecuteWithinExceptionHandler(IUICommand uiCommand, IEventPublisher eventPublisher, IChangePropagator changePropagator)

What does the "conversion of PK-Sim to Extension Module" have to do with simulation renaming?

rwmcintosh commented 1 month ago

That's a problem with the hierarchy of commands. I will fix the symptoms, but the cure might be costly.

PavelBal commented 1 month ago

Same exception when I try to rename the extension module "HUMAN - Maternal Structur includinge fetal placenta".