https://bugs.winehq.org/show_bug.cgi?id=46870
--- Comment #47 from Paul Gofman gofmanp@gmail.com --- I downloaded LoL client and tested it.
I could not reproduce any problem with the current Wine Staging (optimized build), everything worked out of the box, no overrides, no crash on training battle start.
I could reproduce the crash on training battle start after building with '-g -O0'. I figured that the crash goes away for me if to take just xaudio2_7.dll from the optimized build. Crash also goes away if I use native override for xaudio2_7, or if I take xaudio2_7 from mainstream Wine even built with the same '-g -O0' flags (mainstream Wine uses new FAudio based xaudio, while Staging is using an old one). If I do an ugly hack defining WINAPI with DECLSPEC_HOTPATCH in Staging xaudio, it changes nothing. So it doesn't look the problem has anything to do with hotpatching.
The crash happens from 'IXAudio2VoiceCallback_OnVoiceProcessingPassStart(src->cb, underrun);' called in do_engine_tick(). I did not track down what exactly goes wrong with it with no optimization flags as I am not sure how much it is interesting given the old xaudio is being replaced by FAudio one and that does not happen there.