Felix Nawothnig wrote:
Since the error of "length not a multiple of block size" is nonfatal,
Yes it is fatal. Errors mean that something which should not have happened did happen - and we're not talking about something the API is supposed to handle... there is wrong code in Wine, internal states might have gone corrupted and you can no-longer be sure that Wine is working correctly.
The difference to an assert() is that it's probably possible to repair the corrupted state but there is no guarantee for that since the error might be caused by completly unrelated code.
And this is exactly what we you do in your code - you dunno the reason why mixpos became greater than buflen but you know how to handle it, that's why you should put an ERR there.
Hmmm... I have a moderate collection of Japanese RPG games, for the sole purpose of testing them under Wine, and most, if not all of them reliably display the "length not a multiple of block size" when I run them. This error looks now more serious than I thought at first. I really need to look into it.
When I said "nonfatal", I meant that the error does not force the program to terminate. I meant nothing about the seriousness of the error.
unlike the assertion, I submitted the patch as it is. I will need to read more of both DirectSound and the source code in order to understand the implications of the non-multiple error, since there is another game from the same source (LittleWitch/FloatingFrameDirector) that displays the same non-multiple errors without triggering the assertion. What kind
In the game I tested the assertion failure was not really reproducable, sometimes I played through the whole game (a demo) without problems - it also seems to be timing related...
In the game I tested, the assertion happened at the exact same point into the game (the shot of the girl in the water tank). I provided the link to the problematic demo along with the patch (http://www.littlewitch.jp/sirotume.exe). BTW, all the tests I do are made with the ALSA driver. The other drivers do not exercise the code I am trying to debug in DirectSound.