Subject: nedit
To: None <current-users@NetBSD.ORG>
From: Charlie & <root@c678648-a.sttls1.wa.home.com>
List: current-users
Date: 03/07/1998 00:49:46
Has anyone been successful in building nedit for NetBSD?  After making a
couple of minor modifications (FreeBSD -> NetBSD) it compiled OK for me,
and doing a `nedit file` will open the file OK.  But if I try using menu
to open a file, it dumps core on me:

#0  0x42e991a in memmove ()
#1  0x42cb8de in getcwd ()
#2  0x415d9a6 in end ()
#3  0x40f2584 in end ()
#4  0x40f2812 in end ()
#5  0x40f0a2e in end ()
#6  0x41d0c5e in CallInitialize ()
#7  0x41d0fea in xtCreate ()
#8  0x41d1518 in _XtCreateWidget ()
#9  0x41d1544 in XtCreateWidget ()
#10 0x40f2a84 in end ()
#11 0x8ce88 in GetExistingFilename (parent=0xe5600, 
    promptString=0xb4a8 "File to Edit:", filename=0xffffb810 "")
    at getfiles.c:301
#12 0x652a in PromptForExistingFile (window=0xba000, 
    prompt=0xb4a8 "File to Edit:", fullname=0xffffb810 "") at file.c:942
#13 0xb4de in openDialogAP (w=0x16de00, event=0xffffbea0, args=0x0, 
    nArgs=0xffffbc78) at menu.c:1725

This is the bit of code in getfiles.c, in the routine GetExistingFilename
up to line 301:

int GetExistingFilename (Widget parent, char *promptString, char *filename)
{
    int       n;                      /* number of arguments               */
    Arg       args[MAX_ARGS];         /* arg list                          */
    Widget    existFileSB;            /* widget file select box            */  
    XmString  labelString;            /* compound string for prompt label  */  
    XmString  titleString;            /* compound string for dialog title  */  

    n = 0;
    labelString = XmStringCreateSimple(promptString);
    titleString = XmStringCreateSimple(" ");
    XtSetArg(args[n], XmNlistLabelString, labelString); n++;
    XtSetArg(args[n], XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL); n++;  
    XtSetArg(args[n], XmNdialogTitle, titleString); n++;
    XtSetArg(args[n], XmNresizePolicy, XmRESIZE_GROW); n++;
    existFileSB = XmCreateFileSelectionDialog(parent,"FileSelect",args,n);

This is args.  My X books are at work, so cannot tell if anything in here,
even though some look bad, really is bad enough to cause it to crash...

(gdb) select-frame 11
(gdb) print args
$1 = {{name = 0xb433e "listLabelString", value = 1494336}, {
    name = 0xb3cf5 "dialogStyle", value = 2}, {name = 0xb3d01 "dialogTitle", 
    value = 1647424}, {name = 0xb48d4 "resizePolicy", value = 1}, {
    name = 0xffffffff <Address 0xffffffff out of bounds>, value = 1}, {
    name = 0x106600 "", value = -18540}, {name = 0x41d7596 "POPO\"j", 
    value = 68799382}, {name = 0x106600 "", value = 1725424}, {name = 0x1 "", 
    value = 0}, {name = 0x1 "", value = 69206112}, {
    name = 0xffffb790 "ÿÿ·Ü\004\037(\036", value = 68985492}, {
    name = 0x1a53f0 "", value = -18468}, {
    name = 0x41f281e "Lî,\fÿÌN^NuXtVaTypedArg is an invalid argument to XtVaGetSubvalues()\n", value = 1725424}, {name = 0x106600 "", value = 1725424}, {
    name = 0x1 "", value = 108}, {name = 0x19e <Address 0x19e out of bounds>, 
    value = 0}, {name = 0xc6470 "", value = 69206112}, {
    name = 0xffffc90c "TERM=xterm", value = 0}, {name = 0x0, value = 1}, {
    name = 0xc30018 <Address 0xc30018 out of bounds>, value = 46496}}

If anyone has pointers or an idea of where to go from here, I'd appreciate it.
In the meantime, I'll grab my books tomorrow and try to puzzle it out...

~Steve