Bug 15307 - Plotting complex filled polygons crashes X server
Summary: Plotting complex filled polygons crashes X server
Alias: None
Product: xorg
Classification: Unclassified
Component: Protocol/Core (show other bugs)
Version: unspecified
Hardware: Other All
: highest blocker
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
Depends on:
Reported: 2008-04-01 11:03 UTC by Tim Keitt
Modified: 2011-09-24 23:42 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

GDB backtrace (9.56 KB, text/plain)
2008-04-01 11:03 UTC, Tim Keitt
no flags Details

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:
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)

(restart R as ordinary user)


(in R)

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.