21.02.2012 12:55, Andreas Beckmann kirjoitti: > On 2011-09-15 16:20, Andreas Beckmann wrote: >> On 2010-08-25 03:33, Andreas Beckmann wrote: >>> On Sunday, 8. August 2010 09:06:37 Andres Mejia wrote: >>>> For apps such as xbmc or mplayer that use vdpau for video output, calling >>>> XCloseDisplay results in a segfault. Simple test would be to run >> >>> I could reproduce this with mplayer from Debian (but not the one from >>> debian-multimedia.org) and driver 195.36.31. Stacktrace looked like this: >> >> I just tried again, but I could no longer reproduce this with libvdpau1 >> 0.4.1-2 (testing), 0.4.1-3 (unstable, should have a fix for this issue) >> or 0.4-1 (snapshot.d.o, probably the version I used to reproduce this >> last year) and mplayer from squeeze and wheezy. >> >> But then, over the last year a lot has changed: X, mplayer, libs, nvidia >> driver ... >> >> Andres, can you still reproduce this? > > Ping. Any test result? > If noone can still reproduce this I'll close this bug as fixed in 4 weeks.
Testcase attached. Also, this is a libvdpau bug, not a nvidia-vdpau-driver one. It crashes with all drivers, whether VDPAU is supported or not (as the bug is caused by the probing code in libvdpau). -- Anssi Hannula
/* * Testcase for Debian bug #592204. * This will trigger a segmentation fault. * * Written by Anssi Hannula <an...@mageia.org> * * gcc -o vdpau-debian-592204 vdpau-debian-592204.c -lX11 -ldl */ #include <X11/Xlib.h> #include <vdpau/vdpau_x11.h> #include <stdio.h> #include <stdlib.h> #include <dlfcn.h> int main() { Display *dpy; void *libvdpau; VdpDeviceCreateX11 *vdp_create; VdpGetProcAddress *vdp_get_proc_address; VdpDeviceDestroy *vdp_destroy; char *error; VdpStatus status; VdpDevice device; dpy = XOpenDisplay(NULL); if (!dpy) { fprintf(stderr, "Unable to open display."); return EXIT_FAILURE; } libvdpau = dlopen("libvdpau.so.1", RTLD_LAZY); if (!libvdpau) { fprintf(stderr, "%s\n", dlerror()); return EXIT_FAILURE; } *(void **) (&vdp_create) = dlsym(libvdpau, "vdp_device_create_x11"); if ((error = dlerror()) != NULL) { fprintf(stderr, "%s\n", error); return EXIT_FAILURE; } status = vdp_create(dpy, DefaultScreen(dpy), &device, &vdp_get_proc_address); if (status == VDP_STATUS_OK) { /* We don't actually have use for it, so destroy it immediately if it was created successfully. Since the segfault is caused by the probing code in libvdpau, it will happen regardless of whther device creation succeeded or not. */ status = vdp_get_proc_address(device, VDP_FUNC_ID_DEVICE_DESTROY, (void*)&vdp_destroy); if (status != VDP_STATUS_OK) { fprintf(stderr, "Unable to get VdpDeviceDestroy."); return EXIT_FAILURE; } status = vdp_destroy(device); if (status != VDP_STATUS_OK) { fprintf(stderr, "Unable to destroy VdpDevice."); return EXIT_FAILURE; } } else { puts("VDPAU device not created - it doesn't matter for this testcase."); } if (dlclose(libvdpau)) { fprintf(stderr, "%s\n", dlerror()); return EXIT_FAILURE; } puts("Calling XCloseDisplay() - this will segfault."); XCloseDisplay(dpy); }