dsamperi@Citicorp.COM (Dominick Samperi) (06/17/91)
Has anyone had any problems with the patched version of X11R4 (all 18 MIT patches) and/or Motif 1.1.1 that did not occur with the unpatched X11R4 and Motif 1.0? We just did the upgrades and have invested MANY hours trying to figure out why applications that worked before no longer work. More precisely, applications that were compiled with the older versions work OK with the new server and window manager, but sometimes fail when linked with the new (patched/upgraded) libs. A simple example of the kind of problem we have been having is illustrated by the memo example on Page 42 of Douglas Young's book on X programming. This example works fine under the older versions of X11/Motif. Under the new versions we find that the program dumps core if the environment variable DISPLAY is not set, and specifying "-display foo:0" does not help! The program works fine if this environment variable is set properly. Also, all of the earlier memo examples in Young's book work in all cases. That is, the environment variable DISPLAY need not be defined; it is enough to use "-display foo:0". I suspect that the use of XtOpenDisplay explicitly in this memo example is what causes the problem, because other applications that we are having trouble with core dump in the call to XtOpenDisplay. It appears that the patches included some change to XtOpenDisplay that broke it. Thanks for any pointers. -- Dominick Samperi -- Citicorp dsamperi@Citicorp.COM uunet!ccorp!dsamperi
swick@athena.mit.EDU (Ralph Swick) (06/18/91)
A simple example of the kind of problem we have been having is illustrated by the memo example on Page 42 of Douglas Young's book on X programming. This example works fine under the older versions of X11/Motif. Under the new versions we find that the program dumps core if the environment variable DISPLAY is not set, and specifying "-display foo:0" does not help! The example calls XtOpenDisplay specifying display_name as the empty string (""). This causes XtOpenDisplay to ignore any -display option in the command line (your symptom #2) and passes the empty string to Xlib. The semantics of specifying the empty string to XOpenDisplay are unspecified, but the usual behavior is to treat this as equivalent to passing a NULL pointer; i.e. evaluate the DISPLAY envvar. If DISPLAY is undefined, XOpenDisplay and XtOpenDisplay return NULL and the example program does not check for this case, resulting in your symptom #1. I've no idea how this could have worked any differently prior to installing the patches.