[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

2510.0. "Interoperability problems on VMS & Ultrix" by ALEXWS::ALEX (Bugs Are Coming In Triplets ...) Sun Mar 25 1990 04:57

	Hi there,

	The following note contains a simple program that illustrates an
Interoperability Problem we have lately encountered. We were trying to run
DECwidnows application (toolkit, X, etc...) on several servers from a single
client. The developement was done on VMS machine and also all the checking.

	And then... We tried to run the program that uses single
applicationShell on each server. While using all VMS or all Ulrix (RISC) servers
the program runs O.K., but mixing VMS and Ulrix causes the problem. At the
second stage I've written a small test (next note) that uses shell with a single
child on it, each on any server passed as parameter to a program. Then we run a
series of checks and the following are the results.

	The problem appears on first server in the list which is different, i.e.
VMS, VMS, Ultrix will case the problem on Ultrix machine, and Ultrix, Ultrix,
VMS will cause the problem on a VMS one.

	On the other hand the problem appears ONLY ON COLOR VMS and Ultrix
servers. Using B/W (Monochrome) VMS machine with Ultrix server runs O.K.

	As far as DECwindows versions are concerned we used both V1 and V2 on
VMS and V1 server on Ultrix.

	The problem in question is BAD-Drawable in CreateGC request. This is got
from widget creation (shell's child) routine. This is illustrated by using
XSynchronize - first parameter for the program is the value for XSynchronize
call.

	The following is the error output :

X error event received from server: BadDrawable - parameter not a Pixmap or Window
  Failed request major op code 55 X_CreateGC
  Failed request minor op code 0 (if applicable)
  ResourceID 0x8006f in failed request (if applicable)
  Serial number of failed request 42
  Current serial number in output stream 43
X error event received from server: BadDrawable - parameter not a Pixmap or Window
  Failed request major op code 55 X_CreateGC
  Failed request minor op code 0 (if applicable)
  ResourceID 0x8006f in failed request (if applicable)
  Serial number of failed request 44
  Current serial number in output stream 45
X error event received from server: BadDrawable - parameter not a Pixmap or Window
  Failed request major op code 55 X_CreateGC
  Failed request minor op code 0 (if applicable)
  ResourceID 0x8006f in failed request (if applicable)
  Serial number of failed request 46
  Current serial number in output stream 47
X error event received from server: BadGC - parameter not a GC
  Failed request major op code 74 X_PolyText8
  Failed request minor op code 0 (if applicable)
  ResourceID 0x600004 in failed request (if applicable)
  Serial number of failed request 74
  Current serial number in output stream 75
X error event received from server: BadGC - parameter not a GC
  Failed request major op code 74 X_PolyText8
  Failed request minor op code 0 (if applicable)
  ResourceID 0x600004 in failed request (if applicable)
  Serial number of failed request 78
  Current serial number in output stream 79


	Any comments? Should this be QARed?

	Alex


T.RTitleUserPersonal
Name
DateLines
2510.1Test program for base noteALEXWS::ALEXBugs Are Coming In Triplets ...Sun Mar 25 1990 05:47183
#include <stdio.h>                              /* For printf and so on. */
#ifdef VMS
#include <decw$include/DwtAppl.h>       /* DECwindows Toolkit */
#else
#include <X11/DwtAppl.h>                /* DECwindows Toolkit */
#endif

/*
 * Forward declarations
 */
void create_proc();
void push_proc();
void expose_proc();

/* The names and addresses of things that DRM has to bind.  The names do
 * not have to be in alphabetical order.  */

DRMHierarchy s_DRMHierarchy;     /* DRM database hierarchy ID */
DRMType *dummy_class;            /* and class variable. */
char *db_filename_vec[] =        /* DRM heirachy file list. */
  {"test.uid"				/* There is only one UID file for */
  };                                    /* this application. */
int db_filename_num =
                (sizeof db_filename_vec / sizeof db_filename_vec [0]);

static DRMRegisterArg reglist[] = {
    {"expose_proc", (caddr_t) expose_proc}, 
    {"create_proc", (caddr_t) create_proc}, 
    {"push_proc", (caddr_t) push_proc},
};

static int reglist_num = (sizeof reglist / sizeof reglist [0]);
static  char    *className  =   {"Bitahon"};
static  char    *applName   =   {"����� ���"};


static	XtAppContext	context;

static	Display	*dpy[8];
static	Widget	 top[8],
		 main_widget[8],
		 wa[8][8];
static	int	displays = 0;

/* Utilites */
static int find_display(wid)
    Widget  wid;
{
    register	i;

    for (i = 0; i < displays; i++)
	if (XtDisplay(wid) == dpy[i])
	    return i;

    return (-1);
}

static void s_error (message)
    char    *message;
{
    printf("%s\n",message);
    exit(1);
}

unsigned int main(argc, argv)
    unsigned int argc;                  /* Command line argument count. */
    char *argv[];                       /* Pointers to command line args. */
{
    int	i,sync;

    DwtInitializeDRM();                 /* Initialize DRM before initializing
                                        /* the X Toolkit. */

    XtToolkitInitialize();
    context = XtCreateApplicationContext();

    if (argc < 2)
	s_error("Absent parameters");

    sync = atoi(argv[1]);

    if (argc < 3)
	s_error("Displays are not specified");


    for (i = 2;  i < argc;  i++) {
        if (!(dpy[displays] = XtOpenDisplay(
		    context,
		    argv[i],
		    applName,
		    className,
		    NULL,0, &argc, argv)))
		s_error(strcat("Can't Open Display ",argv[i]));

	    XSynchronize(dpy[displays],sync);

	    top[displays] = XtAppCreateShell(
		applName,
		className,
		applicationShellWidgetClass,
		dpy[displays],
		NULL,0);
        displays++;
    }


/* Open the UID files (the output of the UIL compiler) in the hierarchy*/

    if (DwtOpenHierarchy(db_filename_num,
	      db_filename_vec,
	      NULL,
	      &s_DRMHierarchy) != DRMSuccess)
        s_error("can't open hierarchy");

/* Register the items DRM needs to bind for us. */

    DwtRegisterDRMNames(reglist, reglist_num);

/*  Go get the main part of the application		*/
    for ( i = 0; i < displays; i++) {
        if (DwtFetchWidget(s_DRMHierarchy,
			   "MainWindow",
			   top[i],
			  &main_widget[i],
			  &dummy_class) != DRMSuccess)
	    s_error("can't fetch main window");
    }

/*  Show all */
    for ( i = 0; i < displays; i++) {
	XtManageChild(main_widget[i]);
	XtRealizeWidget(top[i]);
    }

/*  Wait for events to be processed */
    XtAppMainLoop(context);

/*  UNREACHABLE	*/
    exit(0);
}

/***************************************************************************
 *
 * This section contains callback routines.
 *
 ***************************************************************************
 */

/*
 * All push buttons in this application call back to this routine.  We
 * use the tag to tell us what widget it is, then react accordingly.
 */

void expose_proc(w, tag, Cb)
    Widget w;
    int *tag;
    DwtWindowCallbackStruct *Cb;
{
    printf("Expose procedure on display %d\n",find_display(w));

}

void push_proc(w, tag, reason)
    Widget w;
    int *tag;
    unsigned long *reason;
{
    switch (*tag) {
        case 1: 
	    exit(1);
	default:
	    break;
    }
}

void create_proc(w, tag, reason)
    Widget w;
    int *tag;
    DwtAnyCallbackStruct *reason;
{
    wa[*tag][find_display(w)] = w;
}
2510.2Try it with current software pleaseSMURF::COUTUHe who will not risk, cannot win.Tue Mar 27 1990 12:488
    Well, before writing a QAR I'd suggest that you get a copy of UWS V2.2
    which is DECwindows V2. DECwindows V1 was known to not be real good
    at interoperability because it did not have interoperability as a
    product goal. DECwindows V2 on the other hand did have interoperability
    as a goal. Please test this with DECwindows V2 systems and if the
    problem still shows up file a QAR.
    
    Dan
2510.3DECWIN::FISHERPrune Juice: A Warrior&#039;s Drink!Tue Mar 27 1990 13:4012
Is the toolkit known to understand multiple displays?  I'm suspicious that 
someone might be using a resource id created for one server on the other server.
If the algorithm  for allocating client numbers differs between the two servers,
you might see this.

When you do VMS,VMS,Ultrix, are both the VMS machines in the same state?  For
example, do they both have the same number of clients connected to them?  If
so, try starting an extra client on one before running your program.  For
example, run DECW$CLOCK.  If you see this failure on the second VMS system
now, that would tend to confirm my guess.

Burns