[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
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 |
2487.0. "SERVER CRASH WITH A VERY SIMPLE (BUGGY) PROGRAM" by MLNEDU::FERRARA (Giancarlo - Customer Trng ITALY) Wed Mar 21 1990 12:04
AAAARRRRRGGGGHHHH!
The customer in 2483.* is TERRIBLE!!!!
Here follows her SECOND xlib program!
She attempts to create an A4-size window.
THE CODE IS WRONG (not casting dimension to int) BUT THIS SIMPLE
CODE ****CRASH**** the server!!!!
VMS 5.1/DECwindows 1.0/VS2000 bw 19"
VMS 5.2-1/DECwindows 1.0/GPX with color 19"
I don't include the server error log bvecause i suspect it's quite
easy to obtain one....just run the program. (REGION BAD BOX... and
after exceding maximun internal server error)
It's already know as bug & is corrected in decw 2.0?????
-------- Crash.c -------------------------------
#include <stdio.h>
#include <Xlib.h>
#define screenNumber DefaultScreen(display)
#define rootWindow RootWindow(display,screenNumber)
#define displayWidth DisplayWidth(display,screenNumber)
#define displayHeight DisplayHeight(display,screenNumber)
#define displayWidthMM DisplayWidthMM(display,screenNumber)
#define displayHeightMM DisplayHeightMM(display,screenNumber)
#define blackPixel BlackPixel(display,screenNumber)
#define whitePixel WhitePixel(display,screenNumber)
#define windowX (displayWidth/3)
#define windowY (displayHeight/3)
#define windowWidth (displayWidth*210.0/displayWidthMM)
#define windowHeight (displayHeight*297.0/displayHeightMM)
#define borderWidth 1
main(argc, argv)
unsigned int argc;
char *argv[];
{
Display *display; /* pointer to display information */
Window window; /* application window id */
/* Open the default display */
if (!(display = XOpenDisplay(NULL))) {
fprintf(stderr, "Can't open display\n");
exit(0);
}
/* 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 */
/* Map the window, causing it to become visible */
XMapWindow(display, window);
/* Wait for something to happen */
while (1) {
XEvent event;
XNextEvent(display, &event);
switch (event.type) {
default:
;
}
}
}
T.R | Title | User | Personal Name | Date | Lines |
---|
2487.1 | | AITG::DERAMO | Dan D'Eramo, nice person | Wed Mar 21 1990 18:01 | 36 |
| I compiled and linked "crash.c" on a VMS V5.2 system
and ran it with the display pointing to my VMS V5.3
(DECwindows V2) workstation. It resulted in a huge
window with the upper left of its window manager
(the DECwindows window manager) decorations at the
lower right of the screen. The server didn't crash.
Dan
p.s. After dragging the window partially onto the screen,
the tool "xwininfo" described it as:
$ xwininfo
xwininfo ==> Please select the window about which you
==> would like information by clicking the
==> mouse in that window.
xwininfo ==> Window id: 0xe00001 (has no name)
==> Upper left X: -16943
==> Upper left Y: -16940
==> Width: 17691
==> Height: 23108
==> Depth: 8
==> Border width: 17755
==> Window class: InputOutput
==> Colormap: 0x80066
==> Window Bit Gravity State: ForgetGravity
==> Window Window Gravity State: NorthWestGravity
==> Window Backing Store State: NotUseful
==> Window Save Under State: no
==> Window Map State: IsViewable
==> Window Override Redirect State: no
==> Corners: +-16943+-16940 --35234+-16940 --35234--40814 \
+-16943--40814
|
2487.2 | Really a nice person... | MLNEDU::FERRARA | Giancarlo - Customer Trng ITALY | Thu Mar 22 1990 12:55 | 11 |
| Thanks!
I have also monitored x wire requests between client & server using xliddy.
I am sure that also v1 xlib put on wire a "good" request.
("good" in sense of "as asked", i.e. a huge window).
This produce a crash on a v1 server, but according to your test this
problem is fixed in v2 server.
Giancarlo
|