Personal photo management for the GNOME desktop

f-spot slideshow fails with "Mesa 7.4 implementation error: bad wrapMode in clamp_rect_coord_linear"

Reported by Jerome Lacoste on 2009-04-17
8
Affects Status Importance Assigned to Milestone
F-Spot
Invalid
Undecided
Unassigned
Mesa
Fix Released
Medium
mesa (Ubuntu)
Undecided
Unassigned
xserver-xorg-video-nv (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: libgl1-mesa-glx

Issue is probably in mesa not in f-spot, so reporting

1. start f-spot with several pictures in it
2. select slideshow

Expected:
F-spot slideshows my pictures

Actual:
a new window appears but stays black. The CPU goes 100% and the console displays:
Mesa 7.4 implementation error: bad wrapMode in clamp_rect_coord_linear
Please report at bugzilla.freedesktop.org
Mesa 7.4 implementation error: bad wrapMode in clamp_rect_coord_linear
Please report at bugzilla.freedesktop.org
Mesa 7.4 implementation error: bad wrapMode in clamp_rect_coord_linear
Please report at bugzilla.freedesktop.org
Mesa 7.4 implementation error: bad wrapMode in clamp_rect_coord_linear
Please report at bugzilla.freedesktop.org
Mesa 7.4 implementation error: bad wrapMode in clamp_rect_coord_linear
Please report at bugzilla.freedesktop.org
Mesa 7.4 implementation error: bad wrapMode in clamp_rect_coord_linear
Please report at bugzilla.freedesktop.org
[...]

some info:

01:00.0 VGA compatible controller: nVidia Corporation G72M [Quadro NVS 110M/GeForce Go 7300] (rev a1)
        Subsystem: Lenovo Device 2065
        Flags: bus master, fast devsel, latency 0, IRQ 10
        Memory at d1000000 (32-bit, non-prefetchable) [size=16M]
        Memory at c0000000 (64-bit, prefetchable) [size=256M]
        Memory at d0000000 (64-bit, non-prefetchable) [size=16M]
        Capabilities: <access denied>
        Kernel modules: nvidiafb

$ lsb_release -rd
Description: Ubuntu 9.04
Release: 9.04

$ apt-cache policy f-spot
f-spot:
  Installed: 0.5.0.3-1ubuntu6
  Candidate: 0.5.0.3-1ubuntu6
  Version table:
 *** 0.5.0.3-1ubuntu6 0
        500 http://no.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

$ apt-cache policy libgl1-mesa-glx
libgl1-mesa-glx:
  Installed: 7.4-0ubuntu2
  Candidate: 7.4-0ubuntu2
  Version table:
 *** 7.4-0ubuntu2 0
        500 http://no.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

$ dpkg -l | grep mesa
ii libgl1-mesa-dev 7.4-0ubuntu2 A free implementation of the OpenGL API -- G
ii libgl1-mesa-dri 7.4-0ubuntu2 A free implementation of the OpenGL API -- D
ii libgl1-mesa-glx 7.4-0ubuntu2 A free implementation of the OpenGL API -- G
ii libglu1-mesa 7.4-0ubuntu2 The OpenGL utility library (GLU)
ii libglu1-mesa-dev 7.4-0ubuntu2 The OpenGL utility library -- development fi
ii mesa-common-dev 7.4-0ubuntu2 Developer documentation for Mesa
ii mesa-utils 7.4-0ubuntu2 Miscellaneous Mesa GL utilities

Xorg.0.log extract

(II) LoadModule: "nv"
(II) Loading /usr/lib/xorg/modules/drivers//nv_drv.so
(II) Module nv: vendor="X.Org Foundation"
        compiled for 1.6.0, module version = 2.1.12
        Module class: X.Org Video Driver
        ABI class: X.Org Video Driver, version 5.0

Bryce Harrington (bryce) wrote :

Hi jerome-lacoste,

Please attach the output of `lspci -vvnn`, and attach your /var/log/Xorg.0.log (and maybe Xorg.0.log.old) file from after reproducing this issue. If you've made any customizations to your /etc/X11/xorg.conf please attach that as well.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-xorglog
tags: added: needs-lspci-vvnn
Changed in mesa (Ubuntu):
status: New → Incomplete
Jerome Lacoste (jerome-lacoste) wrote :
Jerome Lacoste (jerome-lacoste) wrote :
Jerome Lacoste (jerome-lacoste) wrote :
Jerome Lacoste (jerome-lacoste) wrote :

Files attached as requested. I don't have a xorg.conf file.

Jerome Lacoste (jerome-lacoste) wrote :

Reverting to New after attaching the requested files

(Not sure if _I_ have to make this change, the workflow could be more explicit!)

Changed in mesa (Ubuntu):
status: Incomplete → New
Bryce Harrington (bryce) on 2009-04-28
Changed in mesa (Ubuntu):
status: New → Confirmed

One ubuntu user reported that every time he uses the slideshow feature in f-spot using ubuntu jaunty then he sees error like this printed to the terminal:

Mesa 7.4 implementation error: bad wrapMode in clamp_rect_coord_linear
Please report at bugzilla.freedesktop.org
Mesa 7.4 implementation error: bad wrapMode in clamp_rect_coord_linear
Please report at bugzilla.freedesktop.org
Mesa 7.4 implementation error: bad wrapMode in clamp_rect_coord_linear
Please report at bugzilla.freedesktop.org
Mesa 7.4 implementation error: bad wrapMode in clamp_rect_coord_linear
Please report at bugzilla.freedesktop.org

While these errors are printed to the terminal a new window appears [for the slideshow] but it stays black and the CPU goes to 100%.

User has a "Quadro NVS 110M/GeForce Go 7300" (G72M chipset) and he is using the open source *-nv xorg driver.

The xorg.log for this user:
http://launchpadlibrarian.net/25817232/Xorg.0.log

lspci -vvnn:
http://launchpadlibrarian.net/25817184/lspci_vvnn.log

Original downstream bug report (with more data):
https://bugs.launchpad.net/f-spot/+bug/362883

PS. I ran the repro on intel G45 and I did not exhibit these symptoms but of course I didn't use the exact same images for my slideshow but still..

I am the one who reported the bug. Got side-tracked and forgot to report upstream. Thanks Martin.

Available for testing and reporting more information as needed.

Thanks,

(In reply to comment #0)
> One ubuntu user reported that every time he uses the slideshow feature in
> f-spot using ubuntu jaunty then he sees error like this printed to the
> terminal:
>
> Mesa 7.4 implementation error: bad wrapMode in clamp_rect_coord_linear
> Please report at bugzilla.freedesktop.org

> User has a "Quadro NVS 110M/GeForce Go 7300" (G72M chipset) and he is using the
> open source *-nv xorg driver.

> PS. I ran the repro on intel G45 and I did not exhibit these symptoms but of
> course I didn't use the exact same images for my slideshow but still..

These errors are from swrast, since the nv driver doesn't support 3d (so you wouldn't see these errors on G45).
It means the wrap mode was not one of the modes allowed for texture rectangle targets (there are restrictions what modes are allowed compared to 2d targets). Not sure though how this could happen, since mesa should not allow this to be set to illegal values (hence the implementation error...).

Look like this is caused by a missing break statement in a switch.

Fixed in commit dcf571aff9de1a4298c4d2c4148d84cdc4daf02e
and cherry-picked to the 7.4 branch.

Created an attachment (id=25233)
the patch that brian commited to mesa master (for reference)

Terrific job Brian, thanks for the super quick turn around!

Martin Olsson (mnemo) wrote :

closing against f-spot because I can run slideshows in f-spot using intel G45 card and it works great (no such warnings are printed to the terminal in my case). bug is probably in -nv or in mesa.

Changed in f-spot:
status: New → Invalid
Martin Olsson (mnemo) wrote :

I've upstreamed this bug report to the mesa developers, let's wait and see what they say. Bug report is here:
https://bugs.freedesktop.org/show_bug.cgi?id=21461
(Jerome, it would be useful if you subscribed to the upstream bug report as well in case they have additional questions)

Changed in mesa:
status: Unknown → Confirmed
Martin Olsson (mnemo) wrote :

Jerome, does the bug still happen if you launch f-spot using:
LIBGL_ALWAYS_INDIRECT=1 f-spot

And is there any additional debug information outputed if you run:
LIBGL_DEBUG=verbose f-spot

If I use LIBGL_ALWAYS_INDIRECT=1, then my machine almost dies (CAPS LOCK light appears after 10 seconds...). Some more error messages on the console.

$ LIBGL_ALWAYS_INDIRECT=1 f-spot
[Info 15:49:05.465] Initializing DBus
[Info 15:49:05.662] Initializing Mono.Addins
[Info 15:49:06.365] Starting new FSpot server
[Info 15:49:09.065] Starting BeagleService
[Info 15:49:09.066] Hack for gnome-settings-daemon engaged

(f-spot:8215): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.
[Info 15:49:24.817] Inhibit screensaver for slideshow
lcms: Error #12288; Corrupted memory profile
System.Exception: Invalid Profile Data
  at Cms.Profile..ctor (System.Byte[] data, Int32 start_offset, Int32 length) [0x00000]
  at JpegHeader.GetProfile () [0x00000]
lcms: Error #12288; Corrupted memory profile
System.Exception: Invalid Profile Data
  at Cms.Profile..ctor (System.Byte[] data, Int32 start_offset, Int32 length) [0x00000]
  at JpegHeader.GetProfile () [0x00000]
^C

As for using LIBGL_DEBUG=verbose, here's the log.

[Info 15:53:50.048] Initializing DBus
[Info 15:53:50.217] Initializing Mono.Addins
[Info 15:53:50.451] Starting new FSpot server
libGL: OpenDriver: trying /usr/lib/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib/dri/swrast_dri.so
[Info 15:53:51.709] Starting BeagleService
[Info 15:53:51.709] Hack for gnome-settings-daemon engaged

(f-spot:8246): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.
[Info 15:53:56.003] Inhibit screensaver for slideshow
lcms: Error #12288; Corrupted memory profile
System.Exception: Invalid Profile Data
  at Cms.Profile..ctor (System.Byte[] data, Int32 start_offset, Int32 length) [0x00000]
  at JpegHeader.GetProfile () [0x00000]
Mesa 7.4 implementation error: bad wrapMode in clamp_rect_coord_linear
Please report at bugzilla.freedesktop.org
Mesa 7.4 implementation error: bad wrapMode in clamp_rect_coord_linear
Please report at bugzilla.freedesktop.org
Mesa 7.4 implementation error: bad wrapMode in clamp_rect_coord_linear
Please report at bugzilla.freedesktop.org
Mesa 7.4 implementation error: bad wrapMode in clamp_rect_coord_linear

Note: I hadn't notived the first error messages (GdkPixbuf-WARNING and System.Exception). There may have been present at my first bug report but the window scrolled so fast that I didn't see them.

Martin Olsson (mnemo) wrote :

There is just one place in the f-spot code that throws that exception:
f-spot-0.5.0.3/src/Cms/Profile.cs: throw new System.Exception ("Invalid Profile Data");

So basically I think one of the JPG files that you're using in your slideshow has a corrupt ICC color profile header.

Can you please run f-spot with the --debug parameter so we can see which specific JPG it's loading when the happens. Also, if you are able to attach that JPG to the bug report that would be great. Thanks.

Martin Olsson (mnemo) wrote :

Upstream mesa developer Brian Paul fixed that mesa bug instantly, unfortunately that seemed to be a spurious warning only. It doesn't really explain why you get a black screen.

I think running with --debug as explained in the previous comment is a much better lead at this time. Let's continue investigating that trail further instead... maybe the screen is black just because the image fails to load.

Changed in mesa:
status: Confirmed → Fix Released
Bryce Harrington (bryce) on 2009-05-01
Changed in xserver-xorg-video-nv (Ubuntu):
status: New → Confirmed
Austriaco (lanieves) wrote :

I want to report this is happening on a laptop with an Intel GM965/GL960 graphics card. When entering slideshow mode, it doesn't matter which pictures I want to see, f-spot freezes completely and has to be killed:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.10
Release: 8.10
Codename: intrepid

$ apt-cache policy f-spot xserver-xorg-video-intel libgl1-mesa-glx
f-spot:
  Installed: 0.5.0.3-0ubuntu4
  Candidate: 0.5.0.3-0ubuntu4
  Version table:
 *** 0.5.0.3-0ubuntu4 0
        500 http://de.archive.ubuntu.com intrepid-updates/main Packages
        100 /var/lib/dpkg/status
     0.5.0.3-0ubuntu2 0
        500 http://de.archive.ubuntu.com intrepid/main Packages
xserver-xorg-video-intel:
  Installed: 2:2.4.1-1ubuntu10.4
  Candidate: 2:2.4.1-1ubuntu10.4
  Version table:
 *** 2:2.4.1-1ubuntu10.4 0
        500 http://de.archive.ubuntu.com intrepid-updates/main Packages
        100 /var/lib/dpkg/status
     2:2.4.1-1ubuntu10 0
        500 http://de.archive.ubuntu.com intrepid/main Packages
libgl1-mesa-glx:
  Installed: 7.3-1ubuntu1
  Candidate: 7.3-1ubuntu1
  Version table:
 *** 7.3-1ubuntu1 0
        100 /var/lib/dpkg/status
     7.2-1ubuntu2 0
        500 http://de.archive.ubuntu.com intrepid/main Packages

Austriaco (lanieves) wrote :
Austriaco (lanieves) wrote :

OK, here is another clue for the puzzle.

If I prepend LIBGL_ALWAYS_INDIRECT=1 as in:

$ LIBGL_ALWAYS_INDIRECT=1 LIBGL_DEBUG=verbose f-spot --debug >& /tmp/f-spot.trace

slideshow doesn't work as expected, instead I get the first picture distorted and the following images seem to pass by, but I only see an alternating green/blue/white screen. However I can exit slideshow mode pressing ESC.

If I run without LIBGL_ALWAYS_INDIRECT=1 as in:

$ f-spot --debug >& /tmp/f-spot3.trace

Then f-spot freezes as soon as I enter into slideshow mode.

I hope this helps to pinpoint the culprit.

If you need any more info, please ask.

Martin Olsson (mnemo) wrote :

Austriaco, are you using any custom repos? You have mesa 7.3 but intrepid shipped with mesa 7.2 and jaunty with mesa 7.4 (also note that odd number mesa versions are development releases, i.e 7.1 and 7.3 and 7.5 etc.. you should use a even numbered release for everyday use)

This page the different mesa versions we have in the various active ubuntu spins right now:
https://launchpad.net/ubuntu/+source/mesa

Also, in general... the mesa 7.4 bug that printed the error in the original bug report is harmless. if you study the upstream patch you'll notice that the bug was a trivial one that could not possible have caused a hang or so. I'm talking about:
Mesa 7.4 implementation error: bad wrapMode in clamp_rect_coord_linear

So that part of the error message was a false positive, we need to be looking for some other clue.

Austriaco (lanieves) wrote :

Oh, I think I installed that mesa package to make GoogleEarth work, but now I don't remember where I got it from. Sorry.

What about this (from the attached Xorg.0.log)?

[mi] EQ overflowing. The server is probably stuck in an infinite loop.
[mi] mieqEnequeue: out-of-order valuator event; dropping.

It's a pity the Xorg log file doesn't show timestamps, because now I don't know if those errors are related to the problem at hand.

So, which other clue do you suggest we look for? I'm all for looking, because I don't want to drop f-spot. Maybe if I try to upgrade the mesa libraries. I'll give it a shot and see what happens.

Chris Knight (cknight-nildram) wrote :

I also get this happening. First time using f-spot, loaded images from camera via f-spot and tried to view full-screen. First image was a vertical shot. It correctly showed as expected in the full-screen mode, but the sides of the image repeated all the way to the edge of the screen (e.g. there is no black strips where there isn't supposed to be image). F-spot is then locked, but my computer is still functional. I can't exit full-screen via escape, but I can alt-tab and execute other non-fspot keyboard shortcuts. Console repeats with (apparently harmless) message above. Rather new to this, but happy to help. Based on posts above, here's what I've got:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 9.04
Release: 9.04
Codename: jaunty

$ apt-cache policy f-spot xserver-xorg-video-intel libgl1-mesa-glx
f-spot:
  Installed: 0.5.0.3-1ubuntu6
  Candidate: 0.5.0.3-1ubuntu6
  Version table:
 *** 0.5.0.3-1ubuntu6 0
        500 http://gb.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status
xserver-xorg-video-intel:
  Installed: 2:2.6.3-0ubuntu9
  Candidate: 2:2.6.3-0ubuntu9
  Version table:
 *** 2:2.6.3-0ubuntu9 0
        500 http://gb.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status
libgl1-mesa-glx:
  Installed: 7.4-0ubuntu3.1
  Candidate: 7.4-0ubuntu3.1
  Version table:
 *** 7.4-0ubuntu3.1 0
        500 http://gb.archive.ubuntu.com jaunty-updates/main Packages
        100 /var/lib/dpkg/status
     7.4-0ubuntu3 0
        500 http://gb.archive.ubuntu.com jaunty/main Packages

Chris Knight (cknight-nildram) wrote :
Chris Knight (cknight-nildram) wrote :
Chris Knight (cknight-nildram) wrote :

Here's the output of LIBGL_ALWAYS_INDIRECT=1 LIBGL_DEBUG=verbose f-spot --debug >& /tmp/f-spot.trace

Chris Knight (cknight-nildram) wrote :

Should have mentioned that the above command did not improve matters any. It had the same effect as the poster above of nearly killing my computer. Ctrl-alt-backspace took about 20 seconds to kick in.

Bryce Harrington (bryce) wrote :

[mesa bug, not -nv]

Changed in xserver-xorg-video-nv (Ubuntu):
status: Confirmed → Invalid
Bryce Harrington (bryce) wrote :

Looks like the upstream fix is already in our 7.4.1 version in karmic, so marking fixed.

Changed in mesa (Ubuntu):
status: Confirmed → Fix Released
Changed in mesa:
importance: Unknown → Medium
Changed in mesa:
importance: Medium → Unknown
Changed in mesa:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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