Open-Systems-Pharmacology / OSPSuite.SimModel

Calculation engine for models built with PK-Sim® or MoBi®
Other
4 stars 3 forks source link

Access violation #139

Closed Yuri05 closed 2 years ago

Yuri05 commented 2 years ago

When trying to run the simulation attached: MoBi crashes completely without an error message (both MoBi 10 and 11) EntericCoatedTablet.zip

In the Windows event log there is the error below:

Application: MoBi.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
   at OSPSuite.SimModel.SimulationImports.RunSimulation(IntPtr, Boolean ByRef, Double ByRef, Double ByRef, Boolean ByRef, System.String ByRef)
   at OSPSuite.SimModel.Simulation.RunSimulation()
   at OSPSuite.Core.Domain.Services.SimModelManager.simulate()
   at OSPSuite.Core.Domain.Services.SimModelManager.doIfNotCanceled(System.Action)
   at OSPSuite.Core.Domain.Services.SimModelManager.RunSimulation(OSPSuite.Core.Domain.IModelCoreSimulation, OSPSuite.Core.Domain.SimulationRunOptions)
   at MoBi.Presentation.Tasks.SimulationRunner.startSimulationRun(MoBi.Core.Domain.Model.IMoBiSimulation)
   at MoBi.Presentation.Tasks.SimulationRunner.RunSimulation(MoBi.Core.Domain.Model.IMoBiSimulation, Boolean)
   at MoBi.Presentation.UICommand.RunActiveSimulationCommandBase.Execute()
   at OSPSuite.Presentation.UICommands.UICommandExtensions.ExecuteWithinExceptionHandler(OSPSuite.Presentation.MenuAndBars.IUICommand, OSPSuite.Utility.Events.IEventPublisher, OSPSuite.Core.Services.IChangePropagator)
   at OSPSuite.Presentation.UICommands.UICommandExtensions.ExecuteWithinExceptionHandler(OSPSuite.Presentation.MenuAndBars.IUICommand)
   at OSPSuite.Presentation.MenuAndBars.MenuBarButton.Click()
   at OSPSuite.UI.Mappers.MenuBarButtonToBarItemMapperBase+<>c__DisplayClass1_0.<UpdateBarButtonItem>b__0(System.Object, DevExpress.XtraBars.ItemClickEventArgs)
   at DevExpress.XtraBars.BarItem.OnClick(DevExpress.XtraBars.BarItemLink)
   at DevExpress.XtraBars.BarButtonItem.OnClick(DevExpress.XtraBars.BarItemLink)
   at DevExpress.XtraBars.BarItemLink.OnLinkClick()
   at DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(DevExpress.XtraBars.BarLinkAction, System.Object)
   at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(DevExpress.XtraBars.BarItemLink)
   at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(DevExpress.XtraBars.BarItemLink)
   at DevExpress.XtraBars.Ribbon.Handler.BaseRibbonHandler.OnUnPressItem(DevExpress.Utils.DXMouseEventArgs, DevExpress.XtraBars.Ribbon.ViewInfo.RibbonHitInfo)
   at DevExpress.XtraBars.Ribbon.Handler.BaseRibbonHandler.OnMouseUp(DevExpress.Utils.DXMouseEventArgs)
   at DevExpress.XtraBars.Ribbon.Handler.RibbonHandler.OnMouseUp(DevExpress.Utils.DXMouseEventArgs)
   at DevExpress.XtraBars.Ribbon.RibbonControl.OnMouseUp(System.Windows.Forms.MouseEventArgs)
   at System.Windows.Forms.Control.WmMouseUp(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
   at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
   at DevExpress.Utils.Controls.ControlBase.BaseWndProc(System.Windows.Forms.Message ByRef)
   at DevExpress.XtraBars.Ribbon.RibbonControl.WndProc(System.Windows.Forms.Message ByRef)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
   at DevExpress.Utils.Drawing.Helpers.NativeMethods+UnsafeNativeMethods.DefSubclassProc(IntPtr, IntPtr, IntPtr, IntPtr)
   at DevExpress.Utils.Drawing.Helpers.Win32SubclasserFactory+Win32Subclasser.SubClassProcInner(IntPtr, IntPtr, IntPtr, IntPtr, IntPtr, IntPtr)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef)
   at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
   at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
   at MoBi.UI.Services.MoBiApplication.OnRun()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])
   at MoBi.Program.Main(System.String[])
Yuri05 commented 2 years ago

@andredlm FYI

Yuri05 commented 2 years ago

@AndreDlm The reason for the crash is the const zero formulation:

This will be fixed in V11. To make the project work right now: e.g. change the fraction dose to non-const (because the Dose is zero it does not really matter): grafik

Then: grafik