Bug 133406

Summary: xv can't grab screen
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Bryce Nesbitt <bryce2>
Component: X11 ApplicationsAssignee: Dr. Werner Fink <werner>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: ltrace backtrace

Description Bryce Nesbitt 2005-11-11 04:47:43 UTC
Trusty old xv... I've used it for years and years.  But now under SUSE 10.0 with KDE, it can't grab windows or screens.

To reproduce: launch xv, hit "grab", select a window.  xv prints:
bryce@linux:~> xv
X Error: BadDrawable (invalid Pixmap or Window parameter)
  Major Opcode:  14
Comment 1 Michael Gross 2005-11-14 17:30:45 UTC
I was able to reproduce this and created a backtrace with ltrace. This seems to be a KDE specific problem nontheless because the grabbing functions works fine when using Windowmaker for example. I receive the same error on stdout with KDE.
Comment 2 Michael Gross 2005-11-14 17:31:12 UTC
Created attachment 57289 [details]
ltrace backtrace
Comment 3 Dr. Werner Fink 2005-11-14 17:46:38 UTC
Sorry, I'm not willingly to support the broken KDE behaviour.
First XEmacs does not work, then xterm and other Xt applications
have troubles, now xv.
Comment 4 Dr. Werner Fink 2005-11-14 18:20:13 UTC
We've just tried this here and its works with KDE on x86_64 and SL 10.0.
Comment 5 Lubos Lunak 2005-11-14 21:00:24 UTC
Works fine for me too. Do you have a reliable way to reproduce the problem? Can you run xv with "-DEBUG 1" and provide the debug output?
Comment 6 Bryce Nesbitt 2005-11-16 08:38:44 UTC
What do you know, it's unreliable.  Sometimes it works for me.  Here's one that did not work:

> xv -DEBUG 1
...
...
DBGEVT: ButtonPress   ctrlW 408,308, state=10, button=1
DBGEVT: unknown event type (15), window 0x03a00380
DBGEVT: Expose 0x03a00380 0,0 400x170 count=0
DBGEVT: KeyPress   0x03a00380 state=10, keycode=22
DBGEVT: KeyPress   0x03a00380 state=10, keycode=10
DBGEVT: ButtonPress   0x03a00380 159,147, state=10, button=1
DBGEVT: Expose ctrlW 358,160 82x74 count=1
DBGEVT: Expose ctrlW 358,160 82x74 count=1
DBGEVT: Expose ctrlW 236,234 204x114 count=0
window: 0x03a00025  collapsed 2 expose events
        region bounding box: 236,160 204x188
DBGEVT: Expose 0x03a00059 235,107 96x1 count=4
DBGEVT: Expose 0x03a00059 233,108 98x1 count=3
DBGEVT: Expose 0x03a00059 232,109 99x1 count=2
DBGEVT: Expose 0x03a00059 231,110 100x2 count=1
DBGEVT: Expose 0x03a00059 230,112 101x68 count=0
DBGEVT: Expose 0x03a0006c 0,107 19x73 count=0
DBGEVT: Expose mainW 402,47 86x11 count=1
DBGEVT: Expose mainW 402,47 86x11 count=1
DBGEVT: Expose mainW 403,58 85x1 count=0
window: 0x03a0037f  collapsed 2 expose events
        region bounding box: 402,47 86x12
EXPOSE:  No configs pending.
DBGEVT: EnterNotify mainW
DBGEVT: LeaveNotify mainW
DBGEVT: Expose mainW 162,0 15x42 count=3
DBGEVT: Expose mainW 162,0 15x42 count=3
DBGEVT: Expose mainW 162,42 16x1 count=2
DBGEVT: Expose mainW 162,43 326x3 count=1
DBGEVT: Expose mainW 163,46 325x1 count=0
DBGEVT: Expose mainW 177,0 12x38 count=3
DBGEVT: Expose mainW 177,38 13x1 count=2
DBGEVT: Expose mainW 177,39 311x3 count=1
DBGEVT: Expose mainW 178,42 310x1 count=0
DBGEVT: Expose mainW 189,0 2x37 count=2
DBGEVT: Expose mainW 189,37 3x1 count=1
DBGEVT: Expose mainW 190,38 298x1 count=0
DBGEVT: Expose mainW 191,0 2x37 count=1
DBGEVT: Expose mainW 192,37 2x1 count=0
window: 0x03a0037f  collapsed 13 expose events
        region bounding box: 162,0 326x47
EXPOSE:  No configs pending.
X Error: BadDrawable (invalid Pixmap or Window parameter)
  Major Opcode:  14
Segmentation fault
>



Under gdb it does not actually crash:

gdb) run
Starting program: /usr/X11R6/bin/xv
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
X Error: BadDrawable (invalid Pixmap or Window parameter)
  Major Opcode:  14

Program exited with code 0377.
(gdb) bt
No stack.
(gdb)     





Try grabbing XV's own window to enhance the chance it will misbehave.
Comment 7 Bryce Nesbitt 2005-11-16 08:41:26 UTC
Again:

DBGEVT: Expose 0x03a00059 0,0 331x180 count=0
DBGEVT: Expose 0x03a0006c 0,0 19x180 count=0
DBGEVT: LeaveNotify mainW
DBGEVT: ButtonPress   ctrlW 408,305, state=10, button=1
DBGEVT: unknown event type (15), window 0x03a00380
DBGEVT: Expose 0x03a00380 0,0 400x170 count=0
DBGEVT: EnterNotify mainW
DBGEVT: LeaveNotify mainW
DBGEVT: ButtonPress   0x03a00380 171,147, state=10, button=1
DBGEVT: Expose ctrlW 358,154 82x80 count=1
DBGEVT: Expose ctrlW 358,154 82x80 count=1
DBGEVT: Expose ctrlW 238,234 202x114 count=0
window: 0x03a00025  collapsed 2 expose events
        region bounding box: 238,154 202x194
DBGEVT: Expose 0x03a00059 237,101 94x1 count=4
DBGEVT: Expose 0x03a00059 235,102 96x1 count=3
DBGEVT: Expose 0x03a00059 234,103 97x1 count=2
DBGEVT: Expose 0x03a00059 233,104 98x2 count=1
DBGEVT: Expose 0x03a00059 232,106 99x74 count=0
DBGEVT: Expose 0x03a0006c 0,101 19x79 count=0
DBGEVT: EnterNotify mainW
DBGEVT: LeaveNotify mainW
DBGEVT: ConfigureNotify mainW 15,30 480x270  synthetic
  CONFIG got hints (0x22  4,30)
  CONFIG set hints (0x22  15,30)
No configs pend.No redraw
X Error: BadDrawable (invalid Pixmap or Window parameter)
  Major Opcode:  14
Segmentation fault
bryce@linux:~/cvs/bryce/CityCarShare/Denali_Migration>  
Comment 8 Dr. Werner Fink 2005-11-16 10:12:28 UTC
The crash is forced in case of using the debug option
and if the error handler is called by the Xlib.
Comment 9 Dr. Werner Fink 2005-11-16 10:20:17 UTC
Question: Do you activly resize xv during the grab
action? This because with an fvwm2 I get something
shorter like this:

  DBGEVT: ButtonPress   rootW 902,656, state=0, button=1
  clickWin=0x10a1301: 416,206 816x818 depth=24d
  using 416,206 (816x818)
  Grabbing win (0000005f) 416,206 816x818
  MakeStdCmaps: have=5, des=5, ncols=256
  GenerateEpic(816,818) eSIZE=816,818 cSIZE=816,818 epicode=1
  SWP: xwa=8,206 816x818 xwc=8,198 816x818 off=8,8 bw=2 klg=0,0
  DBGEVT: ConfigureNotify mainW 0,0 816x818  real
  No configs pend.No redraw
  DBGEVT: Expose mainW 480,0 336x182 count=4
  DBGEVT: Expose mainW 480,0 336x182 count=4
  DBGEVT: Expose mainW 618,182 198x88 count=3
  DBGEVT: Expose mainW 0,270 162x276 count=2
  DBGEVT: Expose mainW 618,270 198x276 count=1
  DBGEVT: Expose mainW 0,546 816x272 count=0
  DBGEVT: Expose mainW 0,0 816x818 count=0
  window: 0x0400025e  collapsed 6 expose events
          region bounding box: 0,0 816x818
  EXPOSE:  No configs pending.
Comment 10 Bryce Nesbitt 2005-11-16 15:53:24 UTC
No, I don't resize anything.  But I click in the title bar, which might result in draging the window.
Comment 11 Bryce Nesbitt 2005-11-16 15:55:22 UTC
(gdb) run -DEBUG 1
Starting program: /usr/X11R6/bin/xv -DEBUG 1
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
MakeBrowCmap:  perfect = 1, ncols = 256
MakeStdCmaps: have=0, des=5, ncols=256
freeStdCmaps:  haveStdCmap = 0
freeStdCmaps:  haveStdCmap = 5
MakeStdCmaps: have=0, des=5, ncols=256
freeStdCmaps:  haveStdCmap = 0
freeStdCmaps:  haveStdCmap = 5
MakeStdCmaps: have=0, des=5, ncols=256
freeStdCmaps:  haveStdCmap = 0
GenerateEpic(480,270) eSIZE=480,270 cSIZE=480,270 epicode=0
DBGEVT: ConfigureNotify mainW 1,1 480x270  real
No configs pend.No redraw
DBGEVT: ReparentNotify mainW
Reparent: mainW=300037f ->win=300037f ->ev=300037f  ->parent=18017db  0,0
XGetAttr: mainW 0,0 480x270
XGetAttr: parent 4,30 480x270
SWP: xwa=1069,30 480x270 xwc=1069,30 480x270 off=4,30 bw=2 klg=0,0
DBGEVT: ConfigureNotify mainW 1069,30 480x270  synthetic
  CONFIG got hints (0x22  1,1)
  CONFIG set hints (0x22  1069,30)
No configs pend.No redraw
DBGEVT: MapNotify mainW
map event received on mainW/ctrlW
DBGEVT: Expose mainW 0,0 480x270 count=0
DBGEVT: Expose mainW 0,0 480x270 count=0
DBGEVT: Expose mainW 0,0 480x270 count=0
window: 0x0300037f  collapsed 2 expose events
        region bounding box: 0,0 480x270
EXPOSE:  No configs pending.
DBGEVT: ConfigureNotify mainW 1069,30 480x270  synthetic
  CONFIG got hints (0x22  1069,30)
  CONFIG set hints (0x22  1069,30)
No configs pend.No redraw
DBGEVT: EnterNotify mainW
DBGEVT: LeaveNotify mainW
DBGEVT: EnterNotify mainW
DBGEVT: LeaveNotify mainW
DBGEVT: EnterNotify mainW
DBGEVT: ButtonPress   mainW 183,135, state=10, button=3
DBGEVT: ConfigureNotify ctrlW 170,380 440x348  real
DBGEVT: ReparentNotify ctrlW
Reparent: mainW=300037f ->win=3000025 ->ev=3000025  ->parent=18019d6  0,0
DBGEVT: ConfigureNotify ctrlW 174,410 440x348  synthetic
  CONFIG got hints (0x33  170,380)
  CONFIG set hints (0x33  174,410)
DBGEVT: MapNotify ctrlW
DBGEVT: LeaveNotify mainW
DBGEVT: Expose mainW 0,5 33x1 count=4
DBGEVT: Expose mainW 0,5 33x1 count=4
DBGEVT: Expose mainW 0,6 35x1 count=3
DBGEVT: Expose mainW 0,7 36x1 count=2
DBGEVT: Expose mainW 0,8 37x2 count=1
DBGEVT: Expose mainW 0,10 38x260 count=0
window: 0x0300037f  collapsed 5 expose events
        region bounding box: 0,5 38x265
EXPOSE:  No configs pending.
DBGEVT: EnterNotify mainW
DBGEVT: ButtonPress   mainW 203,152, state=10, button=3
DBGEVT: unknown event type (18), window ctrlW
DBGEVT: ReparentNotify ctrlW
Reparent: mainW=300037f ->win=3000025 ->ev=3000025  ->parent=40  170,380
DBGEVT: LeaveNotify mainW
DBGEVT: EnterNotify mainW
DBGEVT: ButtonPress   mainW 214,167, state=10, button=3
DBGEVT: ReparentNotify ctrlW
Reparent: mainW=300037f ->win=3000025 ->ev=3000025  ->parent=18019ec  0,0
DBGEVT: ConfigureNotify ctrlW 174,410 440x348  synthetic
  CONFIG got hints (0x33  174,410)
  CONFIG set hints (0x33  174,410)
DBGEVT: MapNotify ctrlW
DBGEVT: Expose ctrlW 0,0 440x52 count=3
DBGEVT: Expose ctrlW 0,0 440x52 count=3
DBGEVT: Expose ctrlW 0,52 5x182 count=2
DBGEVT: Expose ctrlW 358,52 82x182 count=1
DBGEVT: Expose ctrlW 0,234 440x114 count=0
window: 0x03000025  collapsed 4 expose events
        region bounding box: 0,0 440x348
DBGEVT: Expose 0x03000059 0,0 331x180 count=0
DBGEVT: Expose 0x0300006c 0,0 19x180 count=0
DBGEVT: LeaveNotify mainW
DBGEVT: ButtonPress   ctrlW 404,306, state=10, button=1
DBGEVT: unknown event type (15), window 0x03000380
DBGEVT: Expose 0x03000380 0,0 400x170 count=0
DBGEVT: ButtonPress   0x03000380 175,142, state=10, button=1
DBGEVT: Expose ctrlW 358,158 82x76 count=1
DBGEVT: Expose ctrlW 358,158 82x76 count=1
DBGEVT: Expose ctrlW 234,234 206x114 count=0
window: 0x03000025  collapsed 2 expose events
        region bounding box: 234,158 206x190
DBGEVT: Expose 0x03000059 233,105 98x1 count=4
DBGEVT: Expose 0x03000059 231,106 100x1 count=3
DBGEVT: Expose 0x03000059 230,107 101x1 count=2
DBGEVT: Expose 0x03000059 229,108 102x2 count=1
DBGEVT: Expose 0x03000059 228,110 103x70 count=0
DBGEVT: Expose 0x0300006c 0,105 19x75 count=0
DBGEVT: ConfigureNotify ctrlW 182,407 440x348  synthetic
  CONFIG got hints (0x33  174,410)
  CONFIG set hints (0x33  182,407)
X Error: BadDrawable (invalid Pixmap or Window parameter)
  Major Opcode:  14

Program received signal SIGSEGV, Segmentation fault.
0x0805a405 in ?? ()
(gdb) bt
#0  0x0805a405 in ?? ()
#1  0x4033c4a0 in _IO_list_all_internal () from /lib/tls/libc.so.6
#2  0x00000001 in ?? ()
#3  0x080f03e3 in _IO_stdin_used ()
#4  0x0000000e in ?? ()
#5  0x44646142 in ?? ()
#6  0x61776172 in ?? ()
#7  0x20656c62 in ?? ()
#8  0x766e6928 in ?? ()
#9  0x64696c61 in ?? ()
#10 0x78695020 in ?? ()
#11 0x2070616d in ?? ()
#12 0x5720726f in ?? ()
#13 0x6f646e69 in ?? ()
#14 0x61702077 in ?? ()
#15 0x656d6172 in ?? ()
#16 0x29726574 in ?? ()
#17 0x00000000 in ?? ()
#18 0x00000000 in ?? ()
#19 0x00000000 in ?? ()
#20 0x00000000 in ?? ()
#21 0x00000000 in ?? ()
#22 0x00000000 in ?? ()
---Type <return> to continue, or q <return> to quit---
#23 0x00000000 in ?? ()
#24 0x00000000 in ?? ()
#25 0x00000000 in ?? ()
#26 0x00000000 in ?? ()
#27 0x00000000 in ?? ()
#28 0x00000000 in ?? ()
#29 0x00000000 in ?? ()
#30 0x00000000 in ?? ()
#31 0x00000000 in ?? ()
#32 0x00000000 in ?? ()
#33 0x00000000 in ?? ()
#34 0x00000000 in ?? ()
#35 0x00000000 in ?? ()
#36 0x00000000 in ?? ()
#37 0x4013159c in ?? () from /usr/X11R6/lib/libX11.so.6
#38 0x401349ac in _Xglobal_lock () from /usr/X11R6/lib/libX11.so.6
#39 0xbfb3b1f8 in ?? ()
#40 0x40072790 in _XError () from /usr/X11R6/lib/libX11.so.6
#41 0x40072790 in _XError () from /usr/X11R6/lib/libX11.so.6
#42 0x40072eaf in _XReply () from /usr/X11R6/lib/libX11.so.6
#43 0x400590db in XGetGeometry () from /usr/X11R6/lib/libX11.so.6
#44 0x080b7b0c in ?? ()
#45 0x08227008 in ?? ()
---Type <return> to continue, or q <return> to quit---
#46 0x01801b26 in ?? ()
#47 0xbfb3b7a4 in ?? ()
#48 0xbfb3b798 in ?? ()
#49 0xbfb3b794 in ?? ()
#50 0xbfb3b78c in ?? ()
#51 0xbfb3b788 in ?? ()
#52 0xbfb3b784 in ?? ()
#53 0xbfb3b780 in ?? ()
#54 0x0300000d in ?? ()
#55 0x00000000 in ?? ()
#56 0x0000000b in ?? ()
#57 0x00000003 in ?? ()
#58 0x00000000 in ?? ()
#59 0x00000003 in ?? ()
#60 0x00000006 in ?? ()
#61 0x00000001 in ?? ()
#62 0x00000000 in ?? ()
#63 0x000000ee in ?? ()
#64 0xbfb3b110 in ?? ()
#65 0xbfb3b113 in ?? ()
#66 0x00000000 in ?? ()
#67 0x01801b26 in ?? ()
#68 0x000000f3 in ?? ()
---Type <return> to continue, or q <return> to quit---
#69 0x000000f4 in ?? ()
#70 0x00000000 in ?? ()
#71 0x4033bff4 in ?? () from /lib/tls/libc.so.6
#72 0xbfb3b51c in ?? ()
#73 0x00000000 in ?? ()
#74 0xbfb3b330 in ?? ()
#75 0x40260016 in hack_digit.11650 () from /lib/tls/libc.so.6
#76 0x0805d785 in ?? ()
#77 0x00000194 in ?? ()
#78 0x00000132 in ?? ()
#79 0x00000132 in ?? ()
#80 0x40071ba9 in _XRead () from /usr/X11R6/lib/libX11.so.6
#81 0x0805dd97 in ?? ()
#82 0x081b1dd4 in png_libpng_ver ()
#83 0xbfb3c954 in ?? ()
#84 0xbfb3c958 in ?? ()
#85 0x0000015c in ?? ()
#86 0x00000000 in ?? ()
#87 0x000001b8 in ?? ()
#88 0x0000015c in ?? ()
#89 0x0000fdbf in ?? ()
#90 0x0000fec0 in ?? ()
#91 0x0000feca in ?? ()
---Type <return> to continue, or q <return> to quit---
#92 0x0000fed5 in ?? ()
#93 0x0000fedf in ?? ()
#94 0x0000ffe0 in ?? ()
#95 0x0000ffea in ?? ()
#96 0x00000000 in ?? ()
#97 0x00000000 in ?? ()
#98 0x000001b8 in ?? ()
#99 0x00000004 in ?? ()
#100 0x0823f990 in ?? ()
#101 0x1c8567ef in ?? ()
#102 0x5d29be1e in ?? ()
#103 0xa00ccdb7 in ?? ()
#104 0x952e07d4 in ?? ()
#105 0x1ff2e3e1 in ?? ()
#106 0xfcbd7354 in ?? ()
#107 0xab6d6656 in ?? ()
#108 0x7eaa4401 in ?? ()
#109 0xeabfac94 in ?? ()
#110 0x1614faf7 in ?? ()
#111 0x5c55411d in ?? ()
#112 0xb657e0a3 in ?? ()
#113 0x0d0af0e9 in ?? ()
#114 0x604b4a43 in ?? ()
---Type <return> to continue, or q <return> to quit---
#115 0xa19b9a88 in ?? ()
#116 0xd5d3cea9 in ?? ()
#117 0x302f28f1 in ?? ()
#118 0x3a393831 in ?? ()
#119 0x79786e3b in ?? ()
#120 0xb8b18f82 in ?? ()
#121 0xdbc7c5c4 in ?? ()
#122 0x4d4c1712 in ?? ()
#123 0x5f5e5352 in ?? ()
#124 0x77766961 in ?? ()
#125 0x8b8a837d in ?? ()
#126 0xafa89190 in ?? ()
#127 0xd0bcb9b2 in ?? ()
#128 0xf4ebe2da in ?? ()
#129 0x0302fefd in ?? ()
#130 0x08060504 in ?? ()
#131 0x0f0e0b09 in ?? ()
#132 0xbfb3c81c in ?? ()
#133 0xbfb3c6f8 in ?? ()
#134 0xbfb3c784 in ?? ()
#135 0x402486e4 in __libc_sigaction () from /lib/tls/libc.so.6
#136 0x08060119 in ?? ()
#137 0xbfb3c98c in ?? ()
---Type <return> to continue, or q <return> to quit---
#138 0xbfb3ca48 in ?? ()
#139 0xbfb3c9ec in ?? ()
#140 0x24242424 in ?? ()
#141 0x00000000 in ?? ()
#142 0x24242424 in ?? ()
#143 0x24242424 in ?? ()
#144 0x00000004 in ?? ()
#145 0x000030ed in ?? ()
#146 0x00000000 in ?? ()
#147 0x08227008 in ?? ()
#148 0x03000025 in ?? ()
#149 0x00000040 in ?? ()
#150 0x00000000 in ?? ()
#151 0x0006c6cd in ?? ()
#152 0x00000194 in ?? ()
#153 0x00000132 in ?? ()
#154 0x00000242 in ?? ()
#155 0x000002cc in ?? ()
#156 0x00000010 in ?? ()
#157 0x00000001 in ?? ()
#158 0x00000001 in ?? ()
#159 0x00000000 in ?? ()
#160 0x00000010 in ?? ()
---Type <return> to continue, or q <return> to quit---
#161 0x00000000 in ?? ()
#162 0x00000000 in ?? ()
#163 0x00000000 in ?? ()
#164 0x4033bba0 in _IO_file_jumps_mmap () from /lib/tls/libc.so.6
#165 0x00000000 in ?? ()
#166 0x00000000 in ?? ()
#167 0x00000000 in ?? ()
#168 0x00000000 in ?? ()
#169 0x00000000 in ?? ()
#170 0x000001e0 in ?? ()
#171 0x0000010e in ?? ()
#172 0x00000000 in ?? ()
#173 0x00000010 in ?? ()
#174 0x0822b9a0 in ?? ()
#175 0x00000040 in ?? ()
#176 0x00000001 in ?? ()
#177 0x0000000a in ?? ()
#178 0x00000001 in ?? ()
#179 0x00000000 in ?? ()
#180 0xffffffff in ?? ()
#181 0x00000000 in ?? ()
#182 0x00000000 in ?? ()
#183 0x00000020 in ?? ()
---Type <return> to continue, or q <return> to quit---
#184 0x00000001 in ?? ()
#185 0x00000002 in ?? ()
#186 0x00e28037 in ?? ()
#187 0x00828037 in ?? ()
#188 0x00000000 in ?? ()
#189 0x00000000 in ?? ()
#190 0x082276e8 in ?? ()
#191 0x00000000 in ?? ()
#192 0x00008005 in ?? ()
#193 0x00000001 in ?? ()
#194 0x00028005 in ?? ()
#195 0xbfb3ca88 in ?? ()
#196 0x08053145 in ?? ()
#197 0x00000000 in ?? ()
#198 0x00000000 in ?? ()
#199 0xbfb3ca88 in ?? ()
#200 0x0806fa60 in ?? ()
#201 0x00000020 in ?? ()
#202 0x00008005 in ?? ()
#203 0xbfb3ca88 in ?? ()
#204 0x00008005 in ?? ()
#205 0x00008005 in ?? ()
#206 0x00000001 in ?? ()
---Type <return> to continue, or q <return> to quit---
#207 0xbfb3cc68 in ?? ()
#208 0x080565f1 in ?? ()
#209 0x00000000 in ?? ()
#210 0x00000000 in ?? ()
#211 0x00000000 in ?? ()
#212 0x080ef543 in _IO_stdin_used ()
#213 0x080ef54b in _IO_stdin_used ()
#214 0x00000000 in ?? ()
#215 0xbff00000 in ?? ()
#216 0x00000000 in ?? ()
#217 0xbff00000 in ?? ()
#218 0x00000000 in ?? ()
#219 0xbfb3cc3c in ?? ()
#220 0xbfb3cc38 in ?? ()
#221 0x00000000 in ?? ()
#222 0x00000000 in ?? ()
#223 0x00000000 in ?? ()
#224 0x656e6f6e in ?? ()
#225 0x00000029 in ?? ()
#226 0x00000000 in ?? ()
#227 0x00000000 in ?? ()
#228 0x00000000 in ?? ()
#229 0x01000000 in ?? ()
---Type <return> to continue, or q <return> to quit---
#230 0x00000023 in ?? ()
#231 0x082322d8 in ?? ()
#232 0x00000000 in ?? ()
#233 0x00000000 in ?? ()
#234 0x00000000 in ?? ()
#235 0x00000000 in ?? ()
#236 0x01000000 in ?? ()
#237 0x00000000 in ?? ()
#238 0x00000000 in ?? ()
#239 0x00000000 in ?? ()
#240 0x00000000 in ?? ()
#241 0x00000000 in ?? ()
#242 0x00000000 in ?? ()
#243 0x00000000 in ?? ()
#244 0x00000000 in ?? ()
#245 0x00000000 in ?? ()
#246 0x00000000 in ?? ()
#247 0x00000000 in ?? ()
#248 0x00000000 in ?? ()
#249 0x00000005 in ?? ()
#250 0x00000000 in ?? ()
#251 0x00000000 in ?? ()
#252 0x00000000 in ?? ()
---Type <return> to continue, or q <return> to quit---
#253 0x00000000 in ?? ()
#254 0x4000c6de in _dl_name_match_p () from /lib/ld-linux.so.2
Previous frame inner to this frame (corrupt stack?)
(gdb)  
Comment 12 Bryce Nesbitt 2005-11-21 05:28:09 UTC
I've just tried under Gnome.  Here it does not crash.  And "autograb" works.  But "grab" is still weird -- middle button never works, and left button works only if you drag the window title bar.
Comment 13 Lubos Lunak 2005-11-29 16:11:47 UTC
Funny that nobody has yet run into similar problems, the screen grabbing code just keeps up with xv's general policy of being a bit broken here and there.

I can confirm it doesn't work well with GNOME. The reason is that unlike other screen grabbing apps xv doesn't grab the mouse but only sets up a passive button grab on the root window on all buttons (and it doesn't check for errors, it aborts here just because I have mouse gestures set up on the right mouse button). Which kinda doesn't work if the mouse press gets intercepted by another passive button grab, often set up by window managers to handle things like click-raise.

As for this bugreport, I have absolutely no idea why the problem happens. In xvgrab.c there's a call to XQueryPointer() immediately followed by a call to XGetGeometry() with the child obtained from XQueryPointer and it fails because the child is not valid anymore. Since xv again doesn't bother with error checking it just aborts. I don't see how this can happen, and in fact I've managed to reproduce it only once when trying very hard. I'm quite sure KDE doesn't just magically make windows disappear when one clicks on them. It may be Xlib bug, memory corruption, xv bug, black magic, whatever.

You might want to filter out more errors in xvErrorHandler() at least as a workaround.
Comment 14 Dr. Werner Fink 2005-11-29 16:57:07 UTC
Q: Would it help to use `GrabModeSync' instead of `GrabModeAsync'?
   Is there a way to avoid pointer grabs from KED/GNOME system?
Comment 15 Lubos Lunak 2005-11-29 17:10:14 UTC
A: I don't think so. I don't think so.

I think a simple solution could be changing xv to use a normal mouse grab just like all other apps. If you replace all the X(Un)GrabButton calls in xvgrab.c with matching X(Un)GrabPointer calls that'd probably do.
Comment 16 Dr. Werner Fink 2005-11-29 17:16:19 UTC
Hmmm ... then the KDE/GNOME system would make the X(Un)GrabButton interface
rather useless :(
Comment 17 Dr. Werner Fink 2005-11-30 11:36:50 UTC
Is there any chance that you're using a wheel mouse?
Comment 18 Bryce Nesbitt 2005-12-03 06:51:49 UTC
Yes, I have a wheel mouse.
I'm not willing to change that.
Comment 19 Dr. Werner Fink 2005-12-05 15:56:46 UTC
I've add some workarounds to catch the race in XGrabButton under KDE.
For an update for SL 10.0 I need a SWAMPID.
Comment 20 Michael Gross 2005-12-05 16:01:40 UTC
With this patched version, the grabbing functions works fine on my testmachine, which has no wheelmouse but crashed before, see comment #1
Comment 21 Andreas Jaeger 2005-12-07 11:04:59 UTC
Let's fix only 10.1.
Comment 22 Dr. Werner Fink 2005-12-07 11:08:51 UTC
already done