[comp.windows.open-look] Porting XView to MIPS system

brh@hare.udev.cdc.com (brian r hanson x6062) (03/01/91)

Because of some applications we are making available on the MIPS systems at
our site are written in XView I have been trying to get XView running under
the RISCwindows version of X11R4.

Getting it to compile was only a minor chore compared to the bugs I have been
finding in the XView2 code.  The bugs I have found have made me very skeptical
of XView as a whole.

The first problem caused segment faults in our application randomly.  I tracked
it down to a function with parameters declared in the wrong order.
 
The function is generic_data_free in lib/libxvin/base/generic.c
The key and data parameters are in the wrong order which has the effect of 
free-ing what ever is in the key field.  The correct declaration should be 

      generic_data_free(object, key, data)

The second problem is in ntfy_new_enum_conditions in 
lib/libxvin/notify/ntfy_ctbl.c.  The problem is that the cnd_list structure can
be free-ed in the call to enum_func so that a later statement in the loop
      cnd_list = cnd_list->next
may return unpredictable values.  Apparently this does not cause problems on 
suns but on our MIPS system this value is trash.

This second problem I found concerns me greatly.  This kind of problem may be
all over the XView code and it would be very difficult to track down all of 
them.

Have other persons encountered these problems with XView while porting?  DOes
anyone have a list of these kinds of defects?

Brian Hanson, Control Data Corporation.