blino's website

Free software developer and more

This week-end, I wanted to edit a chestnut image, to put some brightness on this blog (and I love doing chestnut things). So, I fired up cooker's gimp. But I didn't really expect this marathon...

First, gimp 2.317 is not really usable, as explained on the release notes, mainly because of a segfault on selection copy. So, I backported revision 22643 patch from Gimp, and rebuilt the package. It still again. After the backport of several more patches that make proper use of g_slice, gimp still failed to run properly.

But this time, it was because of a mysterious Xlib error. On IRC, Liam pointed me to an upstream report that incrimates Xlib. The crash appearing in the latest 1.1.2 libX11 release.

So, I had to run a bisection on about 24 commits. I did that by rebuilding a snaphost of each revision and the rpm package (adding automake -a and autoheader calls to build from raw tarball).

$ git clone git://
$ cd libX11/
$ git-bisect start
$ git-bisect bad
$ git bisect good libX11-1.1.1

# (note to self, do not forget the trailing slash in prefix...)
$ git archive --format=tar --prefix=libX11-1.1.2/
 f93849dcc68bd5042ea0884e5190dc7c35b31d68 | bzip2 >
$ git bisect good f93849dcc68bd5042ea0884e5190dc7c35b31d68
# try next suggested commit
$ git archive --format=tar --prefix=libX11-1.1.2/
 95523387d619af5b400748898d722e080b5ce1a6 | bzip2 >
$ git bisect bad 95523387d619af5b400748898d722e080b5ce1a6
# and so on...
$ git bisect good 605d357074d556a05a3fba2e85cbea36a3204248
 a48386ce6b5f8fd2d9dc11a966c9bf5da59f3831 is first bad commit
 commit a48386ce6b5f8fd2d9dc11a966c9bf5da59f3831
 Author: Magnus Kessler <>
 Date:   Tue May 1 15:20:08 2007 +0200

   Switched function definitions from K&R to ANSI style.

 :040000 040000 78bcf3e9c54ff02d77c2e590e10d36bbe00610b4da6cdb57564533f1084b2ea2b9888c12884b151e M      src

Unfortunately, this "codestyle" patch was about 3000 lines long, let's go for another bisection round...

$ git log -p a48386ce6b5f8fd2d9dc11a966c9bf5da59f3831 >

# revert patch on libX11 1.1.1
(cd BUILD/libX11-1.1.2/; patch -p1 < ../../SOURCES/libX11-1.1.2-codestyle.patch)
# edit patch and remove some hunks, using manual bisection /o\
(cd BUILD/libX11-1.1.2/; patch -R -p1 < ../../SOURCES/libX11-1.1.2-codestyle.patch && make -j4) &&
  bm -l -i   --short-circuit && bm -l -b --short-circuit
# try testcase

After half a dozen of tries, I found the culprit, where XGetMotionEvents() arguments order was not corrected during the codestyle update.

The fix was a trivial patch that I submitted in an upstream bug report.

Finally, gimp works \o/ but my initial photograph is barely usable, the poor chestnuts being incomplete or too dark :-/ (and I was too tired to proceed with crafty tactics...)

I also submitted a 2.3.17 gimp package with my backports in cooker, but the build system was borked (for a change). And gimp 2.3.18 has been released in the meantime, gee!

Comments are closed for this story.

Trackbacks are closed for this story.

blosxom Optimised for standards.
Olivier Blin (2005)