Date: Sat, 12 Apr 2008 17:13:33 -0400 From: Mikhail Teterin <mi+kde@aldan.algebra.com> To: x11@FreeBSD.org Subject: XCreateImage returns NULL Message-ID: <200804121713.33547@aldan>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804121713.33547>