[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

1895.0. "Bad implementation-XCreatePixmap-server crash" by CSC32::HADDOCK (The Seventh Son) Mon Dec 11 1989 17:38

    I can't believe that someone hasn't run into this before, but
    I have looked all through this and several other notes files 
    to no avail.
    
    The following code demonstrates a problem with XCreatePixmap.  If I
    try to create too many pixmaps, I get a Bad Implementation error
    (sometimes, not always) and DecWindows crashes.  A $SHOW SYSTEM
    shows that ALL of the DecWindows server images are GONE.  All I
    have left is a black screen and the pointer until I restart 
    DecWindows.  I am running a VaxStation 3100 with 8M memory.
    My customer is running a 3540 with 32M of memory and says that
    he is just getting the Bad Implementation error. Also tested
    on VMS 5.3.
    
    1) What is a Bad Implementation error??
    2) Whatever it is, it shouldn't be taking out the server.
    
    fred();
    
    Cut here-------------------------------------------------------*
/*
   x1.c - Creates and maps a simple window
*/

#include <stdio.h>
#include <decw$include/Xlib.h>

/*
        Constants and macros
*/

#define screenNumber      DefaultScreen(display)
#define rootWindow        RootWindow(display,screenNumber)
#define displayWidth      DisplayWidth(display,screenNumber)
#define displayHeight     DisplayHeight(display,screenNumber)
#define blackPixel        BlackPixel(display,screenNumber)
#define whitePixel        WhitePixel(display,screenNumber)
#define windowX           (displayWidth/3)
#define windowY           (displayHeight/3)
#define windowWidth       150
#define windowHeight      50
#define borderWidth       1
#define forever           while(1)

main(argc,argv)
   unsigned int argc;
   char *argv[];
{
   Display *display;        /* display pointer */
   Window window;           /* application window id */
   Pixmap pix[100];
   int i;

   /* Open the default display */

   if (!(display = XOpenDisplay("wilbil::0.0"))) {
      fprintf(stderr,"Can't open display\n");
      exit(0);
   }

   XSynchronize( display, 1);

   /* Create a simple window on the screen */

   window = XCreateSimpleWindow(
      display,             /* pointer to display info */
      rootWindow,          /* parent window id */
      windowX,             /* x offset from parent origin */
      windowY,             /* y offset from parent origin */
      windowWidth,         /* width */
      windowHeight,        /* height */
      borderWidth,         /* border width */
      blackPixel,          /* border color */
      whitePixel);         /* background color */

   if (!window) {
      fprintf(stderr,"Can't open window\n");
      exit(0);
   }

   /* Map the window, causing it to become visible */

   XMapWindow(display,window);

   /* Wait for something to happen */

   for (i=0; i<50; i++)
   {
	pix[i] = XCreatePixmap( display, window, 500, 500, 8);
	printf ("%d %d\n",i,pix[i]);
   }



   forever
   {
      XEvent event;

      XNextEvent(display,&event);
      switch (event.type) 		/*use ctl-y to terminate*/
      {
         default: ;
      }
   }
}
    
T.RTitleUserPersonal
Name
DateLines
1895.1DECWIN::JMSYNGEJames M Synge, VMS DevelopmentTue Dec 12 1989 13:5311
    There may be two problems here.  I don't know the meaning of the Bad
    Implementation error, but I have come across a problem regarding to
    much memory being used.
    
    The VMS server doesn't like to run out of memory, and doesn't handle
    the situation at all well.  If you have lots of memory available to
    your workstation (not the standard case! :-), you might want to
    increase VIRTUALPAGECNT so that your server won't run out of process
    memory so soon.
    
    James
1895.2Tried increasing memoryCSC32::HADDOCKThe Seventh SonTue Dec 12 1989 16:158
    I upped my page file quota and virtualpagecnt to 100000.  This didn't
    change the behavior any.  DecWindows still crashes after creating
    about the same number of pixmaps.  
    
    My customer was running 100000 pagefile quota and 200000
    virtualpagecnt.
    
    fred();