On Sun, 30 Sep 2012, Marcin Cieslak wrote:
> dtcreate crashed on 64-bit system when clicking
> "Find Set.." button.
>
I'm not going to apply this one, at least not without a better
understanding of what the real problem is...
> Crash happens in libXm:
>
[...]
>
> { type = 3 '\003', /* XmATTACH_WIDGET */
> w = 0x800000000, /* malformed XmATTACH_NONE ???
> percent = 0,
> offset = 10, /* specified as XmNbottomOffset */
> value = 0,
> tempValue = 0}
>
> XmATTACH_* values are defined in <Xm/Xm.h> as follows:
>
> 505 enum{ XmATTACH_NONE, XmATTACH_FORM,
> 506 XmATTACH_OPPOSITE_FORM, XmATTACH_WIDGET,
> 507 XmATTACH_OPPOSITE_WIDGET, XmATTACH_POSITION,
> 508 XmATTACH_SELF
> 509 } ;
>
> What is not clear to why XmATTACH_NONE - which should be (int)0 -
> becomes 0x800000000 - looks like a 64 bit bug somewhere.
>
Looks like menory corruption bug somewhere - somethingis scribbling
over this memory...
> Providing a long value on None (0L) as in this change fixes the
> problem.
>
> I understand is that it possible to use such an "empty" widget
> is to create additional space at the bottom of the newly created
> "icon_scrolled_win".
>
> What needs to be clarified - shouldn't be such an (int) value be
> automatically promoted to (long) (or XtArgVal, XtPointer, ...)
Yes, there is not problem I am aware of with int 0 being promoted to
long 0. I've never heard of a problem where ints are erroneously
promoted to longs. The other way around of course is problematic,
but... there is something else wrong here.
> and preserve the value 0? Lots of parameters seem to be
> passed as ints (for example dimensions) and they do not
> appear to cause any trouble.
Yep.
What I'm not sure of is the rules regarding promotion of enums to
longs. Hmm. What does the debugger say XmATTACH_NONE is? What
happens if you just use '0' instead of None?
> ---
> cde/programs/dtcreate/icon_selection_dialog.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cde/programs/dtcreate/icon_selection_dialog.c
> b/cde/programs/dtcreate/icon_selection_dialog.c
> index 67b48fc..63a04cf 100644
> --- a/cde/programs/dtcreate/icon_selection_dialog.c
> +++ b/cde/programs/dtcreate/icon_selection_dialog.c
> @@ -1782,7 +1782,7 @@ static Widget _Uxbuild_icon_selection_dialog(void)
> XmNleftWidget, icon_container_label,
> XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET,
> XmNbottomOffset, 10,
> - XmNbottomWidget, XmATTACH_NONE,
> + XmNbottomWidget, None,
> XmNbottomAttachment, XmATTACH_WIDGET,
> NULL );
>
>
--
Jon Trulson
The Higgs Field is what make atoms matter.
-- Tom L.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
cdesktopenv-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel