Bug 15307

Summary: Plotting complex filled polygons crashes X server
Product: xorg Reporter: Tim Keitt <tkeitt>
Component: Protocol/CoreAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: blocker    
Priority: highest CC: drf
Version: unspecified   
Hardware: Other   
OS: All   
See Also: https://launchpad.net/bugs/208899
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
GDB backtrace none

Description Tim Keitt 2008-04-01 11:03:05 UTC
Created attachment 15609 [details]
GDB backtrace

When using GIS software to plot complex filled polygons, I can consistently crash the X server. I have tried this with Ubuntu Gutsy and Hardy, and I believe it applies to earlier versions as well. I have seen this on three different machines and with three different video drivers (nvidia, vesa, intel). I am attaching a full backtrace. I can provide detailed instruction on how to trigger the bug if needed.

This is the output of X -version. I believe this applies to many recent Xorg releases.

X Window System Version 1.3.0
Release Date: 19 April 2007
X Protocol Version 11, Revision 0, Release 1.3
Build Operating System: Linux Ubuntu (xorg-server 2:1.3.0.0.dfsg-12ubuntu8.3)
Current Operating System: Linux patagonicus 2.6.22-14-generic #1 SMP Tue Dec 18 08:02:57 UTC 2007 i686
Build Date: 18 January 2008
Comment 1 Tim Keitt 2008-04-02 11:36:28 UTC
If you want to reproduce the bug on Ubuntu, try

wget http://www.keittlab.org/~tkeitt/melanesia.tgz -O- | tar zxvf -
apt-get install r-base-core, libgdal1-dev
sudo R

(in R)

install.packages('rgdal', dep = T)
q()

(restart R as ordinary user)

R

(in R)

library(rgdal)
x <- readOGR('melanesia.shp', 'melanesia')
plot(x)  # OK!
plot(x, col = 'grey')  # segfaults Xorg

Comment 2 Tim Keitt 2008-04-02 11:43:17 UTC
I did an experiment to see whether the segfault results from the properties of the individual polygons or instead has something to do with the scale at which the polygon is drawn. What I did was plot each polygon (filled) in the dataset separately. This did not cause X to crash. What that means is that no single polygon in the set is pathological. What I believe is happening is that some of the polygons are tiny compared to the overall geographic extent of the data. When you plot the entire dataset, some polygons are below the size of a single pixel and therefore there is nothing to fill. That I suspect may trigger the bug.
Comment 3 drf5n 2009-06-04 12:07:49 UTC
I reliably get this crash as well, using qgis-1.1.0 on a Debian Lenny with X 1.4.2. with one of my own shapefiles and the previously posted micronesia example.

I see similar reports on https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/208899
Comment 4 Jeremy Huddleston Sequoia 2011-09-24 23:42:21 UTC
Based on the downstream ubuntu bug report, this is fixed.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.