Open-Systems-Pharmacology / PK-Sim

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

I can't save my PKsim project (PKsim 8.0) #1493

Closed Nathalie06 closed 3 years ago

Nathalie06 commented 4 years ago

Hello,

I am a new PKsim's user and when I tried to save my first and successful PBPK model, I have an error message, I copied this message below. I have 8 individual simulations and 2 population simulations. Is there a limit of size ?

Can you help me ? Best, Nathalie

Application: PK-Sim® 8.0.22

could not load an entity: [OSPSuite.Infrastructure.Serialization.ORM.MetaData.MetaDataContent#147][SQL: SELECT metadataco0_.Id as id1_180, metadataco0_.Data as data2_180 FROM CONTENTS metadataco0 WHERE metadataco0.Id=?]

database disk image is malformed database disk image is malformed

Stack trace:

at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)
   at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
   at System.Data.SQLite.SQLiteDataReader.NextResult()
   at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
   at NHibernate.AdoNet.AbstractBatcher.ExecuteReader(DbCommand cmd)
   at NHibernate.Loader.Loader.GetResultSet(DbCommand st, QueryParameters queryParameters, ISessionImplementor session, IResultTransformer forcedResultTransformer)
   at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies, IResultTransformer forcedResultTransformer)
   at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies, IResultTransformer forcedResultTransformer)
   at NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session, Object id, IType identifierType, Object optionalObject, String optionalEntityName, Object optionalIdentifier, IEntityPersister persister)
 --- End of inner exception stack trace ---
   at NHibernate.Loader.Loader.LoadEntity(ISessionImplementor session, Object id, IType identifierType, Object optionalObject, String optionalEntityName, Object optionalIdentifier, IEntityPersister persister)
   at NHibernate.Loader.Entity.AbstractEntityLoader.Load(ISessionImplementor session, Object id, Object optionalObject, Object optionalId)
   at NHibernate.Loader.Entity.AbstractEntityLoader.Load(Object id, Object optionalObject, ISessionImplementor session)
   at NHibernate.Persister.Entity.AbstractEntityPersister.Load(Object id, Object optionalObject, LockMode lockMode, ISessionImplementor session)
   at NHibernate.Event.Default.DefaultLoadEventListener.LoadFromDatasource(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options)
   at NHibernate.Event.Default.DefaultLoadEventListener.DoLoad(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options)
   at NHibernate.Event.Default.DefaultLoadEventListener.Load(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options)
   at NHibernate.Event.Default.DefaultLoadEventListener.OnLoad(LoadEvent event, LoadType loadType)
   at NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event, LoadType loadType)
   at NHibernate.Impl.SessionImpl.ImmediateLoad(String entityName, Object id)
   at NHibernate.Proxy.AbstractLazyInitializer.Initialize()
   at NHibernate.Proxy.AbstractLazyInitializer.GetImplementation()
   at NHibernate.Event.Default.DefaultDeleteEventListener.OnDelete(DeleteEvent event, ISet`1 transientEntities)
   at NHibernate.Impl.SessionImpl.FireDelete(DeleteEvent event, ISet`1 transientEntities)
   at NHibernate.Impl.SessionImpl.Delete(String entityName, Object child, Boolean isCascadeDeleteEnabled, ISet`1 transientEntities)
   at NHibernate.Engine.CascadingAction.DeleteCascadingAction.Cascade(IEventSource session, Object child, String entityName, Object anything, Boolean isCascadeDeleteEnabled)
   at NHibernate.Engine.Cascade.CascadeToOne(Object parent, Object child, IType type, CascadeStyle style, Object anything, Boolean isCascadeDeleteEnabled)
   at NHibernate.Engine.Cascade.CascadeOn(IEntityPersister persister, Object parent, Object anything)
   at NHibernate.Event.Default.DefaultDeleteEventListener.CascadeAfterDelete(IEventSource session, IEntityPersister persister, Object entity, ISet`1 transientEntities)
   at NHibernate.Event.Default.DefaultDeleteEventListener.DeleteEntity(IEventSource session, Object entity, EntityEntry entityEntry, Boolean isCascadeDeleteEnabled, IEntityPersister persister, ISet`1 transientEntities)
   at NHibernate.Event.Default.DefaultDeleteEventListener.OnDelete(DeleteEvent event, ISet`1 transientEntities)
   at NHibernate.Impl.SessionImpl.FireDelete(DeleteEvent event, ISet`1 transientEntities)
   at NHibernate.Impl.SessionImpl.Delete(String entityName, Object child, Boolean isCascadeDeleteEnabled, ISet`1 transientEntities)
   at NHibernate.Engine.Cascade.DeleteOrphans(String entityName, IPersistentCollection pc)
   at NHibernate.Engine.Cascade.CascadeCollectionElements(Object parent, Object child, CollectionType collectionType, CascadeStyle style, IType elemType, Object anything, Boolean isCascadeDeleteEnabled)
   at NHibernate.Engine.Cascade.CascadeCollection(Object parent, Object child, CascadeStyle style, Object anything, CollectionType type)
   at NHibernate.Engine.Cascade.CascadeAssociation(Object parent, Object child, IType type, CascadeStyle style, Object anything, Boolean isCascadeDeleteEnabled)
   at NHibernate.Engine.Cascade.CascadeOn(IEntityPersister persister, Object parent, Object anything)
   at NHibernate.Event.Default.AbstractFlushingEventListener.CascadeOnFlush(IEventSource session, IEntityPersister persister, Object key, Object anything)
   at NHibernate.Event.Default.AbstractFlushingEventListener.PrepareEntityFlushes(IEventSource session)
   at NHibernate.Event.Default.AbstractFlushingEventListener.FlushEverythingToExecutions(FlushEvent event)
   at NHibernate.Event.Default.DefaultAutoFlushEventListener.OnAutoFlush(AutoFlushEvent event)
   at NHibernate.Impl.SessionImpl.AutoFlushIfRequired(ISet`1 querySpaces)
   at NHibernate.Impl.SessionImpl.List(CriteriaImpl criteria, IList results)
   at NHibernate.Impl.CriteriaImpl.List(IList results)
   at NHibernate.Impl.CriteriaImpl.List[T]()
   at OSPSuite.Infrastructure.Serialization.ORM.MetaData.CommandMetaDataRepository.LoadFromSession(ISession session)
   at OSPSuite.Infrastructure.Serialization.ORM.MetaData.HistoryItemMetaDataRepository.All(ISession session)
   at OSPSuite.Infrastructure.Serialization.ORM.History.HistoryManagerPersistor.allHistoryItemMetaData(ISession session)
   at OSPSuite.Infrastructure.Serialization.ORM.History.HistoryManagerPersistor.Save(IHistoryManager historyManager, ISession session)
   at PKSim.Infrastructure.Serialization.WorkspacePersistor.SaveSession(ICoreWorkspace workspace, String fileFullPath)
   at PKSim.Infrastructure.Workspace.SaveProject(String fileFullPath)
   at PKSim.Presentation.Services.ProjectTask.<>c__DisplayClass21_0.<saveProjectToFile>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 4 years ago

@Nathalie06 It looks like your project database is corrupted for some reason There is no limit to the number of simulation you can save in a project

Was your project saved on a network drive or locally?

Do you have a backup of your project?

if you can share your project, can you add it to this issue? If not, you can send it to me and I can take a look and see if we can save some of the content (michael@design2code.ca)

Nathalie06 commented 4 years ago

I saved my project on a network drive. Yes I had a backup of my project so I was able to rebuild this model. When I tried to simulate a population, I didn't have access to the same parameters as individual simulation. Individual simulation (parameters/distribution/partition coefficient): image Population simulation (parameters/distribution/partition coefficient): image

I want to change B/P ratio to 1 instead of the calculated value but I can't in population simulation. Moreover, some parameters are different from the individual simulation (Ka (acidic phospholipids) and Partition coefficient (blood cells/plasma unbound) with same compounds ? Is it a bug ?

Thanks for your answers Best, Nathalie

Nathalie06 commented 4 years ago

I solved my first issue but I still have the question concerning individuals and population:

Thanks in advance for an explanation, Best, Nathalie

msevestre commented 4 years ago

@Nathalie06 If you have questions, your best bet is to post in the forum so that community experts can answer. PKSim issues are for bug reports only. I moved your issue yesterday to the forum. Let's follow up there