http://bugs.winehq.org/show_bug.cgi?id=6399
Andrey Turkin andrey.turkin@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |andrey.turkin@gmail.com
--- Comment #5 from Andrey Turkin andrey.turkin@gmail.com 2007-12-22 12:24:33 --- The program is buggy; instead of CPen *old = (CPen *)memDC.SelectObject(pen); there must be CPen *old = memDC.SelectObject(&pen);
Thanks to C++ polymorphism such small typo made almost bare SelectObject call instead of MFC-wrapped CPen-aware call. old variable gets initialized with old pen object ID, which then will be used as pointer to CPen. On Windows (in my test anyway) old (default) pen ID is 0x1B00017, which points in middle of some zero-filled memory block so this error was unnoticed. On Wine it is 0x60 hence crash. I doubt we should tune IDs and provide memory maps to work this around, unless there are many such programs with same problem.