On Tue Dec 5 01:55:30 2023 +0000, Zebediah Figura wrote:
Fair enough, I can only assume they avoid the race somehow else then, e.g. by always happening to wait the few ms necessary to ensure the asynchronous reconnect completes. It certainly wouldn't surprise me. In any case I think the best thing we can do for the tests is to not test that case. We want the tests to pass consistently, and experience has taught me that the only way to achieve that is to never rely on Sleep(). The stopped case should be interesting enough by itself anyway.
The MR that added the faulty version of this test also taught the VMR9 to recreate the textures with the new D3D device.
To test that, VMR9 has to create the textures to begin with. This requires knowing the size, which requires a media type, which requires a connection. Deleting the connection would also delete that part of the test.
But yes, no good solution here. That sleep is indeed creepy, and it's even more creepy that it needs this decommit/recommit step. Kirikiri doesn't, but I can't figure out what it's doing differently.
And you're right that a connectionless test did reveal something interesting - that function isn't supposed to segfault if there's no media type. Fixed.