Re: XI2 pull warning
Thomas Jaeger thjae...@gmail.com writes: I've posted a build log (make -j4) here: http://pastebin.com/f3f965926 The more I think about it, the more it becomes clear to me that a recursive call to make can never do the right thing during a parallel build. Tom Of course it can. But if you have cross-module dependencies (and you probably do), then it can be quite painful to get it right (and even worse to maintain it). The canonical reference is of course recursive make considered harmful. eirik Dan Nicholson wrote: On Tue, Jun 2, 2009 at 8:24 AM, Thomas Jaeger thjae...@gmail.com wrote: Peter Hutterer wrote: actually, the reason for this could be a missing dependency in the man pages. If you can reproduce this error, just check the Makefile.am for the dependency setup for the file it fails on. I've tried triggering it but without success. My theory is that it's a race condition, where due to the recursive call of make the same man page is built at the same time by both processes and then the second mv fails. Can you show the error? ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: XI2 pull warning
I've posted a build log (make -j4) here: http://pastebin.com/f3f965926 The more I think about it, the more it becomes clear to me that a recursive call to make can never do the right thing during a parallel build. Tom Dan Nicholson wrote: On Tue, Jun 2, 2009 at 8:24 AM, Thomas Jaeger thjae...@gmail.com wrote: Peter Hutterer wrote: actually, the reason for this could be a missing dependency in the man pages. If you can reproduce this error, just check the Makefile.am for the dependency setup for the file it fails on. I've tried triggering it but without success. My theory is that it's a race condition, where due to the recursive call of make the same man page is built at the same time by both processes and then the second mv fails. Can you show the error? -- Dan ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: XI2 pull warning
On Sat, May 30, 2009 at 9:29 AM, John Tapsell johnf...@gmail.com wrote: 2009/5/29 Peter Hutterer peter.hutte...@who-t.net: On Thu, May 28, 2009 at 02:54:22PM -0400, Thomas Jaeger wrote: Thanks for the work you've put into this. I haven't spent a lot of time testing the new code, but here are my first impressions. You're probably aware of most of the issues below already, but I'll mention them just in case. Has anyone from wine had a look at the patch? Might it be good to get someone from there to sign off on this, since they need the XI2 stuff to have fairly specific behaviour? John Back in April Wine Weekly News mentioned Paul Hampson is working with XInput2: http://www.winehq.org/wwn/357#XInput 2 Spec http://www.winehq.org/pipermail/wine-devel/2009-April/074957.html Cheers, -Matt Helsley ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: XI2 pull warning
you're certainly keeping me busy :) thanks for all those reports On Sat, May 30, 2009 at 10:59:28AM -0400, Thomas Jaeger wrote: Peter Hutterer wrote: On Thu, May 28, 2009 at 02:54:22PM -0400, Thomas Jaeger wrote: Thanks for the work you've put into this. I haven't spent a lot of time testing the new code, but here are my first impressions. You're probably aware of most of the issues below already, but I'll mention them just in case. * The biggest issue for me right now is reporting of XI1 (see the attached test program). XSelectExtensionEvents and XGrabDevice/XGrabDeviceButton will only report press events; motion and release events are lost. Fixed. missing mask assignment in the case of an explicit passive grab. Thanks, this is working now. However, xournal is still won't accept any input (unless patched) because it discards events due to device_state not being set correctly. confirmed. I need to write a simple test program to check what exactly is going on there, I haven't found the exact source for the bug yet. * A driver sending a proximity event crashes the server. Fixed, thanks. GetProximityEvents still had the valuator event calculation in there and returned a wrong number of events. That, an an uninitialized pointer that was only triggerd for proximity events. Both fixes pushed. Thanks, this is mostly working now. There are still instances where proximity events lead to a crash, see the attached gdb session. I can't reproduce this after the load of patches I just pushed, so I'm assuming one of them fixed it :) * XIGrabButton always fails with a BadDevice error. Fixed, thanks. The check was in there to prevent passive grabbing of attaches slave devices, which in hindsight might have its use-cases though dealing with the modifiers can be trick. Documented in inputproto. It seems like XIGrabButton doesn't accept XIAnyModifier. this part was simply missing. It's implemented now and works. Also, a passive grab on XIAllDevices and XIAllMasterDevices works now. Also, the example code in xinput uses an older incompatible interface (patch attached). oops. I fixed this at least three times but each time forgot to push. sorry. pushed now. If XIGrabButton is called on a SD, the SD is not detached when the grab is activated. fixed. SDs are now detached for passive grabs, except if an implicit passive grab is activated. * libXi doens't support parallel builds (make -j2) anymore. works fine for me, not sure what's going on there. Okay, fair enough, this is not really important anyway. actually, the reason for this could be a missing dependency in the man pages. If you can reproduce this error, just check the Makefile.am for the dependency setup for the file it fails on. I've tried triggering it but without success. Cheers, Peter ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: XI2 pull warning
Peter Hutterer wrote: * A driver sending a proximity event crashes the server. Fixed, thanks. GetProximityEvents still had the valuator event calculation in there and returned a wrong number of events. That, an an uninitialized pointer that was only triggerd for proximity events. Both fixes pushed. Thanks, this is mostly working now. There are still instances where proximity events lead to a crash, see the attached gdb session. I can't reproduce this after the load of patches I just pushed, so I'm assuming one of them fixed it :) I can still reproduce it. It happens when a proximity event comes in when the SD is grabbed. If XIGrabButton is called on a SD, the SD is not detached when the grab is activated. fixed. SDs are now detached for passive grabs, except if an implicit passive grab is activated. Thanks, XIGrabButton on SDs is mostly working now. The only problem is that the original Press event is still delivered, which leads to inconsistent state on the MD until the button is pressed on another SD. * libXi doens't support parallel builds (make -j2) anymore. works fine for me, not sure what's going on there. Okay, fair enough, this is not really important anyway. actually, the reason for this could be a missing dependency in the man pages. If you can reproduce this error, just check the Makefile.am for the dependency setup for the file it fails on. I've tried triggering it but without success. My theory is that it's a race condition, where due to the recursive call of make the same man page is built at the same time by both processes and then the second mv fails. Thanks, Tom ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: XI2 pull warning
On Tue, Jun 2, 2009 at 8:24 AM, Thomas Jaeger thjae...@gmail.com wrote: Peter Hutterer wrote: actually, the reason for this could be a missing dependency in the man pages. If you can reproduce this error, just check the Makefile.am for the dependency setup for the file it fails on. I've tried triggering it but without success. My theory is that it's a race condition, where due to the recursive call of make the same man page is built at the same time by both processes and then the second mv fails. Can you show the error? -- Dan ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: XI2 pull warning
* It seems to be pretty easy to crash the server using XI1 applications. I'll provide more information later Yes please. I'd need some sort of test-case to debug crashes. Here's an easy to reproduce way to crash the server: Float the virtual XTest core pointer (you can't do this directly, but either a XI1 or XI2 grab will do), and then issue an XTest pointer event. The server will crash with a zero-dereference in Xext/xtest.c, line 386. Tom ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: XI2 pull warning
Thanks for the quick response. Peter Hutterer wrote: On Thu, May 28, 2009 at 02:54:22PM -0400, Thomas Jaeger wrote: Thanks for the work you've put into this. I haven't spent a lot of time testing the new code, but here are my first impressions. You're probably aware of most of the issues below already, but I'll mention them just in case. * The biggest issue for me right now is reporting of XI1 (see the attached test program). XSelectExtensionEvents and XGrabDevice/XGrabDeviceButton will only report press events; motion and release events are lost. Fixed. missing mask assignment in the case of an explicit passive grab. Thanks, this is working now. However, xournal is still won't accept any input (unless patched) because it discards events due to device_state not being set correctly. * A driver sending a proximity event crashes the server. Fixed, thanks. GetProximityEvents still had the valuator event calculation in there and returned a wrong number of events. That, an an uninitialized pointer that was only triggerd for proximity events. Both fixes pushed. Thanks, this is mostly working now. There are still instances where proximity events lead to a crash, see the attached gdb session. * XIGrabButton always fails with a BadDevice error. Fixed, thanks. The check was in there to prevent passive grabbing of attaches slave devices, which in hindsight might have its use-cases though dealing with the modifiers can be trick. Documented in inputproto. It seems like XIGrabButton doesn't accept XIAnyModifier. Also, the example code in xinput uses an older incompatible interface (patch attached). If XIGrabButton is called on a SD, the SD is not detached when the grab is activated. * libXi doens't support parallel builds (make -j2) anymore. works fine for me, not sure what's going on there. Okay, fair enough, this is not really important anyway. Thanks, Tom From d5a7e8a3a0bb1d136abcf239cd01d6001bd7af48 Mon Sep 17 00:00:00 2001 From: Thomas Jaeger thjae...@gmail.com Date: Fri, 29 May 2009 19:23:04 -0400 Subject: [PATCH] test-xi2: fix modifiers for XIGrabButton call Signed-off-by: Thomas Jaeger thjae...@gmail.com --- src/test_xi2.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/test_xi2.c b/src/test_xi2.c index b03b762..ede8d91 100644 --- a/src/test_xi2.c +++ b/src/test_xi2.c @@ -293,7 +293,7 @@ test_xi2(Display *display, XSync(display, False); { -int modifiers[] = {0, 0x10, 0x1, 0x11}; +XIGrabModifiers modifiers[] = {{0, 0}, {0, 0x10}, {0, 0x1}, {0, 0x11}}; int nmods = sizeof(modifiers)/sizeof(modifiers[0]); mask.deviceid = 2; -- 1.6.3.1 (gdb) bt #0 0x080845d9 in DeliverGrabbedEvent (event=0xccfdf88, thisDev=0xcba2b40, deactivateGrab=0) at ../../dix/events.c:3851 #1 0x08134700 in ProcessOtherEvent (ev=0xccfdf88, device=0xcba2b40) at ../../Xi/exevents.c:1109 #2 0x0814f29c in ProcessKeyboardEvent (ev=0xccfdf88, keybd=0xcba2b40) at ../../xkb/xkbPrKeyEv.c:181 #3 0x0809a15d in mieqProcessDeviceEvent (dev=0xcba2b40, event=0xccfdf88, screen=0xa065f98) at ../../mi/mieq.c:403 #4 0x0809a279 in mieqProcessInputEvents () at ../../mi/mieq.c:463 #5 0x080b7d87 in ProcessInputEvents () at ../../../../hw/xfree86/common/xf86Events.c:172 #6 0x0807bfee in Dispatch () at ../../dix/dispatch.c:358 #7 0x080675cd in main (argc=10, argv=0xbfe512f4, envp=Cannot access memory at address 0x8 ) at ../../dix/main.c:283 (gdb) print xi2 $10 = (xEvent *) 0x0 (gdb) print event-any.type == ET_ProximityOut $11 = 1 (gdb) ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: XI2 pull warning
2009/5/29 Peter Hutterer peter.hutte...@who-t.net: On Thu, May 28, 2009 at 02:54:22PM -0400, Thomas Jaeger wrote: Thanks for the work you've put into this. I haven't spent a lot of time testing the new code, but here are my first impressions. You're probably aware of most of the issues below already, but I'll mention them just in case. Has anyone from wine had a look at the patch? Might it be good to get someone from there to sign off on this, since they need the XI2 stuff to have fairly specific behaviour? John ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: XI2 pull warning
Hi Peter, Sorry for replying off-list first. Thanks for the work you've put into this. I haven't spent a lot of time testing the new code, but here are my first impressions. You're probably aware of most of the issues below already, but I'll mention them just in case. * The biggest issue for me right now is reporting of XI1 (see the attached test program). XSelectExtensionEvents and XGrabDevice/XGrabDeviceButton will only report press events; motion and release events are lost. * A driver sending a proximity event crashes the server. * XIGrabButton always fails with a BadDevice error. * It seems to be pretty easy to crash the server using XI1 applications. I'll provide more information later * libXi doens't support parallel builds (make -j2) anymore. I haven't played with XI2 code a lot yet, but the interface seems a lot nicer than XI1 so far. I can't think of any features that are missing right now except for button grabs and XTest support. Thanks, Tom Peter Hutterer wrote: This is a pull warning for XI2 into master. Next Thursday, Jun 4, I will pull XI2 into master. I will spend the rest of this week ironing out issues so that the merge will be smooth. There will be another warning email following the merge. In the meantime, please test the xi2 branches from git://people.freedesktop.org/~whot/xserver.git git://people.freedesktop.org/~whot/inputproto.git git://people.freedesktop.org/~whot/libXi.git #include X11/Xlib.h #include X11/extensions/XInput.h #include stdio.h #include stdlib.h #include string.h int main(int argc, char *argv[]) { Display *dpy = XOpenDisplay(NULL); XDevice *dev = NULL; { int i, n; XDeviceInfo *devs = XListInputDevices(dpy, n); if (!devs) exit(EXIT_FAILURE); for (i = 0; i n; i++) { if (strcmp(devs[i].name, Wacom Serial Tablet PC Pen Tablet/Digitizer)) continue; dev = XOpenDevice(dpy, devs[i].id); break; } if (!dev) exit(EXIT_FAILURE); XFreeDeviceList(devs); } Window root = DefaultRootWindow(dpy); Window window = XCreateSimpleWindow(dpy, root, 0, 0, 800, 800, 0, 0, 0); XMapWindow(dpy, window); XEventClass events[4]; int press, release, dummy, motion; DeviceButtonPress(dev, press, events[0]); DeviceButtonRelease(dev, release, events[1]); DeviceButtonMotion(dev, dummy, events[2]); DeviceMotionNotify(dev, motion, events[3]); XSelectExtensionEvent(dpy, window, events, 3); while (1) { XEvent ev; XNextEvent(dpy, ev); if (ev.type == press) { printf(press\n); } else if (ev.type == release) { printf(release\n); } else if (ev.type == motion) { printf(motion\n); } } } ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg
Re: XI2 pull warning
On Thu, May 28, 2009 at 02:54:22PM -0400, Thomas Jaeger wrote: Thanks for the work you've put into this. I haven't spent a lot of time testing the new code, but here are my first impressions. You're probably aware of most of the issues below already, but I'll mention them just in case. * The biggest issue for me right now is reporting of XI1 (see the attached test program). XSelectExtensionEvents and XGrabDevice/XGrabDeviceButton will only report press events; motion and release events are lost. Fixed. missing mask assignment in the case of an explicit passive grab. * A driver sending a proximity event crashes the server. Fixed, thanks. GetProximityEvents still had the valuator event calculation in there and returned a wrong number of events. That, an an uninitialized pointer that was only triggerd for proximity events. Both fixes pushed. * XIGrabButton always fails with a BadDevice error. Fixed, thanks. The check was in there to prevent passive grabbing of attaches slave devices, which in hindsight might have its use-cases though dealing with the modifiers can be trick. Documented in inputproto. * It seems to be pretty easy to crash the server using XI1 applications. I'll provide more information later Yes please. I'd need some sort of test-case to debug crashes. * libXi doens't support parallel builds (make -j2) anymore. works fine for me, not sure what's going on there. Cheers, Peter ___ xorg mailing list xorg@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/xorg