Piotrekol / CollectionManager

An extensive tool for creating, editing, and exporting of osu! collections.
233 stars 18 forks source link

System.IO.EndOfStreamException: Unable to read beyond the end of the stream #77

Closed X3n0nP0w3r3d closed 1 year ago

X3n0nP0w3r3d commented 1 year ago

I installed the latest version of the program (1.0.236) and tried setting the osu! folder to another directory since I store my beatmaps separately, containing these only: image

Directory text becomes stuck as "..." image

Clicking any button on this menu will throw the error shown below (happens for every button): image

System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
   at System.IO.__Error.EndOfFile()
   at System.IO.BinaryReader.FillBuffer(Int32 numBytes)
   at System.IO.BinaryReader.ReadInt32()
   at CollectionManager.Modules.FileIO.OsuDb.OsuDatabaseLoader.DatabaseContainsData(IProgress`1 progress)
   at CollectionManager.Modules.FileIO.OsuDb.OsuDatabaseLoader.LoadDatabase(String fullOsuDbPath, IProgress`1 progress, CancellationToken cancellationToken)
   at CollectionManager.Modules.FileIO.OsuDb.LOsuDatabaseLoader.LoadDatabase(String fullOsuDbPath, IProgress`1 progress, CancellationToken cancellationToken)
   at App.Presenters.Controls.StartupPresenter.LoadDatabase(CancellationToken cancellationToken)
   at App.Presenters.Controls.StartupPresenter.<Run>b__14_0()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at App.Presenters.Controls.StartupPresenter.<_view_StartupDatabaseOperation>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

I have tried uninstalling, reinstalling but it will automatically default to searching the bugged directory.

Any ideas on what's causing the issue?

Piotrekol commented 1 year ago

Your first screenshot shows a directory containing dummy 0KB osu!.db & scores.db files. while scores.db is fine(it will fail silently), osu!.db is not, and you need to replace it with one created by osu.

X3n0nP0w3r3d commented 1 year ago

Thanks, that seemed to have fixed it :)

Piotrekol commented 1 year ago

On another note, you should be able to select directory where osu.exe is located, and CM will find your custom Songs folder.