Date: Sun, 20 Apr 2008 00:57:20 -0400 (EDT) From: "Mikhail T." <mi@aldan.algebra.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: x11@FreeBSD.org Subject: ports/122924: XCreateImage fails in most recent XOrg Message-ID: <200804200457.m3K4vKBI078635@aldan.algebra.com> Resent-Message-ID: <200804200520.m3K5K2NU037809@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 122924 >Category: ports >Synopsis: XCreateImage fails in most recent XOrg >Confidential: no >Severity: critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Apr 20 05:20:02 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Mikhail T. >Release: FreeBSD 7.0-STABLE amd64 >Organization: Virtual Estates, Inc. (http://sybpipe.com/) >Environment: System: FreeBSD aldan.algebra.com 7.0-STABLE FreeBSD 7.0-STABLE #0: Sat Mar 8 16:02:37 EST 2008 root@aldan.algebra.com:/meow/obj/var/src/sys/SILVER-SMP amd64 >Description: XCreateImage seems to fail quite often now... The attached program, for example, fails for me (depth 24), but succeeds, if I hardcode the depth at 8. The program reports success, when compiled on RedHat 4 with its older X11 build. The example below is fairly artificial, but a real-world program fails to run -- crashes trying to use the result of XCreateImage(). I'm talking about the editors/xcoral port. >How-To-Repeat: #include <stdio.h> #include <stdlib.h> #include <sys/file.h> #include <ctype.h> #include <string.h> #include <sys/types.h> #include <sys/stat.h> #include <X11/Xlib.h> #include <X11/Xutil.h> int main(int argc, char **argv) { Display *display; int screen, depth; XImage *xi; Visual *visual; if ((display = XOpenDisplay(NULL)) == NULL) { fprintf(stderr, "Can not connect to Xserver. \n"); exit(1); } screen = DefaultScreen(display); visual = DefaultVisual(display, screen); depth = DefaultDepth(display, screen); xi = XCreateImage(display, visual, depth, ZPixmap, 0, 0, 24, 24, 32, 72); if (xi == NULL) { fprintf(stderr, "XCreateImage failed (depth %d).\n", depth); exit(2); } else fprintf(stderr, "XCreateImage succeeded (depth %d).\n", depth); XDestroyImage(xi); XCloseDisplay(display); exit(0); } >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804200457.m3K4vKBI078635>