X widget question
Marco Atzeri
marco.atzeri@gmail.com
Sun Mar 20 09:57:00 GMT 2016
I have finally identified where ncview was
segfaulting on X86_64
The solution was to reverse the order of destruction
for a chain of widgets
i=0;
- while( (w = *(diminfo_row_widget + i++)) != NULL )
- XtDestroyWidget( w );
+ while( (w = *(diminfo_row_widget + i)) != NULL )
+ i++;
+ while( i>0 ) {
+ i--;
+ XtDestroyWidget( *(diminfo_row_widget + i ));
+ }
}
that were connected by a vertical constraints:
*(diminfo_row_widget+ll) = XtVaCreateManagedWidget(
widget_name,
boxWidgetClass,
commandcanvas_widget,
XtNorientation, XtorientHorizontal,
XtNfromVert, *(diminfo_row_widget + (ll-1)),
XtNheight, bb_height,
XtNwidth, bb_width,
NULL);
The segfault was inside Xlib when managing the constraints.
As the segfault did not happened on i686, is it possible
that is a race inside Xlib ?
I have not found in the X Documentation nothing about
requested order of widget destruction in this case.
Thanks in advance
Marco
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list