Hi, I think cairo.Win32Surface(dc) crashes under 64-bit Python v2.7.2 *probably* due to the fact that a DC handle is a long int which Win32Surface could not handle. This is just my guess, hope someone could verify. I used a PDFSurface instead and it works perfectly fine.
Here is a sample code to reproduce the crash: import cairo from win32api import * from win32gui import * dc = CreateCompatibleDC(0) # 0 means compatible with screen bm = CreateCompatibleBitmap(dc, 100, 100) old = SelectObject(dc, bm) s = cairo.Win32Surface(dc) # crashes here You can verify that 'dc' is non-NULL and is a long int.
don't want my email addr to appear in public
Fixed since 1.11: https://pycairo.readthedocs.io/en/latest/changelog.html#v1-11-0
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.