Newsgroups: comp.windows.x.motif Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!swbatl!uuciks From: uuciks@swbatl.sbc.com (Kristina Smith - UCI - 5-3793) Subject: XmList problem (coredump) Message-ID: <1991Jun5.182759.23939@swbatl.sbc.com> Keywords: XmListAddItem, coredump Organization: Southwestern Bell Date: Wed, 5 Jun 91 18:27:59 GMT Has anyone ever seen this behavior before? (Please note that I am an X11 and Motif programming novice) (I'm running Motif 1.1) I create a selectionBoxDialog like this: selectionBox = XmCreateSelectionDialog(parent,"selectionBox",args,argcnt); I create an XmStringTable filled with data and use XtSetArgs to make it the item list for the selection box like this: XtSetArg(args[argcnt], XmNlistItems, (XmStringTable)items); argcnt++; XtSetArg(args[argcnt], XmNlistItemCount, (int)itemcount); argcnt++; One of the pushButtons has a callback tied to it that deletes the current list and adds new items to the list somewhat like the following: XtUnmanageChild(list); XmListDeleteAllItems(list); XmListAddItem(list,xmstring,0); XtManageChild(list); Then when I try to select an item from the new list it coredumps with a memory fault (segmentation violation) (not all the time, though. It's very sporadic) When I use a debugger on it, and do a trace, this is what shows up: _DrawHighlight(0x1ac2a8,0x3,0x1,0x1,0x20000,0x3) + c4 _ListFocusIn(0x1ac2a8,0xf7ffe7e4,0x0,0x19ad78,0x25,0x26838) + b0 __XtTranslateEvent(0x1ac2a8,0x0,0xf7ffe7e4,0x630,0x174d74,0x19ad70) + 360 _DispatchEvent(0xf7ffe7e4,0x1ac2a8,0x200000,0x0,0xf7ffe588,0xf7ffe3f8) + 328 Does anyone know what is happening or why it might be happening? I would appreciate any thoughts or experiences at all! I'm on a tight deadline, and I can't seem to get past this! Thanks! Kristina Smith kms@strider.sbc.com 314-235-3793 Southwestern Bell Telephone