[Vm-dev] can't get amd64 squeak install working

Timmy Douglas lists at timmy.tmbx.com
Thu Jul 19 23:07:29 UTC 2007


Martin Kuball <martinkuball at web.de> writes:

> Everything looks good to me. But I'm not really an X11 expert either. But 
> since you compiled your on VM you may try the following. Alter the code of 
> sqUnixX11.c.
> 1. add a line
> 	extern int _Xdebug; 
>    at the beginning.
> 2. add a line
>      _Xdebug = 1; 
>    at the beginning of function initWindow
>  
> You can then run a debugger and find the line that's failing. 
> X otherwise tends to batch things, to improve performance. 
> Just found this by googling for errors. I haven't tried it. So you have to 
> experiment a bit.

good call. The first problem is the XCreateColormap function:

    /* A visual that is not DefaultVisual requires its own color map.
       If visual is PseudoColor, the new color map is made elsewhere. */
    if ((stVisual != DefaultVisual(stDisplay, DefaultScreen(stDisplay))) &&
	(stVisual->class != PseudoColor))
      {
	stColormap= XCreateColormap(stDisplay,
				    RootWindow(stDisplay, DefaultScreen(stDisplay)),
				    stVisual,
				    AllocNone);
	attributes.colormap= stColormap;
	valuemask |= CWColormap;
	parentValuemask |= CWColormap;
      }

1904            stColormap= XCreateColormap(stDisplay,
(gdb) 
X Error: BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  78
  Minor opcode of failed request:  0
  Serial number of failed request: 9
1908            attributes.colormap= stColormap;
(gdb) 
1904            stColormap= XCreateColormap(stDisplay,
(gdb) print stDisplay
$1 = (Display *) 0x736d70
(gdb) print *stDisplay
$2 = <incomplete type>
(gdb) print stVisual
$3 = (Visual *) 0x72e730
(gdb) print *stVisual
$4 = {ext_data = 0x0, visualid = 585, class = 4, red_mask = 16711680, green_mask = 65280, blue_mask = 255, 
  bits_per_rgb = 8, map_entries = 256}


I don't know if I should be suspect or not that those pointers look
like 4-bytes pointers rather than 8-byte ones.



The problem is here:

  /* find the most suitable Visual */
  {
    /* preferred visuals in order of decreasing priority */
    static int trialVisuals[][2]= {
      { 32, TrueColor },
      { 32, DirectColor },
      { 32, StaticColor },
      { 32, PseudoColor },
      { 24, TrueColor },
      { 24, DirectColor },
      { 24, StaticColor },
      { 24, PseudoColor },
      { 16, TrueColor },
      { 16, DirectColor },
      { 16, StaticColor },
      { 16, PseudoColor },
      {  8, PseudoColor },
      {  8, DirectColor },
      {  8, TrueColor },
      {  8, StaticColor },
      {  0, 0 }
    };

    XVisualInfo viz;
    int i;

    for (i= 0; trialVisuals[i][0] != 0; ++i)
      {
#       if 0
	fprintf(stderr, "Trying %d bit %s.\n", trialVisuals[i][0],
		debugVisual(trialVisuals[i][1]));
#       endif
	if (XMatchVisualInfo(stDisplay, DefaultScreen(stDisplay),
			     trialVisuals[i][0], trialVisuals[i][1],
			     &viz) != 0) break;
      }
    if (trialVisuals [i][0] == 0)
      {
#	if 0
	fprintf(stderr, "Using default visual.\n");
#	endif
	stVisual= DefaultVisual(stDisplay, DefaultScreen(stDisplay));
	stDepth= DefaultDepth(stDisplay, DefaultScreen(stDisplay));
      }
    else
      {
	stVisual= viz.visual;
	stDepth= trialVisuals[i][0];
      }

/************* I ADDED THIS AND IT WORKED!!!!  *********************/
	stVisual= DefaultVisual(stDisplay, DefaultScreen(stDisplay));
	stDepth= DefaultDepth(stDisplay, DefaultScreen(stDisplay));
/******************************************************************/


  }



maybe someone could make this a command line option or look into it?


More information about the Vm-dev mailing list