mbdavid / LiteDB.Studio

A GUI tool for viewing and editing documents for LiteDB v5
MIT License
750 stars 197 forks source link

Bug when using "Shared" connection mode to open an encrypted database file #54

Open ahmedhm19 opened 3 years ago

ahmedhm19 commented 3 years ago

Hi,

When i try to open an encrypted database file using "Shared" connection mode i got this exception message :

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at LiteDB.Engine.AesStream.Write(Byte[] array, Int32 offset, Int32 count)
   at LiteDB.Engine.DiskService.Write(IEnumerable`1 pages, FileOrigin origin)
   at LiteDB.Engine.WalIndexService.CheckpointInternal()
   at LiteDB.Engine.WalIndexService.TryCheckpoint()
   at LiteDB.Engine.LiteEngine.Dispose(Boolean disposing)
   at LiteDB.SharedEngine.Dispose(Boolean disposing)
   at LiteDB.SharedEngine.Dispose()
   at LiteDB.LiteDatabase.Dispose(Boolean disposing)
   at LiteDB.Studio.MainForm.<Connect>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__6_0(Object state)