[Bug 22780] Trackmania United Forever crashes with complex shaders enabled

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Jul 23 10:59:20 CDT 2010


http://bugs.winehq.org/show_bug.cgi?id=22780





--- Comment #8 from Matteo Bruni <matteo.mystral at gmail.com>  2010-07-23 10:59:15 ---
Created an attachment (id=29788)
 --> (http://bugs.winehq.org/attachment.cgi?id=29788)
Patch for the windowscodecs failure

OK, in current git the assembler shaders are processed correctly, and the game
indeed aborts because of a libjpeg error. Specifically it's a windowscodecs bug
triggered by D3DXGetImageInfoFromFileInMemory. Let me try to explain...

D3DXGetImageInfoFromFileInMemory calls
IWICImagingFactory_CreateDecoderFromStream, which then enumerates and checks
the decoders until it finds a matching one. Once found a suitable decoder, it
calls IWICBitmapDecoder_Initialize (then calling JpegDecoder_Initialize) which
fails because the stream was never reset after the many MatchesPattern
(MatchesPattern, for each pattern, seeks the stream and reads the requested
bytes, without resetting the stream pointer afterwards).

The attached patch fixes the issue for me (is that the correct approach?), the
game is now playable with low shaders settings. The game uses
D3DXLoadSurfaceFromFileInMemory and D3DXCompileShader which are currently
stubbed, but somewhat still manages to work.

BTW, this leaves the general question of catching libjpeg failures open.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list