karaoke-dev / karaoke

Will be the best karaoke system.
http://blog.karaoke.dev
GNU General Public License v3.0
204 stars 16 forks source link

Fix crash in the adjust time-tag mode. #1309

Closed andy840119 closed 2 years ago

andy840119 commented 2 years ago

Here's the log:

Unhandled exception. osu.Framework.Allocation.TypeAlreadyCachedException: An instance of the member (Type = IPositionSnapProvider, Name = , Parent = ) has already been cached to the dependency container.
   at osu.Framework.Allocation.DependencyContainer.CacheAs(Type type, CacheInfo info, Object instance, Boolean allowValueTypes)
   at osu.Framework.Allocation.CachedAttribute.<>c__DisplayClass5_0.<CreateActivator>b__1(Object target, IReadOnlyDependencyContainer existing, CacheInfo info)
   at osu.Framework.Allocation.DependencyActivator.mergeDependencies(Object obj, IReadOnlyDependencyContainer dependencies, CacheInfo info)
   at osu.Framework.Graphics.Containers.CompositeDrawable.CreateChildDependencies(IReadOnlyDependencyContainer parent)
   at osu.Framework.Graphics.Containers.CompositeDrawable.InjectDependencies(IReadOnlyDependencyContainer dependencies)
   at osu.Framework.Graphics.Drawable.load(IFrameBasedClock clock, IReadOnlyDependencyContainer dependencies)
   at osu.Framework.Graphics.Drawable.Load(IFrameBasedClock clock, IReadOnlyDependencyContainer dependencies, Boolean isDirectAsyncContext)
   at osu.Framework.Graphics.Containers.CompositeDrawable.loadChild(Drawable child)
   at osu.Framework.Graphics.Containers.CompositeDrawable.load(ShaderManager shaders, Nullable`1 cancellation)
--- End of stack trace from previous location ---
   at osu.Framework.Allocation.BackgroundDependencyLoaderAttribute.<>c__DisplayClass6_0.<CreateActivator>b__4(Object target, IReadOnlyDependencyContainer dc)
   at osu.Framework.Allocation.DependencyActivator.activate(Object obj, IReadOnlyDependencyContainer dependencies)
   at osu.Framework.Allocation.DependencyActivator.activate(Object obj, IReadOnlyDependencyContainer dependencies)
   at osu.Framework.Allocation.DependencyActivator.activate(Object obj, IReadOnlyDependencyContainer dependencies)
   at osu.Framework.Graphics.Drawable.load(IFrameBasedClock clock, IReadOnlyDependencyContainer dependencies)
   at osu.Framework.Graphics.Drawable.Load(IFrameBasedClock clock, IReadOnlyDependencyContainer dependencies, Boolean isDirectAsyncContext)
   at osu.Framework.Graphics.Containers.CompositeDrawable.loadChild(Drawable child)
   at osu.Framework.Graphics.Containers.CompositeDrawable.load(ShaderManager shaders, Nullable`1 cancellation)
--- End of stack trace from previous location ---
   at osu.Framework.Allocation.BackgroundDependencyLoaderAttribute.<>c__DisplayClass6_0.<CreateActivator>b__4(Object target, IReadOnlyDependencyContainer dc)
   at osu.Framework.Allocation.DependencyActivator.activate(Object obj, IReadOnlyDependencyContainer dependencies)
   at osu.Framework.Allocation.DependencyActivator.activate(Object obj, IReadOnlyDependencyContainer dependencies)
   at osu.Framework.Allocation.DependencyActivator.activate(Object obj, IReadOnlyDependencyContainer dependencies)
   at osu.Framework.Allocation.DependencyActivator.activate(Object obj, IReadOnlyDependencyContainer dependencies)
   at osu.Framework.Graphics.Drawable.load(IFrameBasedClock clock, IReadOnlyDependencyContainer dependencies)
   at osu.Framework.Graphics.Drawable.Load(IFrameBasedClock clock, IReadOnlyDependencyContainer dependencies, Boolean isDirectAsyncContext)
   at osu.Framework.Graphics.Containers.CompositeDrawable.loadChild(Drawable child)
   at osu.Framework.Graphics.Containers.CompositeDrawable.AddInternal(Drawable drawable)
   at osu.Framework.Graphics.Containers.GridContainer.layoutContent()
--- End of stack trace from previous location ---
   at osu.Framework.Allocation.BackgroundDependencyLoaderAttribute.<>c__DisplayClass6_0.<CreateActivator>b__4(Object target, IReadOnlyDependencyContainer dc)
   at osu.Framework.Allocation.DependencyActivator.activate(Object obj, IReadOnlyDependencyContainer dependencies)
   at osu.Framework.Graphics.Drawable.load(IFrameBasedClock clock, IReadOnlyDependencyContainer dependencies)
   at osu.Framework.Graphics.Drawable.Load(IFrameBasedClock clock, IReadOnlyDependencyContainer dependencies, Boolean isDirectAsyncContext)
   at osu.Framework.Graphics.Containers.CompositeDrawable.loadChild(Drawable child)
   at osu.Framework.Graphics.Containers.CompositeDrawable.AddInternal(Drawable drawable)
   at osu.Framework.Graphics.Containers.Container`1.AddInternal(Drawable drawable)
   at osu.Framework.Graphics.Containers.CompositeDrawable.AddRangeInternal(IEnumerable`1 range)
   at osu.Game.Rulesets.Karaoke.Edit.Lyrics.Rows.Extends.EditRowExtend.load(OsuColour colours) in /Users/hardcore/Documents/Github/andy840119/karaoke/osu.Game.Rulesets.Karaoke/Edit/Lyrics/Rows/Extends/EditRowExtend.cs:line 31
--- End of stack trace from previous location ---
   at osu.Framework.Allocation.BackgroundDependencyLoaderAttribute.<>c__DisplayClass6_0.<CreateActivator>b__4(Object target, IReadOnlyDependencyContainer dc)
   at osu.Framework.Allocation.DependencyActivator.activate(Object obj, IReadOnlyDependencyContainer dependencies)
   at osu.Framework.Allocation.DependencyActivator.activate(Object obj, IReadOnlyDependencyContainer dependencies)
   at osu.Framework.Graphics.Drawable.load(IFrameBasedClock clock, IReadOnlyDependencyContainer dependencies)
   at osu.Framework.Graphics.Drawable.Load(IFrameBasedClock clock, IReadOnlyDependencyContainer dependencies, Boolean isDirectAsyncContext)
   at osu.Framework.Graphics.Containers.CompositeDrawable.loadChild(Drawable child)
   at osu.Framework.Graphics.Containers.CompositeDrawable.AddInternal(Drawable drawable)
   at osu.Framework.Graphics.Containers.Container`1.AddInternal(Drawable drawable)
   at osu.Game.Rulesets.Karaoke.Edit.Lyrics.DrawableLyricEditListItem.<>c__DisplayClass14_0.<.ctor>b__5() in /Users/hardcore/Documents/Github/andy840119/karaoke/osu.Game.Rulesets.Karaoke/Edit/Lyrics/DrawableLyricEditListItem.cs:line 89
   at osu.Framework.Threading.ScheduledDelegate.RunTaskInternal()
   at osu.Framework.Threading.Scheduler.Update()
   at osu.Framework.Graphics.Drawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Testing.TestBrowser.ErrorCatchingDelayedLoadWrapper.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
   at osu.Framework.Platform.GameHost.UpdateFrame()
   at osu.Framework.Threading.GameThread.processFrame()
--- End of stack trace from previous location ---
   at osu.Framework.Platform.GameHost.<>c__DisplayClass124_0.<abortExecutionFromException>b__0()
   at osu.Framework.Threading.ScheduledDelegate.RunTaskInternal()
   at osu.Framework.Threading.Scheduler.Update()
   at osu.Framework.Threading.GameThread.processFrame()
   at osu.Framework.Threading.GameThread.RunSingleFrame()
   at osu.Framework.Platform.ThreadRunner.RunMainLoop()
   at osu.Framework.Platform.GameHost.windowUpdate()
   at osu.Framework.Platform.SDL2DesktopWindow.Run()
   at osu.Framework.Platform.GameHost.Run(Game game)
   at osu.Game.Rulesets.Karaoke.Tests.VisualTestRunner.Main(String[] args) in /Users/hardcore/Documents/Github/andy840119/karaoke/osu.Game.Rulesets.Karaoke.Tests/VisualTestRunner.cs:line 16
andy840119 commented 2 years ago

Not really sure will it be able to test all the state by cache the interface like IHasEditModeState in the test class.

andy840119 commented 2 years ago

Implemented.