[comp.windows.x] Bugs in list widget

net@TUB.BITNET (Oliver Laumann) (02/21/89)

During the last days I had the pleasure to ``fight'' with the
Athena ``list'' widget.  I disvovered two bugs (and there are
probably more; I didn't test everything):

1)  When the widget instance is initialized, the ``list'' resource
    is referenced (in an attempt to count the items) and *then*
    initialized to a default value.  As a consequence, application
    programmers *must* pass a value for XtNlist to the call of
    XtCreateWidget().  Otherwise a NULL pointer is referenced
    in the function ResetList().

    This can be fixed by moving the initialization of the ``list''
    resource in front of the call to ResetList().

2)  The function PaintItemName() is sometimes called with an
    out-of-range item number which causes a segmentation
    violation or a bus error.  I don't know under which
    circumstances this happens or how it can be fixed.
    It looks like an off-by-one error.

Regards,
--
Oliver Laumann              net@TUB.BITNET              net@tub.UUCP

kit@ATHENA.MIT.EDU (Chris D. Peterson) (03/01/89)

> During the last days I had the pleasure to ``fight'' with the
> Athena ``list'' widget.  I disvovered (sic) two bugs (and there are
> probably more; I didn't test everything):

Thanks for the vote of confidence ;-)

In the future, make sure that bug reports get sent to xbugs@expo.lcs.mit.edu
as well.  The only reason for to post bugs to xpert is to inform the community
that they exist.  Sending to xpert does no assure that the bug will be fixed.

						Chris D. Peterson     
						MIT X Consortium /
						Project Athena 

Net:	kit@athena.mit.edu		
Phone: (617) 253 - 1326			
USMail: MIT - Room E40-321
	77 Massachusetts Ave.		
	Cambridge, MA 02139