ports/122924: XCreateImage fails in most recent XOrg
Mikhail T.
mi at aldan.algebra.com
Sun Apr 20 05:20:03 UTC 2008
>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 at 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:
More information about the freebsd-ports-bugs
mailing list