[Bug 10503] Sid Meier's Alpha Centauri: Wine segfaults when clicking on a city.

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Jul 27 10:26:08 CDT 2008


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


Mikolaj Zalewski <mikolaj.zalewski at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikolaj.zalewski at gmail.com




--- Comment #20 from Mikolaj Zalewski <mikolaj.zalewski at gmail.com>  2008-07-27 10:26:06 ---
If I understand correctly, the exception is caused because of DIB access. A DIB
can be accesses ilike normal memory or using GDI calls. Wine uses the X server
for GDI calls - to e.g. draw a line, we upload the content to the server, mark
the memory area as protected and make the server draw the line. When the
program tries to access this area like memory, this generates an exception, we
catch it, download the updated content from the server, unprotect the memory
and resume the program. As it was written, the problem is that the program
abuses the ESP register while doing DIB operations, what makes the exception
not to work.

Solving it doesn't look like something feasible for a newbie hacker. The best
solution would be to have a DIB engine for in-process GDI manipluations. I've
heard it is being worked on. This will avoid this DIB sections ping-pong and
exceptions being generated. But that's a large piece of code that needs to be
integrated properly with the rest of Wine.

Other possible solution would be to check if Windows have some mechanisms to
raise exceptions even if ESP is invalid. However I don't think so - the
exception handling is closely related to stack unwinding. But maybe vectored
handlers are special? We could also have a special stack for DIB exceptions but
if that is not a Windows feature that it probably won't be accepted because of
being a hack.


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