[Bug 18490] Empire: Total War crashes when loading a map

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Sep 2 20:02:30 CDT 2009


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


naur <mig21 at static.int.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mig21 at static.int.pl




--- Comment #3 from naur <mig21 at static.int.pl>  2009-09-02 20:02:29 ---
This crash happens because SetPixelFormat is called on screen device context
(GetDC(NULL)). Wine refuses to set pixel format and returns FALSE which causes
the crash.
Note that technically Windows returns TRUE from SetPixelFormat when it gets the
DC of desktop window (and most of the time this causes problems later, but
that's off-topic).
Based on those facts, I've made a simple and hackish workaround patch for this
problem. After applying it, SetPixelFormat will save the pixel format in the
X11DRV_PDEVICE and return TRUE instead of FALSE. This allows the game to run,
although it degrades error checking. So I'm not expecting this to get included
in Wine's repository. :-)
My solution is also rather incomplete since Wine cannot actually modify the X
root window. Besides, the real cause of problem is located higher in the the
backtrace. The game is D3D9 based, so the bug might be located somewhere in
Wine's D3D9 libraries. I'm including a backtrace from the point where
SetPixelFormat receives invalid DC. The pPresentationParameters structure
passed to D3D9 CreateDevice function has hDeviceWindow set to NULL and Windowed
set to 1.

-- 
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