problem with xFillPolygon and over 1million vertices
Peter Harris
pharris at opentext.com
Mon Feb 9 07:43:01 PST 2009
Pablo Romero wrote:
> Im working on an application that uses xLib, and I'm having a problem
> with a call to xFillPolygon when passing an xy point array that contains
> more than approx. 1million points. Im using putty & xMing, and am
> receiving the following error:
>
>
> XIO: fatal IO error 11 (Resource temporarily unavailable) on X server
> "localhost:10.0"
>
> after 3747 requests (76 known processed) with 0 events remaining.
>
> My program crashes, though my xServer (xMing) continues to run and
> reports no problems, so Im guessing its a problem with xFillPolygon.
You could install an error handler to keep your program from dying. See
XSetErrorHandler().
> My question is: is there a hard limit on the number of points that can
> be rendered by xFillPolygon????
Yes. See documentation on the BigRequests extension.
Also, you appear to be hitting a soft limit (number of points in a
polygon that this server can allocate space for, and/or can process at
once).
> if so, is there any work-around to get
> it to function properly???
Draw smaller polygons. 1 million points is, what, a Mgon? When you have
to start using SI prefixes, it's starting to get out of hand. I can't
imagine what such a thing would look like (aside from maybe a sphere
that should have been drawn with XFillArc instead). Certainly a Mgon
cannot be clearly resolved on a typical monitor (which will have only 1
or 2 Mpixels).
Alternatively, draw it client-side (maybe using cairo or similar).
Peter Harris
--
Open Text Connectivity Solutions Group
Peter Harris http://www.opentext.com/connectivity
Research and Development Phone: +1 905 762 6001
pharris at opentext.com Toll Free: 1 877 359 4866
More information about the xorg-devel
mailing list