mbdavid / LiteDB.Studio

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

Errors and Exceptions Opening Readonly #43

Open kitsu opened 3 years ago

kitsu commented 3 years ago

While testing locally and using Studio read only I frequently get error popups about "writing". Now it is also failing to open in shared mode readonly:

System.NotSupportedException: Stream does not support writing.
   at System.IO.FileStream.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)