Nornec / Midinous-Issues

2 stars 0 forks source link

`ArgumentOutOfRangeException` when selecting some notes #36

Closed dromer closed 1 year ago

dromer commented 1 year ago

Midinous version: 1.1.5.0 on Linux Audio system: Pipewire 0.3.65

I wanted to select some notes and it crashed:

2023-140.6.38.51 Exception occurred: Specified argument was out of the range of valid values. (Parameter 'index')
2023-140.6.38.51 Caught exception:System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
   at System.Linq.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument)
   at System.Linq.Enumerable.ElementAt[TSource](IEnumerable`1 source, Int32 index)
   at Midinous.CanvasPath.draw_prep(PathDrawType draw_type)
   at Midinous.Static.Background.queue_path_draw_actions()
   at Midinous.Static.Background.draw_prep()
   at Midinous.Base.Midinous.Update(GameTime progTime)
   at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop()
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
   at Microsoft.Xna.Framework.Game.Run()
   at Midinous.Base.Program.Main()
2023-140.6.38.51 There was an unexpected problem at entry point Program.Main() and the program must close.

Will see if it happens again.

dromer commented 1 year ago

Oh it happened again while I was working in another program:

2023-140.6.50.53 Exception occurred: Specified argument was out of the range of valid values. (Parameter 'index')
2023-140.6.50.53 Caught exception:System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
   at System.Linq.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument)
   at System.Linq.Enumerable.ElementAt[TSource](IEnumerable`1 source, Int32 index)
   at Midinous.CanvasPath.draw_prep(PathDrawType draw_type)
   at Midinous.Static.Background.queue_path_draw_actions()
   at Midinous.Static.Background.draw_prep()
   at Midinous.Base.Midinous.Update(GameTime progTime)
   at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop()
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
   at Microsoft.Xna.Framework.Game.Run()
   at Midinous.Base.Program.Main()
2023-140.6.50.53 There was an unexpected problem at entry point Program.Main() and the program must close.
dromer commented 1 year ago

Btw I think this was "fixed" by switching audio device.

It had automatically selected one of the HDMI outputs, but since I don't actually use the audio I didn't think anything of it. Now switched to the integrated sound-card and haven't had a single crash.

Nornec commented 1 year ago

Several updates have released that should have fixed these types of race conditions. Please open another issue if they happen again in version 1.1.5.3+