IRIS XallocColorCells failure
Mike Yang
mikey at eukanuba.wpd.sgi.com
Fri Mar 8 09:41:58 AEST 1991
In article <1991Mar7.201724.22547 at helios.physics.utoronto.ca>, sysmark at physics.utoronto.ca (Mark Bartelt) writes:
|> The window gets created as expected, but one routine (XAllocColorCells)
|> returns zero when the server starts up. Then, when the client program
|> tries to talk to the server, the server bombs out, saying:
I'm going to assume that you're running IRIX 3.3.
Under 3.3, the default invokation of the X server provides a visual
whose colormap contains only 16 read/write colormap cells. The
remainder are read-only. This situation allows GL and X programs to
co-exist without colormap conflicts.
However, if you try and run an X program which requires more colormap
cells, or expects to be able to modify large numbers of them (as your
application seems to), you're going to run into problems.
One possible solution is to start your X server such that most of the
colormap cells are read/write. If you create a ~/.xSGINeWS.cmd with:
/usr/bin/X11/Xsgi -bs -gl
all but 16 of the colormap cells will be read/write the next time you
login. Be aware, however, that if you do this your GL programs may
display with the "wrong" colors.
Furthermore, from your description of your problem, your application
seems to be using XStoreColors without taking into account the value
returned by XAllocColorCells. If your program expects all the
colormap cells to be read/write, you may still get your X error.
Although this may often be the case with other vendor's X servers,
it's not with ours.
By the way, the reason why your application emits the error in
XPending is because the X protocol is asynchronous. Until that call,
your requests are queued up and haven't been processed. The best way
to pinpoint the location of an error is to use -sync with Xt programs,
or use XSynchronize to cause requests (e.g. XStoreColors) to occur at
the time the Xlib function is called.
-----------------------------------------------------------------------
Mike Yang Silicon Graphics, Inc.
mikey at sgi.com 415/335-1786
More information about the Comp.sys.sgi
mailing list