imlib1 does not correctly handle 32-bit visuals

Bug #70367 reported by BernardB
68
Affects Status Importance Assigned to Milestone
compiz (Ubuntu)
Invalid
Undecided
Unassigned
Declined for Feisty by Scott Kitterman
imlib (Ubuntu)
Fix Released
Undecided
Michael Vogt
Declined for Feisty by Scott Kitterman

Bug Description

With the compositing extension turned on in the X server, some applications linked with gdk-imlib1 crash with a "Gdk-ERROR: BadMatch" when 32-bit and 24-bit visuals are combined. Enabling "XLIB_SKIP_ARGB_VISUALS=1" in the environment prevents xlib from informing imlib about 32-bit visuals. However, if imlib can't support 32-bit visuals, then it shouldn't attempt to use them in the first place. (I'm not certain that imlib doesn't support 32-bit visuals, but a brief trawl through the code doesn't suggest that it does).

This is the root cause of qiv Bug #41056 and possibly other apps linked with imlib1/gdk-imlib1.

The attached patch for imlib1 caps the maximum depth used by imlib to 24-bit, and fixes qiv Bug #41056 for me.

Revision history for this message
BernardB (b-launchpad) wrote :
Revision history for this message
Matt Zimmerman (mdz) wrote :

I can no longer reproduce this problem with curent Feisty.

Revision history for this message
Mackenzie Morgan (maco.m) wrote :

I can reproduce it on current Feisty. The problem occurs if you try to run gnome-breakout.

Changed in imlib:
status: Unconfirmed → Confirmed
Revision history for this message
Sinisa Segvic (sinisa-segvic) wrote :

Just to let you know that I also seem to have a problem
with this bug on edgy.

My program uses libImlib.so.11 for drawing images into an XWindow.
This functionality has been stable at least since 2000.
The problem manifests only with random garbled images displayed.
No crash whatsoever.

The problem goes away after saying XLIB_SKIP_ARGB_VISUALS=1.

Hope this helps and thanks for the solution!

SInisa

Revision history for this message
Brian Pitts (bpitts) wrote :

I can reproduce this on a current Feisty with gnome-breakout and nethack-gnome.

Revision history for this message
samhassell (samhassell) wrote :

I can also reproduce this with Feisty and nethack-gnome.

The follow output is given at the command line:

Gtk-WARNING **: Unable to locate loadable module in module_path: "liblighthouseblue.so",

Gtk-WARNING **: Unable to locate loadable module in module_path: "liblighthouseblue.so",

Gtk-WARNING **: Unable to locate loadable module in module_path: "liblighthouseblue.so",

Gtk-WARNING **: Unable to locate loadable module in module_path: "liblighthouseblue.so",
Gdk-ERROR **: BadMatch (invalid parameter attributes)
  serial 25842 error_code 8 request_code 62 minor_code 0
Gdk-ERROR **: BadMatch (invalid parameter attributes)
  serial 25846 error_code 8 request_code 62 minor_code 0

Revision history for this message
BernardB (b-launchpad) wrote :

Well has anybody tried the patch I posted when I filed this bug?

I can still reproduce the bug on fiesty too without the patch, and I can still verify that if I apply this patch to gdk-imlib11, rebuild and install the resulting gdk-imlib11 package, the bug is fixed.

Revision history for this message
Daniel Hahler (blueyed) wrote : Confirming patch to work

BernardB, I've just tried your patch and can confirm that it fixes this issue.

Revision history for this message
elpargo (jorge-vargas) wrote :

+1 on the patch imlib is way too old so they assume 24 was max. anyone found where it's tracker is so a bug could be reported?

Revision history for this message
Sinisa Segvic (sinisa-segvic) wrote :

BernardB, your patch fixed my issue (garbled images displayed)
on fiesty with imlib 1,9,15. Thanks, and sorry for the delay!

Revision history for this message
Bryce Harrington (bryce) wrote :

mvo, this has a patch to imlib that might be worth considering for compiz

Changed in compiz:
status: New → Confirmed
Revision history for this message
Travis Watkins (amaranth) wrote :

The patch (and bug) are for imlib, not compiz.

Changed in compiz:
status: Confirmed → Invalid
Revision history for this message
Cesare Tirabassi (norsetto) wrote :

The above patch fixes the issue for gutsy.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

The patch name was not very clear as a future reference and has been changed to max24bbp.

Revision history for this message
Daniel Holbach (dholbach) wrote :

Michael: can you take a look at it?

Changed in imlib:
assignee: nobody → mvo
Revision history for this message
Michael Vogt (mvo) wrote :

The patch looks good and fixes the gnome-breakout failure under compiz for me. I sponsored the upload, thanks a lot Cesare!

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

imlib (1.9.15-3ubuntu2) gutsy; urgency=low

  * Include patch (max24bpp.patch) to fix mishandling of 32-bit
    visuals (LP: #70367)

 -- Cesare Tirabassi <email address hidden> Thu, 16 Aug 2007 15:25:20 +0200

Changed in imlib:
status: Confirmed → Fix Released
Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Thanks go to BernardB, he is the one that came up with the fix. Kudos to him!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.