Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 157122 Details for
Bug 244419
Crash when deleting last list item in selection callback of XmList widget
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Sample program to reproduce the crash.
simple_list.c (text/plain), 1.70 KB, created by
Markus Schöpflin
on 2007-06-15 15:31:26 UTC
(
hide
)
Description:
Sample program to reproduce the crash.
Filename:
MIME Type:
Creator:
Markus Schöpflin
Created:
2007-06-15 15:31:26 UTC
Size:
1.70 KB
patch
obsolete
>#include <Xm/ListP.h> >#include <stdio.h> > >char *months[] = { > "January", "February", "March", "April", "May", "June", > "July", "August", "September", "October", "November", "December"}; > >void sel_callback (Widget list_w, XtPointer client_data, XtPointer call_data) >{ > XmListCallbackStruct *cbs = (XmListCallbackStruct *) call_data; > XmListRec *lw = (XmListRec *)list_w; > > printf("Selected position: %d\n", cbs->item_position); > printf("D1: LastItem = %d, LastHLItem = %d, CurrentKbdItem = %d\n", > lw->list.LastItem, lw->list.LastHLItem, lw->list.CurrentKbdItem); > XmListDeletePositions(list_w, &cbs->item_position, 1); > printf("D2: LastItem = %d, LastHLItem = %d, CurrentKbdItem = %d\n", > lw->list.LastItem, lw->list.LastHLItem, lw->list.CurrentKbdItem); >} > >int main (int argc, char *argv[]) >{ > Widget toplevel, list; > XtAppContext app; > int i, n = XtNumber (months); > XmStringTable str_list; > Arg args[4]; > > XtSetLanguageProc (NULL, NULL, NULL); > toplevel = XtVaOpenApplication (&app, "Demos", NULL, 0, &argc, argv, NULL, > sessionShellWidgetClass, NULL); > str_list = (XmStringTable) XtMalloc (n * sizeof (XmString)); > for (i = 0; i < n; i++) > str_list[i] = XmStringCreateLocalized (months[i]); > > i = 0; > XtSetArg (args[i], XmNvisibleItemCount, n); i++; > XtSetArg (args[i], XmNitemCount, n); i++; > XtSetArg (args[i], XmNitems, str_list); i++; > XtSetArg (args[i], XmNselectionPolicy, XmSINGLE_SELECT); i++; > list = XmCreateList (toplevel, "Hello", args, i); > for (i = 0; i < n; i++) > XmStringFree (str_list[i]); > XtFree ((char *) str_list); > > XtManageChild (list); > XtAddCallback(list, XmNsingleSelectionCallback, sel_callback, NULL); > XtRealizeWidget (toplevel); > XtAppMainLoop (app); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 244419
: 157122