X11 issues on Mac OS X solved

I cherish the day I got my MacBook Pro. It came preinstalled with Leopard (Mac OS X 10.5). Since Leopard X11 is part of the default install so you can run X11 programs out of the box. Surely I got exited and installed Macports (the BSD collection of tools for Mac OS X). It has loads of tools I need on a daily basis. One of the things I need is Wireshark (the artist formerly known as “Ethereal”). Installation was a breeze. Just sit back and watch how ports compiles the stuff that is needed to get Wireshark up and running.

After a while wireshark was good to go so I gave it a spin. The all familiar windows popped up and I started gathering some information from the network. After a while Wireshark crashed with an X11 error message. Same story with my favorite image editing tool “The Gimp”. Same X11 error message:

The program 'wireshark' received an X Window System error.This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
(Details: serial 18069 error_code 8 request_code 62 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)

I asked some friends who are long-time Mac OS X lovers. They all ran Tiger and X11 without a problem. Karel demonstrated how his wireshark ran smooth, like a train on vaseline, on his Tiger based MacBook Pro. So apparently the problem was in Leopard. In Leopard Apple switched X11 codebase from XFree86 to Xorg. This is generally good since the Xorg codebase is much cleaner and recent. However this could also be the father of the problems that I’m experiencing. I kind of let the problem slip my mind. There is a whole new Mac-world out there for me to discover so I jumped right in forgetting about my X11 problem.

Until now. I did some more searching on the internet and found out that the problem that occurs is related to a bug in XQuartz (the X11 implementation for Mac OS X). Under certain conditions it changed the color depth of the current color right under the nose of the application. No program would survive such violence from the X11 server and die. In Wireshark this would always happen when a scrollbar is attached to an output window. In Gimp it happens whenever I did a penstroke on the canvas.

Now I finally found a solution on the internet. New versions of XQuartz are published on the XQuartz website. I took version 2.1.3 and installed it. After that all instability problems are gone. Wireshark runs like a charm and I reinstalled gimp2 using Macports and it also runs like it should. So for all you Leopard users out there: update your X11 software and all problems are gone. Apparently the X11 update is not part of the regular system software updates or maybe only major updates.

Tags: , , , , , , , ,

2 Responses to “X11 issues on Mac OS X solved”

  1. Karel Says:

    Whee! Good thinking there. Glad it’s solved mate - and that things run like they should - like a “train on vaseline”.

  2. Eddie Says:

    Glad it’s solved mate

    Yeah me too! I hate it when things don’t work as they should. Having the gimp running now makes me more than happy since Mac OS X doesn’t come with any image editing tool. Where is MS Paint when you need it :-D

Leave a Reply