XCreateImage returns NULL
Mikhail Teterin
mi+kde at aldan.algebra.com
Sat Apr 12 21:48:39 UTC 2008
Hello!
I have a weird problem on two machines already (both running FreeBSD-7, one is
i386, the other -- amd64). Both have xorg-libraries-7.3_1 installed:
xorg-docs-1.3,1/ xorg-fonts-miscbitmaps-7.2/
xorg-fonts-100dpi-7.2/ xorg-fonts-truetype-7.2/
xorg-fonts-7.2/ xorg-fonts-type1-7.2/
xorg-fonts-75dpi-7.2/ xorg-libraries-7.3_1/
xorg-fonts-cyrillic-7.2/ xorg-server-1.4_5,1/
The editors/xcoral port builds, but the installed executable dies on startup,
because the call to
2839 image = XCreateImage(dpy,
2840 DefaultVisual(dpy,DefaultScreen(dpy)),
2841 DefaultDepth(dpy,DefaultScreen(dpy)),
2842 ZPixmap,
2843 0,
2844 data,
2845 wp, hp, 32,
2846 wp * bytes_per_pixel);
returns NULL and the next line:
2847 image->bits_per_pixel = DefaultDepth(dpy,DefaultScreen(dpy));
dies. I'm not an expert on X11-programming, but the manual page does not even
describe possible reasons for failure, nor explains, how to query them
(errno?)
Also, in ALL of the examples, I could find online, nobody ever checks, what
XCreateImage returns:
http://www.codase.com/search/call?name=xcreateimage&start=10
It just is not supposed to fail, I guess -- but crashes here 100%...
Any ideas? Thanks!
-mi
More information about the freebsd-x11
mailing list