About "Major opcode of failed request: 89"

Glynn Clements glynn at gclements.plus.com
Thu Mar 16 06:31:19 PST 2006


Gabriela Leão wrote:

>  I use Linux Slackware 10.2, with XFCE 4, and I tried to compile an
> application with:
> 
> gcc  blocks.o voronoi.o -I/usr/X11R6/include/X11/ -L/usr/X11R6/lib -g  -lX11
> -lm  -o blocks. Up to here ok. But when I try to execute blocks with
> ./blocks the message bellow appears:
> 
> X Error of failed request:  BadAccess (attempt to access private resource
> denied)
>   Major opcode of failed request:  89 (X_StoreColors)
>   Serial number of failed request:  8
>   Current serial number in output stream:  17
> 
> Well, this application ran in a Sparc, on UNIX Solaris, and now I must
> migrate to a simple workstation, on Linux Slackware 10.2. How may I solve
> the problem above? Must I edit any file?

XStoreColor/XStoreColors only work on writable colourmap cells, which
means that they only work on visual types with a programmable colour
look-up table, i.e. GrayScale, PseudoColor or DirectColor, and not on
StaticGray, StaticColor or TrueColor visuals.

It's likely that your application was specifically written for a
PseudoColor visual (probably 8bpp), and won't work on any other visual
type, but your X server is operating at 16/24bpp and only provides
TrueColor visuals.

In which case, you can configure the depth and visuals in xorg.conf,
e.g.:

Section "Screen"
	Identifier	"Screen0"
	Device		"Card0"
	Monitor		"Monitor0"
	DefaultDepth	8
	SubSection "Display"
		Depth	8
		Visual	"PseudoColor"
		Modes	"1280x1024" "640x480"
	EndSubSection
EndSection

Alternatively, you can use the -depth and -cc command-line options
when starting the X server, e.g.

	/usr/bin/X :0 -depth 8 -cc 3

-- 
Glynn Clements <glynn at gclements.plus.com>



More information about the xorg mailing list