Interesting. I made this change because I could not get athena text fields
to work when motif was compiled in.
andy
At 11:05 AM 2/16/01 -0500, Raymond Toy wrote:
>>>>> "Raymond" == Raymond Toy
<toy(a)rtp.ericsson.se> writes:
Raymond> Here's a 100% repeatable crash for me. See the attached
Installation
Raymond> file for system specifics.
Raymond> $ xemacs-21.2 -vanilla
Raymond> Using the menus, Edit->Find. The Find window comes up
momentarily and
Raymond> then xemacs crashes.
[snip]
Raymond> Installation file:
Raymond> uname -a: SunOS edgedsp4 5.7 Generic sun4u sparc SUNW,Ultra-30
Raymond> ./configure '--verbose' '--extra-verbose'
'--with-mule'
'--with-pop' '--with-sound=noesd'
'--package-path=/apps/public/XEmacs/lib'
'--prefix=/apps/public/XEmacs/21.2'
'--bindir=/apps/public/XEmacs/21.2/bin/solaris2.7' '--with-workshop'
'--with-dialogs=motif' '--with-widgets=athena'
'--site-includes=/apps/public/solaris2.7/usr/openwin/include
/apps/public/solaris2.7/include'
'--site-libraries=/apps/public/solaris2.7/usr/openwin/lib
/apps/public/solaris2.7/lib'
I think I found the problem. Since I'm building with Athena widgets
and Motif dialogs, the Athena text-label widget isn't used. The main
offending code is in lwlib-Xaw.c:
const widget_creation_entry
xaw_creation_table [] =
{
#ifdef LWLIB_SCROLLBARS_ATHENA
{"vertical-scrollbar", xaw_create_vertical_scrollbar },
{"horizontal-scrollbar", xaw_create_horizontal_scrollbar },
#endif
#ifdef LWLIB_WIDGETS_ATHENA
{"button", xaw_create_button },
{ "label", xaw_create_label_field },
#ifndef NEED_MOTIF
{"text-field", xaw_create_text_field },
#endif
{"progress", xaw_create_progress },
#endif
{NULL, NULL}
};
NEED_MOTIF is defined because I have Motif dialogs, so the text-field
entry here isn't used. However, xm_creation_table doesn't have
text-field defined either because I'm not using Motif widgets.
Therefore xemacs crashes because there's no text-field widget defined
anywhere. (See instantiate_widget_instance.)
I'm not sure if this is a configure problem or a source code problem,
but, anyway, here is the obvious patch to always include the
text-field widget when we are using Athena widgets.
This patch fixes my crash. The find dialog box, however, is still too
small to hold the entire dialog (as someone else reported). When I
resize it, it flickers like crazy for quite a while after I'm done
resizing too. This would be very annoying if I actually used the Find
dialog box. :-)
Ray
Changelog:
2001-02-16 Raymond Toy <toy(a)rtp.ericsson.se>
* lwlib-Xaw.c: Always include ATHENA_AsciiText_h_ to get the
text-field widget.
(xaw_creation_table): Always include the text-field widget
Patch:
--- lwlib-Xaw.c~ Sun Jan 7 09:48:37 2001
+++ lwlib-Xaw.c Fri Feb 16 11:00:19 2001
@@ -46,10 +46,8 @@
#include "xlwradio.h"
#include "xlwcheckbox.h"
#include "xlwgauge.h"
-#ifndef NEED_MOTIF
#include ATHENA_AsciiText_h_
#endif
-#endif
#include <X11/Xatom.h>
static void xaw_generic_callback (Widget, XtPointer, XtPointer);
@@ -838,7 +836,7 @@
return scale;
}
-#ifndef NEED_MOTIF
+#if defined(LWLIB_WIDGETS_ATHENA)
#define TEXT_BUFFER_SIZE 128
static Widget
xaw_create_text_field (widget_instance *instance)
@@ -890,9 +888,7 @@
#ifdef LWLIB_WIDGETS_ATHENA
{"button", xaw_create_button },
{ "label", xaw_create_label_field },
-#ifndef NEED_MOTIF
{"text-field", xaw_create_text_field },
-#endif
{"progress", xaw_create_progress },
#endif
{NULL, NULL}