http://bugs.winehq.org/show_bug.cgi?id=10503
Mikolaj Zalewski mikolaj.zalewski@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mikolaj.zalewski@gmail.com
--- Comment #20 from Mikolaj Zalewski mikolaj.zalewski@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.