osu-framework
osu-framework copied to clipboard
Fix exceptions for `AudioComponent` enqueue operations being left unobserved
It's make lib not found exception pop up if libbass_fx wasn't installed
As documented: https://msdn.microsoft.com/en-us/library/dd321435(v=vs.110).aspx
Appveyor reach timeout on tests
Generally that means there's some failing test in the branch and you should run it locally. Stuck a second time around.
Local tests:

Appveyor vm don't emulate audio device.
Yeah, apparently we've been missing these exceptions until now. I'm running into the same issue on https://github.com/ppy/osu-framework/pull/1759 and will be looking at fixing it properly.
I... think we still want this to be thing?
In testing on latest master, exceptions in this flow are being logged (as unobserved), but arguably they should be throwing upwards from the point of calling? Not 100% sure.
Based on https://github.com/ppy/osu-framework/runs/5180654607?check_suite_focus=true alone I think this is a change we do want to make...
Being the one who originally committed the assertions this has tripped in cleanUpSyncs(), I have to say that maybe the assertions are a bit too strict and may just be a red herring (you could just allow no-op if there is nothing to clean up, after all). But then again I'm not sure how it can ever be tripped, at least not without concurrent writes to Mixer or something...
Also really weird that this change is apparently surfacing video errors that CI doesn't normally throw...? I don't recall seeing any of those before.
With regard to the video errors: I believe they have always been happening but only show up when another failure happens alongside them.
I adjusted the cleanUpSyncs method to not assert so hard, but that just caused things to fail elsewhere. I think there's an actual issue with mixer logic somewhere. Note that this does not repro 100% of the time, so there may be thread timings involved.
-AssertionException
at osu.Framework.Logging.ThrowingTraceListener.Fail(String message1, String message2) in /Users/dean/Projects/osu-framework/osu.Framework/Logging/ThrowingTraceListener.cs:line 25
at System.Diagnostics.TraceInternal.Fail(String message, String detailMessage)
at System.Diagnostics.TraceInternal.TraceProvider.Fail(String message, String detailMessage)
at System.Diagnostics.Debug.Fail(String message, String detailMessage)
at osu.Framework.Audio.Mixing.Bass.BassAudioMixer.AddChannelToBassMix(IBassAudioChannel channel) in /Users/dean/Projects/osu-framework/osu.Framework/Audio/Mixing/Bass/BassAudioMixer.cs:line 305
at osu.Framework.Audio.Track.TrackBass.set_Mixer(AudioMixer value) in /Users/dean/Projects/osu-framework/osu.Framework/Audio/Track/TrackBass.cs:line 412
at osu.Framework.Audio.Track.Track.osu.Framework.Audio.Mixing.IAudioChannel.set_Mixer(AudioMixer value) in /Users/dean/Projects/osu-framework/osu.Framework/Audio/Track/Track.cs:line 131
at osu.Framework.Audio.Mixing.AudioMixer.<>c__DisplayClass5_0.<Add>b__0() in /Users/dean/Projects/osu-framework/osu.Framework/Audio/Mixing/AudioMixer.cs:line 47
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)

I've pushed the changes for the clean up method as I think it reads better (and is more expected behaviour). Let's see what CI thinks.