ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15.07k stars 2.23k forks source link

osu crash when importing beatmap #29413

Closed usersever closed 5 days ago

usersever commented 1 month ago

Type

Crash to desktop

Bug description

When i tried to download this beatmap and then open it, osu doesn't open. Then i tried inport that beatmap in the game but when i press import it still crash.

Screenshots or videos

No response

Version

2024.731.0-lazer

Logs

i can't export my log, this file might not right 1723615488.nauth.log

smoogipoo commented 1 month ago

Try to re-export the logs.

usersever commented 1 month ago

i still can't do that even when i restart osu

smoogipoo commented 1 month ago

Weird.

In that case... Open osu!, go into options, and click "open osu! folder", paste all the files from the logs folder within into here.

usersever commented 1 month ago

it's corrupted and i can't read this

smoogipoo commented 1 month ago

Drag and drop the files directly here, you don't need to paste their content.

usersever commented 1 month ago

i even can't zip that folder or drop folder here

Cannot read contents of E:\osu!\logs\*
  The file or directory is corrupted and unreadable.
smoogipoo commented 1 month ago

Okay, let's try a different way then... Check for any error logs in the event viewer (https://docs.microsoft.com/en-us/host-integration-server/core/how-to-check-the-windows-event-logs-for-errors1).

usersever commented 1 month ago

Faulting application name: osu!.exe, version: 0.0.0.0, time stamp: 0x666b0000 Faulting module name: realm-wrappers.DLL, version: 0.0.0.0, time stamp: 0x65047bf8 Exception code: 0xc0000409 Fault offset: 0x000000000060a129 Faulting process id: 0x0x4344 Faulting application start time: 0x0x1DAEFBA439E1883 Faulting application path: C:\Users\Admin\AppData\Local\osulazer\app-2024.731.0\osu!.exe Faulting module path: C:\Users\Admin\AppData\Local\osulazer\app-2024.731.0\realm-wrappers.DLL Report Id: ef1c5c5e-8bdf-409c-a85b-17eac64d1852 Faulting package full name: Faulting package-relative application ID:

smoogipoo commented 1 month ago

Is there another error alongside that one listed as .NET Runtime in the error list? If so paste that one too.

smoogipoo commented 1 month ago

You might also have crashdumps under %LOCALAPPDATA%\CrashDumps, can you send those in an email to pe@ppy.sh along with a link to this thread?

usersever commented 1 month ago

Is there another error alongside that one listed as .NET Runtime in the error list? If so paste that one too.

I only found that in event viewer

usersever commented 1 month ago

osu!.exe.14992.dmp osu!.exe.7496.dmp i sent email and here are the file

smoogipoo commented 1 month ago

Thanks, that helps out a bit.

Does this happen every time? Can you reproduce it by importing that beatmap?

If so, then please also upload the client.realm file usually found in %LOCALAPPDATA%/osu or wherever you may have moved the osu! folder to.

At this point, it looks like it's an issue caused by Realm. I haven't seen this happen before but I am acutely aware we are stuck on the current version so there's nothing we can do right now except perhaps try to make a repro for the Realm devs to look into.

Relevant stacktraces follows:

osu!.exe.14992.dmp

OS Thread Id: 0x29fc (60)
        Child SP               IP Call Site
0000009757D7E6F0 00007ffa5b89a129 [InlinedCallFrame: 0000009757d7e6f0] Realms.SharedRealmHandle+NativeMethods.get_object_for_primary_key(Realms.SharedRealmHandle, UInt32, Realms.Native.PrimitiveValue, Realms.NativeException ByRef)
0000009757D7E6F0 00007ffa07799628 [InlinedCallFrame: 0000009757d7e6f0] Realms.SharedRealmHandle+NativeMethods.get_object_for_primary_key(Realms.SharedRealmHandle, UInt32, Realms.Native.PrimitiveValue, Realms.NativeException ByRef)
0000009757D7E6C0 00007ffa07799628 ILStubClass.IL_STUB_PInvoke(Realms.SharedRealmHandle, UInt32, Realms.Native.PrimitiveValue, Realms.NativeException ByRef)
0000009757D7E7C0 00007ffa07799457 Realms.SharedRealmHandle.TryFindObject(Realms.Native.TableKey, Realms.RealmValue ByRef, Realms.ObjectHandle ByRef)
0000009757D7E910 00007ffa07798da3 Realms.Realm.FindCore[[System.__Canon, System.Private.CoreLib]](Realms.RealmValue)
0000009757D7E9A0 00007ffa07bd09e6 Realms.Realm.Find[[System.__Canon, System.Private.CoreLib]](System.String)
0000009757D7EA90 00007ffa07bcf8d3 osu.Game.Database.RealmFileStore.Add()
0000009757D7EAF0 00007ffa07bc78e4 osu.Game.Database.RealmArchiveModelImporter`1+c__DisplayClass28_0[[System.__Canon, System.Private.CoreLib]].b__0()
0000009757D7F0D0 00007ffa07a7c1ae osu.Game.Database.RealmAccess.Run[[System.__Canon, System.Private.CoreLib]]()
0000009757D7F140 00007ffa07bc5a83 osu.Game.Database.RealmArchiveModelImporter`1[[System.__Canon, System.Private.CoreLib]].ImportModel()
0000009757D7F1E0 00007ffa07bc55ec osu.Game.Database.RealmArchiveModelImporter`1+c__DisplayClass27_0[[System.__Canon, System.Private.CoreLib]].b__0()
0000009757D7F240 00007ffa2494b56f System.Threading.Tasks.Task`1[[System.__Canon, System.Private.CoreLib]].InnerInvoke()
0000009757D7F280 00007ffa2470649d System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) [/_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs @ 179]
0000009757D7F2F0 00007ffa24720784 System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread) [/_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs @ 2345]
0000009757D7F390 00007ffa247205dd System.Threading.Tasks.Task.ExecuteEntry() [/_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs @ 2258]
0000009757D7F3D0 00007ffa077a7271 osu.Framework.Threading.ThreadedTaskScheduler.processTasks()
0000009757D7F4A0 00007ffa2470649d System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) [/_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs @ 179]
0000009757D7F760 00007ffa6548bd43 [DebuggerU2MCatchHandlerFrame: 0000009757d7f760] 

osu!.exe.7492.dmp

OS Thread Id: 0x589c (62)
        Child SP               IP Call Site
0000004759EFED10 00007ffa43e3c9d9 [InlinedCallFrame: 0000004759efed10] Realms.SharedRealmHandle+NativeMethods.get_object_for_primary_key(Realms.SharedRealmHandle, UInt32, Realms.Native.PrimitiveValue, Realms.NativeException ByRef)
0000004759EFED10 00007ff9e608a688 [InlinedCallFrame: 0000004759efed10] Realms.SharedRealmHandle+NativeMethods.get_object_for_primary_key(Realms.SharedRealmHandle, UInt32, Realms.Native.PrimitiveValue, Realms.NativeException ByRef)
0000004759EFECE0 00007ff9e608a688 ILStubClass.IL_STUB_PInvoke(Realms.SharedRealmHandle, UInt32, Realms.Native.PrimitiveValue, Realms.NativeException ByRef)
0000004759EFEDE0 00007ff9e6089cd7 Realms.SharedRealmHandle.TryFindObject(Realms.Native.TableKey, Realms.RealmValue ByRef, Realms.ObjectHandle ByRef)
0000004759EFEF30 00007ff9e6089a63 Realms.Realm.FindCore[[System.__Canon, System.Private.CoreLib]](Realms.RealmValue)
0000004759EFEFC0 00007ff9e6f7a576 Realms.Realm.Find[[System.__Canon, System.Private.CoreLib]](System.String)
0000004759EFF0B0 00007ff9e6f79da3 osu.Game.Database.RealmFileStore.Add()
0000004759EFF110 00007ff9e6f767d4 osu.Game.Database.RealmArchiveModelImporter`1+c__DisplayClass28_0[[System.__Canon, System.Private.CoreLib]].b__0()
0000004759EFF6F0 00007ff9e637d37e osu.Game.Database.RealmAccess.Run[[System.__Canon, System.Private.CoreLib]]()
0000004759EFF760 00007ff9e6f74583 osu.Game.Database.RealmArchiveModelImporter`1[[System.__Canon, System.Private.CoreLib]].ImportModel()
0000004759EFF800 00007ff9e6f7438c osu.Game.Database.RealmArchiveModelImporter`1+c__DisplayClass27_0[[System.__Canon, System.Private.CoreLib]].b__0()
0000004759EFF860 00007ffa345fb56f System.Threading.Tasks.Task`1[[System.__Canon, System.Private.CoreLib]].InnerInvoke()
0000004759EFF8A0 00007ffa343b649d System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) [/_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs @ 179]
0000004759EFF910 00007ffa343d0784 System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread) [/_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs @ 2345]
0000004759EFF9B0 00007ffa343d05dd System.Threading.Tasks.Task.ExecuteEntry() [/_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs @ 2258]
0000004759EFF9F0 00007ff9e60959d1 osu.Framework.Threading.ThreadedTaskScheduler.processTasks()
0000004759EFFAC0 00007ffa343b649d System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) [/_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs @ 179]
0000004759EFFD80 00007ffa43d3bd43 [DebuggerU2MCatchHandlerFrame: 0000004759effd80] 
usersever commented 1 month ago

i retried with this beatmap but it still crash client.zip and when i update osu i can't open it, i found this at event viewer

Application: osu!.exe
CoreCLR Version: 8.0.824.36612
.NET Version: 8.0.8
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Stack:
   at Realms.SharedRealmHandle+NativeMethods.open(Realms.Native.Configuration, Realms.NativeException ByRef)
   at Realms.SharedRealmHandle+NativeMethods.open(Realms.Native.Configuration, Realms.NativeException ByRef)
   at Realms.SharedRealmHandle.Open(Realms.Native.Configuration)
   at Realms.RealmConfiguration.CreateHandle(Realms.Native.Configuration ByRef)
   at Realms.RealmConfigurationBase.CreateRealm()
   at Realms.Realm.GetInstance(Realms.RealmConfigurationBase)
   at osu.Game.Database.RealmAccess.getRealmInstance()
   at osu.Game.Database.RealmAccess.prepareFirstRealmAccess()
   at osu.Game.Database.RealmAccess..ctor(osu.Framework.Platform.Storage, System.String, osu.Framework.Threading.GameThread)
   at osu.Game.OsuGameBase.load(osu.Framework.Input.ReadableKeyCombinationProvider, osu.Framework.Configuration.FrameworkConfigManager)
   at osu.Game.OsuGameBase+<>c.<RegisterForDependencyActivation>b__155_0(System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.Activate[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon, osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Allocation.DependencyContainer.Inject[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon)
   at osu.Framework.Graphics.Drawable.InjectDependencies(osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Graphics.Containers.CompositeDrawable.InjectDependencies(osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Graphics.Drawable.load(osu.Framework.Timing.IFrameBasedClock, osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Graphics.Drawable.Load(osu.Framework.Timing.IFrameBasedClock, osu.Framework.Allocation.IReadOnlyDependencyContainer, Boolean)
   at osu.Framework.Graphics.Containers.CompositeDrawable.loadChild(osu.Framework.Graphics.Drawable)
   at osu.Framework.Graphics.Containers.CompositeDrawable.load(osu.Framework.Graphics.Shaders.ShaderManager, System.Nullable`1<System.Threading.CancellationToken>)
   at osu.Framework.Graphics.Containers.CompositeDrawable+<>c.<RegisterForDependencyActivation>b__209_0(System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.Activate[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon, osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Allocation.DependencyContainer.Inject[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon)
   at osu.Framework.Graphics.Drawable.InjectDependencies(osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Graphics.Containers.CompositeDrawable.InjectDependencies(osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Graphics.Drawable.load(osu.Framework.Timing.IFrameBasedClock, osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Graphics.Drawable.Load(osu.Framework.Timing.IFrameBasedClock, osu.Framework.Allocation.IReadOnlyDependencyContainer, Boolean)
   at osu.Framework.Graphics.Containers.CompositeDrawable.loadChild(osu.Framework.Graphics.Drawable)
   at osu.Framework.Graphics.Containers.CompositeDrawable.load(osu.Framework.Graphics.Shaders.ShaderManager, System.Nullable`1<System.Threading.CancellationToken>)
   at osu.Framework.Graphics.Containers.CompositeDrawable+<>c.<RegisterForDependencyActivation>b__209_0(System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.Activate[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon, osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Allocation.DependencyContainer.Inject[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon)
   at osu.Framework.Graphics.Drawable.InjectDependencies(osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Graphics.Containers.CompositeDrawable.InjectDependencies(osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Graphics.Drawable.load(osu.Framework.Timing.IFrameBasedClock, osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Graphics.Drawable.Load(osu.Framework.Timing.IFrameBasedClock, osu.Framework.Allocation.IReadOnlyDependencyContainer, Boolean)
   at osu.Framework.Graphics.Containers.CompositeDrawable.loadChild(osu.Framework.Graphics.Drawable)
   at osu.Framework.Graphics.Containers.CompositeDrawable.load(osu.Framework.Graphics.Shaders.ShaderManager, System.Nullable`1<System.Threading.CancellationToken>)
   at osu.Framework.Graphics.Containers.CompositeDrawable+<>c.<RegisterForDependencyActivation>b__209_0(System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.Activate[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon, osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Allocation.DependencyContainer.Inject[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon)
   at osu.Framework.Graphics.Drawable.InjectDependencies(osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Graphics.Containers.CompositeDrawable.InjectDependencies(osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Graphics.Drawable.load(osu.Framework.Timing.IFrameBasedClock, osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Graphics.Drawable.Load(osu.Framework.Timing.IFrameBasedClock, osu.Framework.Allocation.IReadOnlyDependencyContainer, Boolean)
   at osu.Framework.Graphics.Containers.CompositeDrawable.loadChild(osu.Framework.Graphics.Drawable)
   at osu.Framework.Graphics.Containers.CompositeDrawable.load(osu.Framework.Graphics.Shaders.ShaderManager, System.Nullable`1<System.Threading.CancellationToken>)
   at osu.Framework.Graphics.Containers.CompositeDrawable+<>c.<RegisterForDependencyActivation>b__209_0(System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.<Activate>g__activateRecursively|8_0[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Object, osu.Framework.Allocation.IReadOnlyDependencyContainer, System.Type)
   at osu.Framework.Allocation.DependencyActivator.Activate[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon, osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Allocation.DependencyContainer.Inject[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon)
   at osu.Framework.Graphics.Drawable.InjectDependencies(osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Graphics.Containers.CompositeDrawable.InjectDependencies(osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Graphics.Drawable.load(osu.Framework.Timing.IFrameBasedClock, osu.Framework.Allocation.IReadOnlyDependencyContainer)
   at osu.Framework.Graphics.Drawable.Load(osu.Framework.Timing.IFrameBasedClock, osu.Framework.Allocation.IReadOnlyDependencyContainer, Boolean)
   at osu.Framework.Platform.GameHost.bootstrapSceneGraph(osu.Framework.Game)
   at osu.Framework.Platform.GameHost.Run(osu.Framework.Game)
   at osu.Desktop.Program.Main(System.String[])
smoogipoo commented 1 month ago

@usersever

cc @peppy

Something is broken in the database but I can't figure out what. Running that database locally, I get a native crash after the migration runs, of the form:

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   librealm-wrappers.dylib                0x168e73430 realm::Array::init_from_ref(unsigned long) + 64
1   librealm-wrappers.dylib                0x169179a28 (anonymous namespace)::has_duplicate_values(realm::Array const&, realm::ClusterColumn const&) + 324
2   librealm-wrappers.dylib                0x169179994 (anonymous namespace)::has_duplicate_values(realm::Array const&, realm::ClusterColumn const&) + 176
3   librealm-wrappers.dylib                0x1692366a8 realm::Table::validate_column_is_unique(realm::ColKey) const + 256
4   librealm-wrappers.dylib                0x169164928 realm::Group::validate_primary_columns() + 136
5   librealm-wrappers.dylib                0x168f20170 realm::ObjectStore::apply_schema_changes(realm::Transaction&, unsigned long long, realm::Schema&, unsigned long long, realm::SchemaMode, std::__1::vector<realm::SchemaChange, std::__1::allocator<realm::SchemaChange>> const&, bool, std::__1::function<void ()>) + 3544
6   librealm-wrappers.dylib                0x168f6f2a0 realm::Realm::update_schema(realm::Schema, unsigned long long, std::__1::function<void (std::__1::shared_ptr<realm::Realm>, std::__1::shared_ptr<realm::Realm>, realm::Schema&)>, std::__1::function<void (std::__1::shared_ptr<realm::Realm>)>, bool) + 1960
7   librealm-wrappers.dylib                0x168ef2398 realm::_impl::RealmCoordinator::do_get_realm(realm::RealmConfig&&, std::__1::shared_ptr<realm::Realm>&, std::__1::optional<realm::VersionID>, realm::util::CheckedUniqueLock&) + 1764
8   librealm-wrappers.dylib                0x168ef1bac realm::_impl::RealmCoordinator::get_realm(realm::RealmConfig, std::__1::optional<realm::VersionID>) + 508
9   librealm-wrappers.dylib                0x168f6dc50 realm::Realm::get_shared_realm(realm::RealmConfig) + 120
10  librealm-wrappers.dylib                0x168e8f61c shared_realm_open + 192

At first glance this looks like potentially the migration is making duplicates, however I noticed that even if you make the migration a no-op (by removing all of its code), the same error will still occur after onMigration.

I went a little bit further and changed the migration to:

HashSet<string> ids = new HashSet<string>();

testPrimaryKey<Guid>("Skin", "ID");
testPrimaryKey<Guid>("Score", "ID");
testPrimaryKey<string>("Ruleset", "ShortName");
testPrimaryKey<Guid>("ModPreset", "ID");
testPrimaryKey<Guid>("KeyBinding", "ID");
testPrimaryKey<string>("File", "Hash");
testPrimaryKey<Guid>("BeatmapSet", "ID");
testPrimaryKey<Guid>("BeatmapCollection", "ID");
testPrimaryKey<Guid>("Beatmap", "ID");

void testPrimaryKey<T>(string objectName, string pkColumn)
{
    ids.Clear();

    foreach (var item in migration.OldRealm.DynamicApi.All(objectName))
    {
        if (!ids.Add(item.DynamicApi.Get<T>(pkColumn)!.ToString()!))
        {
            Trace.Fail("This should not be reached.");
        }
    }
}

And the trace is never hit - realm still crashes with the supposedly duplicate PK.

Sounds like some dark magic at play here - perhaps disk corruption or something as above. I'm not sure what the resolution is here.

smoogipoo commented 1 month ago

Realm discussion thread: https://github.com/realm/realm-core/discussions/7988

smoogipoo commented 1 month ago

I've attempted to fix your corrupt database:

client.realm.zip

I can't guarantee that this will continue to work forevermore and there may be a time where you'll have to start over from scratch, but it may be enough for now...

usersever commented 1 month ago

i'm using cpu intel pentinum gold g6400. i used chkdsk on the whole drive that i install osu but it's nomal

 chkdsk C:
The type of the file system is NTFS.
Volume label is Windows 11.

WARNING!  /F parameter not specified.
Running CHKDSK in read-only mode.

Stage 1: Examining basic file system structure ...
  1114368 file records processed.
File verification completed.
 Phase duration (File record verification): 26.92 seconds.
  33264 large file records processed.
 Phase duration (Orphan file record recovery): 27.41 milliseconds.
  0 bad file records processed.
 Phase duration (Bad file record checking): 0.40 milliseconds.

Stage 2: Examining file name linkage ...
  48033 reparse records processed.
  1461562 index entries processed.
Index verification completed.
 Phase duration (Index verification): 45.77 seconds.
  0 unindexed files scanned.
 Phase duration (Orphan reconnection): 6.21 seconds.
  0 unindexed files recovered to lost and found.
 Phase duration (Orphan recovery to lost and found): 0.30 milliseconds.
  48033 reparse records processed.
 Phase duration (Reparse point and Object ID verification): 129.42 milliseconds.

Stage 3: Examining security descriptors ...
Security descriptor verification completed.
 Phase duration (Security descriptor verification): 147.13 milliseconds.
  173598 data files processed.
 Phase duration (Data attribute verification): 0.71 milliseconds.
CHKDSK is verifying Usn Journal...
  37804712 USN bytes processed.
Usn Journal verification completed.
 Phase duration (USN journal verification): 544.97 milliseconds.

Windows has scanned the file system and found no problems.
No further action is required.

 116440139 KB total disk space.
 106428236 KB in 550128 files.
    390992 KB in 173599 indexes.
         0 KB in bad sectors.
   1246455 KB in use by the system.
     65536 KB occupied by the log file.
   8374456 KB available on disk.

      4096 bytes in each allocation unit.
  29110034 total allocation units on disk.
   2093614 allocation units available on disk.
Total duration: 1.32 minutes (79772 ms).

and i think it doesn't power outage (it's using 10W when opening osu), no crash system crash when open osu

smoogipoo commented 4 weeks ago

Realm has applied a fix to the database themselves, which is likely (definitely) better than my fix. I recommend using it:

https://github.com/realm/realm-core/discussions/7988#discussioncomment-10380126

usersever commented 4 weeks ago

it's worked, thanks

usersever commented 1 week ago

my osu can't open after some week after this issue, and i checked event log and i saw it come from realm file. so i replace it by client1.realm.zip and my osu update failed when open games and some beatmap is missing some level 1725673251.runtime.log

peppy commented 1 week ago

I'd propose starting from a new database at this point.

usersever commented 1 week ago

how i can do that?

usersever commented 6 days ago

And is there anyway to recorer my beatmaps i imported in the osu data folder without realm database?

peppy commented 6 days ago

There would not be a way to recover, no.

usersever commented 5 days ago

thank