Ticket #370 (closed crash: fixed)

Opened 23 months ago

Last modified 18 months ago

cmd + ~ breaks x11 (in particular it hangs all xterms)

Reported by: tudorm@… Owned by: jeremyhu@…
Priority: Expected Milestone: 2.5.1
Component: xserver Version: 2.3.5 (xserver-1.4.2-apple53)
Keywords: Cc: michael@…

Description

Both the latest Apple update and a subsequent install of XQuartz 2.5.0 suffer from this bug.

Cheers, Tudor

Change History

follow-up: ↓ 3   Changed 23 months ago by tudorm@…

Removing X11 and instead using XQuartz fixed the issue.

Cheers, T

follow-up: ↓ 4   Changed 23 months ago by jeremyhu@…

  • status changed from new to assigned
  • version changed from 2.5.0 (xserver-1.7) to 2.3.5 (xserver-1.4)
  • milestone set to 2.5.1

Your comment does not make sense. You said that the latest X11 and XQuartz-2.5.0 suffer from this issue, then you followed up saying XQuartz-2.5.0 does not suffer from this issue.

I don't see any issue with cmd-` or cmd-~ in either 2.3.5 or 2.5.0.

Please clarify.

in reply to: ↑ 1   Changed 22 months ago by michaelawells@…

Replying to tudorm@…:

Removing X11 and instead using XQuartz fixed the issue. Cheers, T

I experience this problem when using XQuartz 2-5.0 and the latest Apple update.

However, the problem does not occur when when I use XQuartz from an newly created account on my machine. This leads me to believe the issue is related to some interaction between the 10.6.3 update and some third party software or customization on my machine.

in reply to: ↑ 2   Changed 22 months ago by tudorm@…

Replying to jeremyhu@…:

Your comment does not make sense. You said that the latest X11 and XQuartz-2.5.0 suffer from this issue, then you followed up saying XQuartz-2.5.0 does not suffer from this issue. I don't see any issue with cmd-` or cmd-~ in either 2.3.5 or 2.5.0. Please clarify.

I apologize I was not sufficiently clear. First, the update from apple broke X11 in the fashion I mentioned. Then, I installed XQuartz 2.5.0 in the hope I would get rid of the problem---I did not. Subsequently I trashed (rm -fr) the /Applications/Utilities/X11 and /Applications/Utilities/XQuartz and re-installed XQuartz, at which point the problem vanished.

Cheers, T

in reply to: ↑ description   Changed 22 months ago by michaelawells@…

Replying to tudorm@…:

Both the latest Apple update and a subsequent install of XQuartz 2.5.0 suffer from this bug. Cheers, Tudor

I have more information to offer on how to reproduce the problem:

The problem only occurs for me if the "Enable key equivalents under X11" option is disabled from the System Preferences/Input tab.

If I enable this option, using the cmd-` key does not cause a hang.

  Changed 22 months ago by jeremyhu@…

  • priority changed from blocker to critical

Ok, thanks for the info.

follow-up: ↓ 8   Changed 22 months ago by jeremyhu@…

It's not a hang. Input events just aren't being delivered.

in reply to: ↑ 7   Changed 22 months ago by michaelawells@…

Replying to jeremyhu@…:

It's not a hang. Input events just aren't being delivered.

In any case, input events are delivered until I press cmd-`. After that, none of the windows I have open (xterm, emacs, etc.) will accept any input. So, it appears hung to me.

  Changed 22 months ago by jeremyhu@…

Right. I understand it is a bug, and it puts you into a state where you cannot interact with the program, but I'm providing diagnosis detail and clarification for my benefit later.

  Changed 22 months ago by jeremyhu@…

bisected to:

afa2aa860aa2e76c33daf0b1ecc5f5dd79e3a050 is the first bad commit commit afa2aa860aa2e76c33daf0b1ecc5f5dd79e3a050 Author: Jeremy Huddleston <jeremyhu@…> Date: Wed Nov 4 12:27:24 2009 -0800

dix: Properly detect if the other device is frozen

Signed-off-by: Jeremy Huddleston <jeremyhu@…> (cherry picked from commit 7f48713a780e14b08e8e71c6ad3a11a7e17813b8)

:040000 040000 e157256762cc8a2bf175be1e61db405792a98e4c 46733df793aa0ce61f04a765ea57e6ad15308fbc M dix

which is interesting because this commit was actually made to address a similar issue back in October:  http://lists.macosforge.org/pipermail/xquartz-dev/2009-October/date.html threads are named "frozen keyboard/mouse" "Input Grab (Input on Focus) issue" and "keyboard/mouse focus issues"

follow-ups: ↓ 12 ↓ 13   Changed 22 months ago by jeremyhu@…

  • status changed from assigned to closed
  • resolution set to fixed

The fix will land in the first alpha for 2.5.1, and you can get it here:

 http://static.macosforge.org/xquartz/downloads/testing/quartz-wm-PR-370.bz2

just download that and replace /opt/X11/bin/quartz-wm with it after decompression.

The patch that I bisected this issue to in the server actually fixed a real bug that was discussed at length in October, and by fixing that, we actually revealed a bug in quartz-wm! ><

in reply to: ↑ 11   Changed 22 months ago by michaelawells@…

Replying to jeremyhu@…:

The fix will land in the first alpha for 2.5.1, and you can get it here:  http://static.macosforge.org/xquartz/downloads/testing/quartz-wm-PR-370.bz2 just download that and replace /opt/X11/bin/quartz-wm with it after decompression. The patch that I bisected this issue to in the server actually fixed a real bug that was discussed at length in October, and by fixing that, we actually revealed a bug in quartz-wm! ><

The new version of quartz-wm fixed the problem for me. Thanks!

in reply to: ↑ 11 ; follow-up: ↓ 14   Changed 22 months ago by michaelawells@…

Replying to jeremyhu@…:

The fix will land in the first alpha for 2.5.1, and you can get it here:  http://static.macosforge.org/xquartz/downloads/testing/quartz-wm-PR-370.bz2 just download that and replace /opt/X11/bin/quartz-wm with it after decompression. The patch that I bisected this issue to in the server actually fixed a real bug that was discussed at length in October, and by fixing that, we actually revealed a bug in quartz-wm! ><

The patch works, but I am no longer able to input a tilde (~) or backquote (`) into a window.

CMD+~ and CMD+` should cycle/reverse-cycle through open windows.

Now, ~ and ` cycle/reverse through open windows as well.

in reply to: ↑ 13   Changed 22 months ago by jeremyhu@…

  • status changed from closed to reopened
  • resolution fixed deleted

Replying to michaelawells@…:

The patch works, but I am no longer able to input a tilde (~) or backquote (`) into a window.

Hmm... that's no good.

CMD+~ and CMD+` should cycle/reverse-cycle through open windows.

Yep... and before you could only cycle one-way.

Now, ~ and ` cycle/reverse through open windows as well.

yeah... that's not so good. I think I missed a check in there for the cmd-modifier. my bad. gimme a few.

follow-up: ↓ 16   Changed 22 months ago by jeremyhu@…

  • status changed from reopened to closed
  • resolution set to fixed

This one should be good. Sorry for rushing out the fix earlier:

 http://static.macosforge.org/xquartz/downloads/testing/quartz-wm-PR-370-r2.bz2

in reply to: ↑ 15   Changed 22 months ago by michaelawells@…

Replying to jeremyhu@…:

This one should be good. Sorry for rushing out the fix earlier:  http://static.macosforge.org/xquartz/downloads/testing/quartz-wm-PR-370-r2.bz2

When I use this version, quartz-wm does not load successfully. Here is a copy of the message placed in /var/log/system.log:

Apr 1 15:08:26 mawmini org.macosforge.xquartz.startx[15893]: Xquartz starting: Apr 1 15:08:26 mawmini org.macosforge.xquartz.startx[15893]: X.Org X Server 1.7.6 Apr 1 15:08:26 mawmini org.macosforge.xquartz.startx[15893]: Build Date: 20100329 Apr 1 15:08:28 mawmini org.macosforge.xquartz.startx[15893]: font_cache: Done Apr 1 15:08:28 mawmini org.macosforge.xquartz.startx[15893]: dyld: Library not loaded: /opt/local/lib/libAppleWM.7.dylib Apr 1 15:08:28 mawmini org.macosforge.xquartz.startx[15893]: Referenced from: /opt/X11/bin/quartz-wm Apr 1 15:08:28 mawmini org.macosforge.xquartz.startx[15893]: Reason: image not found

  Changed 22 months ago by jeremyhu@…

rrrg... it looks like I linked it against MacPorts, sorry. ><

This one is linked against the correct libs:

 http://static.macosforge.org/xquartz/downloads/testing/quartz-wm-PR-370-r3.bz2

  Changed 22 months ago by michaelawells@…

Using PR-370-r3, there is now a complaint about the version of libpixman-1.0.dylib:

Apr 1 18:46:45 mawmini org.macosforge.xquartz.startx[17167]: Xquartz starting: Apr 1 18:46:45 mawmini org.macosforge.xquartz.startx[17167]: X.Org X Server 1.7.6 Apr 1 18:46:45 mawmini org.macosforge.xquartz.startx[17167]: Build Date: 20100329 Apr 1 18:46:45 mawmini org.macosforge.xquartz.startx[17167]: font_cache: Done Apr 1 18:46:47 mawmini org.macosforge.xquartz.privileged_startx[17175]: font_cache: Done Apr 1 18:46:47 mawmini org.macosforge.xquartz.startx[17167]: X11.app Handing off fd to server thread via DarwinListenOnOpenFD(6) Apr 1 18:46:47 mawmini org.macosforge.xquartz.startx[17167]: DarwinListenOnOpenFD: 6 Apr 1 18:46:48 mawmini org.macosforge.xquartz.startx[17167]: Calling ListenOnOpenFD() for new fd: 6 Apr 1 18:46:49 mawmini org.macosforge.xquartz.startx[17167]: dyld: Library not loaded: /opt/X11/lib/libpixman-1.0.dylib Apr 1 18:46:49 mawmini org.macosforge.xquartz.startx[17167]: Referenced from: /opt/X11/bin/quartz-wm Apr 1 18:46:49 mawmini org.macosforge.xquartz.startx[17167]: Reason: Incompatible library version: quartz-wm requires version 19.0.0 or later, but libpixman-1.0.dylib provides version 17.0.0 Apr 1 18:46:49 mawmini org.macosforge.xquartz.startx[17167]: waiting for X server to shut down

  Changed 22 months ago by jeremyhu@…

ugg. That's because I have 2.5.1 runtime right now. ><

I'm tired of this. Please just revert to the 2.5.0 version. I'll have a 2.5.1_alpha1 out sometime in the next week or so which will have the fix.

  Changed 22 months ago by michael@…

  • cc michael@… added

Cc Me!

  Changed 22 months ago by jeremyhu@…

  Changed 19 months ago by amitp@…

With XQuartz 2.5.1_rc2 I'm seeing behavior similar to what michaelawells described ( acts like Cmd- instead of inserting a `, and the same with ~), but only *after* changing the xmodmap in a specific way. Here's the simplest test case I can produce:

1. Start XQuartz, with no .Xmodmap file. 2. Bring up a second xterm. Press to verify that you do get the character. 3. Run: xmodmap -e 'clear mod2' Press to verify that you do get the character. 4. Run: xmodmap -e 'keycode 90 = KP_0' 5. Press and it will switch windows instead of inserting a character.

It doesn't seem to matter what keycode I assign in step 4. It *does* matter which mod I clear in step 3; only clearing mod2 (Meta) seems to produce the behavior, probably because Cmd-` is using the meta key. I have tried various combinations of “Follow system keyboard layout”, “Enable key equivalents under X11”, “Option keys send Alt_L and Alt_R”, and they don't seem to affect this behavior.

  Changed 19 months ago by amitp@…

Ugh, sorry about formatting. Let me try again (I don't see a way to edit)

With XQuartz 2.5.1_rc2 I'm seeing behavior similar to what michaelawells described (` acts like Cmd-` instead of inserting a `, and the same with ~), but only after changing the xmodmap in a specific way. Here's the simplest test case I can produce:

  1. Start XQuartz, with no .Xmodmap file.
  2. Bring up a second xterm. Press ` to verify that you do get the character.
  3. Run: xmodmap -e 'clear mod2' Press ` to verify that you do get the character.
  4. Run: xmodmap -e 'keycode 90 = KP_0'
  5. Press ` and it will switch windows instead of inserting a character.

It doesn't seem to matter what keycode I assign in step 4. It does matter which mod I clear in step 3; only clearing mod2 (Meta) seems to produce the behavior. I have tried various combinations of “Follow system keyboard layout”, “Enable key equivalents under X11”, “Option keys send Alt_L and Alt_R”, and they don't seem to affect this behavior.

  Changed 18 months ago by macosforge@…

  • status changed from closed to reopened
  • resolution fixed deleted

Ugh; this is hitting me too. It happens with 2.5.2 release on 10.6.4.

Specifically: 1) I do not have Enable Key Equivalents under X11 checked. 2) When I hit CMD-`, it stops input to all windows.

As an emacs user, having M-w (copy) morph into CMD-w (close window) isn't fun.

Let me know what I can do to help diagnose.

  Changed 18 months ago by jeremyhu@…

  • status changed from reopened to closed
  • resolution set to fixed

Try with 2.5.3 when it is released which has the fix for the missed corner case.

Note: See TracTickets for help on using tickets.