From c7570fbce516ad0b35def7d696c885fd80f347f1 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 29 May 2022 15:15:03 +0900 Subject: [PATCH 1/3] Fix potential `ObjectDisposedException` on realm notification in `SkinSection` --- osu.Game/Overlays/Settings/Sections/SkinSection.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Settings/Sections/SkinSection.cs b/osu.Game/Overlays/Settings/Sections/SkinSection.cs index a34776ddf0..264a05b4a7 100644 --- a/osu.Game/Overlays/Settings/Sections/SkinSection.cs +++ b/osu.Game/Overlays/Settings/Sections/SkinSection.cs @@ -111,7 +111,7 @@ namespace osu.Game.Overlays.Settings.Sections configBindable.Value = skin.NewValue.ID.ToString(); } - private void skinsChanged(IRealmCollection sender, ChangeSet changes, Exception error) + private void skinsChanged(IRealmCollection sender, ChangeSet changes, Exception error) => Schedule(() => { // This can only mean that realm is recycling, else we would see the protected skins. // Because we are using `Live<>` in this class, we don't need to worry about this scenario too much. @@ -130,7 +130,7 @@ namespace osu.Game.Overlays.Settings.Sections skinDropdown.Items = dropdownItems; updateSelectedSkinFromConfig(); - } + }); private void updateSelectedSkinFromConfig() { From 7c97719db1fa10a03ec3e5769b8c8cff4e67f4d6 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 29 May 2022 21:28:09 +0900 Subject: [PATCH 2/3] Move `Schedule` to only drawable pieces --- osu.Game/Overlays/Settings/Sections/SkinSection.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/osu.Game/Overlays/Settings/Sections/SkinSection.cs b/osu.Game/Overlays/Settings/Sections/SkinSection.cs index 264a05b4a7..a87e65b735 100644 --- a/osu.Game/Overlays/Settings/Sections/SkinSection.cs +++ b/osu.Game/Overlays/Settings/Sections/SkinSection.cs @@ -111,7 +111,7 @@ namespace osu.Game.Overlays.Settings.Sections configBindable.Value = skin.NewValue.ID.ToString(); } - private void skinsChanged(IRealmCollection sender, ChangeSet changes, Exception error) => Schedule(() => + private void skinsChanged(IRealmCollection sender, ChangeSet changes, Exception error) { // This can only mean that realm is recycling, else we would see the protected skins. // Because we are using `Live<>` in this class, we don't need to worry about this scenario too much. @@ -127,10 +127,13 @@ namespace osu.Game.Overlays.Settings.Sections dropdownItems.Add(skin.ToLive(realm)); dropdownItems.Insert(protectedCount, random_skin_info); - skinDropdown.Items = dropdownItems; + Schedule(() => + { + skinDropdown.Items = dropdownItems; - updateSelectedSkinFromConfig(); - }); + updateSelectedSkinFromConfig(); + }); + } private void updateSelectedSkinFromConfig() { From 70c8a439619910541cf4748d165efc3704103e05 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 29 May 2022 21:31:20 +0900 Subject: [PATCH 3/3] Update framework --- osu.Android.props | 2 +- osu.Game/osu.Game.csproj | 2 +- osu.iOS.props | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Android.props b/osu.Android.props index ecc929a66d..c28085557e 100644 --- a/osu.Android.props +++ b/osu.Android.props @@ -52,7 +52,7 @@ - + diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 950d4ceae1..79cfd7c917 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -35,7 +35,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/osu.iOS.props b/osu.iOS.props index bcff0d3c44..b1ba64beba 100644 --- a/osu.iOS.props +++ b/osu.iOS.props @@ -61,7 +61,7 @@ - + @@ -84,7 +84,7 @@ - +